http://qs321.pair.com?node_id=701472


in reply to XML SOAP Response

I don't see encoding problem in the response, the strange thing is that your SOAP response contains only one <return> tag which, in turn contains an XML stream.

If you want to use the contents of the "inner" XML, you should parse it twice: parse the SOAP response and get the contents of the <return> tag in a var, then parse the var to get the values.

Update: perhaps your problem is elsewhere. The format of your SOAP packet is really unusual, for there's no need to encapsulate an XML stream into a SOAP packet (which is XML itself). So maybe is the script generating the response to blame: it should not embed the response into the <return> tag as a string but as pure XML.

Rule One: "Do not act incautiously when confronting a little bald wrinkly smiling man."

Replies are listed 'Best First'.
Re^2: XML SOAP Response
by mitchismoney (Initiate) on Jul 31, 2008 at 17:23 UTC
    Thank you, I'm looking into the script that generates the response to see if it can be changed. The owner of the web service said the following as I was building the call to the web service.
    There is a single element in the request which accepts a string, but the string is XML, and as such needs to be encoded
    I think that is why its embedded within on <return> element. Unfortunately that is not something I can avoid, if that is indeed the case. Here is the soap envelope that makes the call:
    requestbody = requestbody & "<SOAP-ENV:Body><ns1:VehicleInfo >" requestbody = requestbody & "<xmlRequest xmlns:xsi=""http://www.w3.org +/2001/XMLSchema-instance"" xsi:type=""xsd:string"">" requestbody = requestbody & "<FCSDServicesRequest marketid=""1"" langu +age=""ENG"" country=""USA"" xmlns:xsi=""http://www.w3.org/2001/XMLSch +ema-instance"" xsi:noNamespaceSchemaLocation=""FCSDServices.xsd"">" requestbody = requestbody & "<Vehicles>" requestbody = requestbody & "<Vehicle vin=""1FMFU17L94LB04622""/>" requestbody = requestbody & "<Vehicle vin=""1FTRX12W88KD10648""/>" requestbody = requestbody & "<Vehicle vin=""2MEHM75W26X618474""/>" requestbody = requestbody & "</Vehicles>" requestbody = requestbody & "<ServiceRequests>" requestbody = requestbody & "<VINDecodeService>" requestbody = requestbody & "<Attribute typeid=""14"" type=""Year""/>" requestbody = requestbody & "<Attribute typeid=""1"" type=""Make""/>" requestbody = requestbody & "<Attribute typeid=""2"" type=""Model""/>" requestbody = requestbody & "<Attribute typeid=""3"" type=""Series""/> +" requestbody = requestbody & "</VINDecodeService>" requestbody = requestbody & "</ServiceRequests>" requestbody = requestbody & "</FCSDServicesRequest>" requestbody = requestbody & "</xmlRequest>" requestbody = requestbody & "</ns1:VehicleInfo>" requestbody = requestbody & "</SOAP-ENV:Body>" requestbody = requestbody & "</SOAP-ENV:Envelope>"