Hi Experts
I am writing a script (in PHP and Javascript) to communicate with a web service using SOAP requests. This works perfectly and has no problems.
What i was wondering is, when a message comes back from the soap request, how do I format it properly so that it can be displayed say for example in a table format or something alike? Applying some stylesheet to the soap message?
The SOAP message reply looks something like this:
#########
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="
http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<message>
<response from="gs2mgppdemo/TextQuer
y" type="process">
<metadataList>
<metadata name="numDocsMatched">45</
metadata>
<metadata name="numDocsReturned">10<
/metadata>
<metadata name="query">apple</metada
ta>
</metadataList>
<documentNodeList>
<documentNode docType="hierarchy" nodeID="HASH2e2c0786db13d2
42a0640e.5
" nodeType="leaf" rank="61.874542" />
<documentNode docType="hierarchy" nodeID="HASH9a32d65fe2d5e0
559e9a88.6
.3" nodeType="leaf" rank="30.937271" />
<documentNode docType="hierarchy" nodeID="HASH01e114881a5545
b979515a68
.10.3" nodeType="leaf" rank="30.937271" />
<documentNode docType="hierarchy" nodeID="HASH9a32d65fe2d5e0
559e9a88.1
0.3" nodeType="leaf" rank="15.468636" />
<documentNode docType="hierarchy" nodeID="HASH9a32d65fe2d5e0
559e9a88.7
.1" nodeType="leaf" rank="15.468636" />
<documentNode docType="hierarchy" nodeID="HASH626d047760b154
f868d2e5.7
.1" nodeType="leaf" rank="15.468636" />
<documentNode docType="hierarchy" nodeID="HASH01a99b6dc39959
1d12f46803
.7.4" nodeType="leaf" rank="0.510514" />
<documentNode docType="hierarchy" nodeID="HASH2e2c0786db13d2
42a0640e.6
.5" nodeType="leaf" rank="0.20321295" />
<documentNode docType="hierarchy" nodeID="HASH351102fcb484db
f644cd09.1
0.3" nodeType="leaf" rank="0.20321295" />
<documentNode docType="hierarchy" nodeID="HASH626d047760b154
f868d2e5.1
0.4" nodeType="leaf" rank="0.17838767" />
</documentNodeList>
<termList>
<term field="" freq="54" name="apple" numDocsMatch="25" stem="3">
<equivTermList>
<term freq="" name="apples" numDocsMatch="" />
<term freq="" name="applicant" numDocsMatch="" />
<term freq="" name="Applied" numDocsMatch="" />
<term freq="" name="applied" numDocsMatch="" />
<term freq="" name="applies" numDocsMatch="" />
<term freq="" name="Applying" numDocsMatch="" />
<term freq="" name="applying" numDocsMatch="" />
</equivTermList>
</term>
</termList>
</response>
</message>
</soapenv:Body>
</soapenv:Envelope>
###########
I simply want to format the message so that it is displayable (doesn't even have to be too pretty with colours and sophisticated tables!).
Many thanks for your help!
Start Free Trial