Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Web services and SOAP logic

Status
Not open for further replies.

pho01

Programmer
Mar 17, 2003
218
US
I've read the SOAP tutorials on the net and don't quite understand the SOAP response.

Once you get the SOAP response, how do you display the results in HTML. I'm pretty new to this, if some experts out there would explain more, i would greatly appreciate it. Thanks!

Let's take this response for example:
<?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV=&quot; xmlns:xsi=&quot; xmlns:xsd=&quot; <SOAP-ENV:Body>
<ns1:doubleAnIntegerResponse
xmlns:ns1=&quot;urn:MySoapServices&quot;
SOAP-ENV:encodingStyle=&quot; <return xsi:type=&quot;xsd:int&quot;>246</return>
</ns1:doubleAnIntegerResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Thanks much!
 
SOAP doesn't return HTML, it returns XML. In the example you posted, you only really care about the Body part of it (once you validate the envelope, etc).
Code:
    <SOAP-ENV:Body>
        <ns1:doubleAnIntegerResponse
         xmlns:ns1=&quot;urn:MySoapServices&quot;
         SOAP-ENV:encodingStyle=&quot;[URL unfurl="true"]http://schemas.xmlsoap.org/soap/encoding/&quot;>;[/URL]
            <return xsi:type=&quot;xsd:int&quot;>246</return>
        </ns1:doubleAnIntegerResponse>
    </SOAP-ENV:Body>
This is telling you that the body is returning a numeric value (an integer) who's value is 246.

It's possible to return a string which happens to *look* like HTML, or can be transformed using XSLT into something that is HTML for display. Maybe that's what you're asking? Remember that SOAP is a protocol, not a display format.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top