XML in SOAP response

Hi,

I wrote my own SOAP web service and so far it is working like a charm. I am trying now to use it in my own iPhone app but I keep getting the SOAP response as HTML entities (< become &lt;) and I can not parse the XML like that.

I think the reason for this is that I specified on the SOAP WSDL that the response will be an string:

<part name='Result' type='xsd:string'/>

I can still modify my SOAP if I have to. What type of response should I use to avoid the HTML entities on my response?

Thank you.

iMac 24'', Mac OS X (10.5.8), 3.06 Ghz 2GB Ram

Posted on Feb 20, 2010 7:27 PM

Reply
11 replies

Feb 20, 2010 8:45 PM in response to sptrakesh

Hi,

Thank you for your response.

The SOAP response headers are coming back in their proper XML format, but I am expecting an string that is an XML list (beside the SOAP headers) and that is what is being converted.

My suspicion is that I should declare a simple type just for XML and not treat it like an string. Your thoughts?


....
<SOAP-ENV:Body>
<ns1:getPartsResponse>
<Result xsi:type="xsd:string">
<catalog>
<result id="1">
<part>AAAAAAAAAAA</part>
<qty>0000000000</qty>
<mfg>XXXXXXXXXXXXX</mfg>
</result>
</catalog>
</Result>
</ns1:getPartsResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Feb 20, 2010 8:48 PM in response to emilacosta

I try to posted but the entities were converted to HTML let me try again:

....
<SOAP-ENV:Body>
<ns1:getPartsResponse>
<Result xsi:type="xsd:string">
&lt ;catalog&gt ;
&lt ;result id="1"&gt ;
&lt ;part&gt ;AAAAAAAAAAA&lt ;/part&gt ;
&lt ;qty>0000000000&lt ;/qty&gt ;
&lt ;mfg&gt ;XXXXXXXXXXXXX&lt ;/mfg&gt ;
&lt ;/result&gt ;
&lt ;/catalog&gt ;
</Result>
</ns1:getPartsResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Message was edited by: emilacosta

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

XML in SOAP response

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.