cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to add query Specification to the Data Provider

0 Kudos

1. Create Document

     String Create= "<document><name>Doc</name><folderId>4825</folderId></document>"

2. Added Data Provider

    String Create = <dataprovider><name>eFashion</name><dataSourceId>4835</dataSourceId></dataprovider>"

3.After Dataprovider creation I am using the below code to add queryspecification

4. Getting  the below error. Please help

Accepted Solutions (1)

Accepted Solutions (1)

former_member197386
Active Contributor
0 Kudos

Hi Sivaraman,

Maybe there is an issue in your QS (Query Specification). Can you try to create the query through Webi UI and then, get the QS of the existing document through Raylight. Then, compare what you sent with what you received from Raylight.

Best regards,

Anthony

daniel_paulsen
Active Contributor
0 Kudos

I agree with Anthony's approach, but also noticed the "</children>" element looks out of place

Dan

0 Kudos

Thanks Anthony and Dan.

As per your suggestion I got the QS from the existing report with the same one column report. compared my input xml and updated few values then matched.

Below is the Webi QS got from Existing Report through raylight.

Below is the Updated code:

Still I get the same error. Please help.

0 Kudos

It looks like issue with QS generated in my code. If I get the QS from server and save it locally as XML file then load the XML file and pass it to web service call then I am able to create.

What could be the issue when I generate the QS in the code? Is there any encoding issue?

Any insights will be helpful?

Thanks again for your help.

daniel_paulsen
Active Contributor
0 Kudos

The only thing that stands out is that you are changing the "identifier" in the BOQuery element, but I'm not sure why that would cause the error.

If it is an encoding issue, one thing to try would be to read in the XML as UTF8, just to make sure:

dataByte = Encoding.UTF8.GetBytes(pXML.OuterXml);

Dan

Answers (0)