I'm trying to invoke an SAP web service using the following example:
http://lctips.wordpress.com/category/webservice/webservices-xml-documents-cdata/
I'm able to receive the SOAP response, but the CDATA list is empty. Does anyone see anything wrong with this response?
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:n0="urn:sap-com:document:sap:soap:functions:mc-style">
<soap-env:Header/>
<soap-env:Body>
<n0:ZGetWfApproverResponse>
<XmlResult><![CDATA[<?xml version="1.0" encoding="iso-8859-1"?>
<APPROVALCHAIN><ZSWACTORS><TITLE>LEGAL</TITLE><NAME>user1</NAME></ZSWACTORS><ZSWACTORS><TITLE>LEGAL</TITLE><NAME>user2</NAME></ZSWACTORS><ZSWACTORS><TITLE>LEGAL</TITLE><NAME>user3</NAME></ZSWACTORS></APPROVALCHAIN>]]></XmlResult>
</n0:ZGetWfApproverResponse>
</soap-env:Body>
</soap-env:Envelope>
Views
Replies
Total Likes
I am not sure I follow. It appears that the response contains a valid XML document.
<?xml version="1.0" encoding="iso-8859-1"?>
<APPROVALCHAIN><ZSWACTORS><TITLE>LEGAL</TITLE><NAME>user1</NAME></ZSWACTORS><ZSW ACTORS><TITLE>LEGAL</TITLE><NAME>user2</NAME></ZSWACTORS><ZSWACTORS><TITLE>LEGAL </TITLE><NAME>user3</NAME></ZSWACTORS></APPROVALCHAIN>
Steve
Views
Replies
Total Likes
Confirm the data type of the variable you assigned for the CDATA list.
The type of variable should be list and subtype should be document
If still you dont get the result, post your process in the forum.
Nith
Views
Replies
Total Likes
I can see the XML document. How do I copy it to a variable?
Views
Replies
Total Likes
To expand on Nith's response....
In the Web Service, go to Web Service Response tab and you will see the property "CDATA list". The property requires a variable of type "list".
Create a process variable of type 'list" with a sub-type of "document". Let's call the variable "cdataList". Assign the variable "cdataList" to the property "CDATA list". This will handle parsing the CDATA section from the SOAP response envelope.
Create another variable of type "xml" and call it "approvalChainXml", perhaps.
Add a Set Value operation after the Web Service and set the location to "/process_data/approvalChainXml" and the expression to "/process_data/cdataList[1]". This will get the get the XML document out of the CDATA list and assign it to "approvalChainXml".
Steve
Views
Replies
Total Likes