cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

XML output as pure string

olivier_thiry
Participant
0 Likes
668

Hello,

I have a requirement to do a MII BLS transaction exposed as Webservice... This WS should return a XML message as a string.

Problem is that the returned string is xml encoded... But I need it as it!

So for example, I did a very small transaction with a string output parameter, just containing "<", result is :

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<soap:Body>

<XacuteResponse xmlns="http://www.sap.com/xMII">

<Rowset>

<Row>

<e>&amp;lt;</e>

</Row>

</Rowset>

</XacuteResponse>

</soap:Body>

</soap:Envelope>

is there a way to avoid this ? And receive <e><</e> ?

Thanks

Olivier

Edited by: Olivier Thiry on May 13, 2011 3:27 PM

Edited by: Olivier Thiry on May 13, 2011 3:28 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Likes

Hi Oliver

How do you do it. If you just link an XML to a String , it should be enough. You should than get the XML in pure String format.

Do not do any encode/decode in expression editor. Just do pure linking xml -> String.

is this what you are asking?

olivier_thiry
Participant
0 Likes

I do it exactly like you say : link xml to string, no encode/decode. In MII Workbench, no problem, it's pure string, but if you consume the WS from any other tool (we tried from SOAP UI, Webdynpro, .Net, or even running the transaction in browser user the SOAPRunner), the result is a XML encoded string.

If you look at the exemple I provided, you see the response with e = "<" in my MII transaction...

I think it's more related to SOAP transport, which doesn't allow to have xml inside a xml field...

Former Member
0 Likes

Sorry, now I understand what you mean. The < is special charachter in XML. SOAP protocol is XML based and therefore there are some predefined characters that you cannot use