cancel
Showing results for 
Search instead for 
Did you mean: 

XML tags are received as Text

Former Member
0 Kudos

I have a Webservice i am calling over SOAP. it is a synchronous call. i pass in the SOAPAction and the webservice is called.

however the response is not as expected... although it "displays" as tags, in the view source, they are encoded text...


<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> 
- <!--  XML Validation Inbound Channel Response 
  --> 
- <ser-root:createContractResponse xmlns:ser-root="http://host:port/ws/createContract" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <response><?xml version="1.0" encoding="UTF-8" ?> <ns:BBP_ES_OA_UPDATE.Response xmlns:ns="urn:sap-com:document:sap:rfc:functions"> <CROSSREF> <ES_MA_NUMBER>contracts.Contract:MA-ICE-00000190</ES_MA_NUMBER> <ES_DOC_TYPE>CTR</ES_DOC_TYPE> <ES_MA_NAME>Test 1611-a</ES_MA_NAME> <HEAD_TEXT_ID>K01</HEAD_TEXT_ID> <ITEM_TEXT_ID>K01</ITEM_TEXT_ID> </CROSSREF> <PURCHASINGDOCUMENT>BR0105859</PURCHASINGDOCUMENT>

i have asked for the other developer to remove the <?xml inside the response, however it is all displayed as


<response><?xml version="1.0" encoding="UTF-8" ?>
<ns:BBP_ES_OA_UPDATE.Response xmlns:ns="urn:sap-com:document:sap:rfc:functions">
<CROSSREF>
  <ES_MA_NUMBER>contracts.Contract:MA-ICE-00000190</ES_MA_NUMBER>
  <ES_DOC_TYPE>CTR</ES_DOC_TYPE>
  <ES_MA_NAME>Test 1611-a</ES_MA_NAME>
  <HEAD_TEXT_ID>K01</HEAD_TEXT_ID>
  <ITEM_TEXT_ID>K01</ITEM_TEXT_ID>
</CROSSREF>
<PURCHASINGDOCUMENT>BR0105859</PURCHASINGDOCUMENT>

is there a way for me to convert the "text" to "xml" easily?

that is just annoying! IE converts my & # 6 0 ; and & # 6 2 ; to tags!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I asked the developer to amend the return and he has but now i have additional tags and data i am trying to remove.....

thanks Stefan!

stefan_grube
Active Contributor
0 Kudos

A simple XSLT mapping with copy statement will help.

But I think you have to discuss the issue with the web service developer.

It is not intented to disguise the result XML inside a string elemnent. The point is that the real response is not part of the WSDL, therefore you cannot do a response mappaing and need Java/XSLT mapping.

I would call this: lazy webservice development. The developer want a generic interface, so he need not care about the interface structure and consumer has to deal with the issues.