on 07-17-2015 11:29 AM
Hi
I am trying to update report structure using restful web services. But getting error. Details as below:
SAMPLE XML:
<REPORT rId="2" name= "Report 1">
<PAGE_BODY bId = "21">
<CELL bId = "211" x= "1000" y="1500">
<CONTENT>
="My First CELL"
</CONTENT>
</CELL>
</PAGE_BODY>
</REPORT>
CODE:
cell = "<REPORT rId=\"2\" name= \"Report 1\"> <PAGE_BODY bId = \"21\"> <CELL bId = \"211\" x= \"1000\" y=\"1500\"><CONTENT>=\"My First CELL\"</CONTENT> </CELL> </PAGE_BODY></REPORT>"
headers2 = {'accept': 'text/xml', 'content-type': 'text/xml', 'X-SAP-LogonToken': logonToken}
updateReportStr = requests.put(url = rayLightUrl + '/documents/15533' + '/reports/2/specification', data = cell, headers = headers2)
ERROR:
<error>
<error_code>RWS 00058</error_code>
<message>Not acceptable, (RWS 00058)</message>
Stack Trace is not helping. Any help is appreciable.
Regards
Anu
hi Anu,
In a generic way:
<error>
<error_code>RWS 00058</error_code>
<message>Not acceptable, (RWS 00058)</message>
</error>
... means that no call exists with the pair (Accept-Type + Content-Type) that you specify.
In your specific case:
(see that section of the documentation: SAP BusinessObjects RESTful Web Service SDK User Guide for Web Intelligence and the BI Semantic Laye...)
Regards,
eric
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Eric
Thanks for quick reply. Yes. Its working now when I changed it to application/xml.
Message has changed to below:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<success>
<message>The resource of type 'Report' with identifier '2' has been successf
ully updated.</message>
<id>2</id>
</success>
But the changes have not reflected in the WebI Report. Currently WebI report has a VTABLE and Chart. I was expecting it to go away and only have 1 cell with content "My First CELL".
Am I missing something?
Hi Anu,
to save the changes back to the CMS, you need to update the state of the document,
if you do the following:
PUT .../raylight/v1/documents/<docID>
without any request body, it will save the document with changes
if you use:
PUT .../raylight/v1/documents/<docID>
with the following body:
<document>
<state>Unused</state>
</document>
It will save the document to the CMS and close it as well.
See this page in the documentation
Dan
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.