Welcome! Log In Create A New Profile

Advanced

XML result from SOAP server - can't read w/ XMLFind

Posted by Georgio 
Georgio
XML result from SOAP server - can't read w/ XMLFind
February 24, 2009 11:55PM
Hi,

I'm having an issue where I am getting the results of a SOAP procedure
run from a 3rd party server. The data coming back looks like there is
a SOAP header. When I try to read this into my program, I am getting
"Document not in XML format".

Here's what the header looks like: I've replaced the "<" and ">" chars
with brackets:


[soap:Envelope xmlns:soap="[schemas.xmlsoap.org]; xmlns:xsi="[www.w3.org]; xmlns:xsd="[www.w3.org]; xmlns:soapenc="[schemas.xmlsoap.org];]
- [soap:Body soap:encodingStyle="[schemas.xmlsoap.org];]
- [snp:GetTransRangeByDate xmlns:snp="urn:CSSoapService"]
[return]no_error[/return]
- [trans_list_xml]
[?xml version="1.0" ?]"



Now, if I strip the beginning & closing tags on the response, I can read the
data in just fine.

Is there a command where I can remove the SOAP header? If not, has anyone
come across this issue and found a work around?

Thanks!
Georgio
Georgio
Sadly I am not an XML guru but I have used web services quite a bit.
I believe the answer to your question is no - certainly in WD.
The theory is that the web service will create a 'well formed' xml document that can be read (platform independent) by any program using the service.
Being able to remove the header would somewhat defeat the purpose.

If you save the response as an .xml file, can you open and read this in a browser window or NotePadXML etc?
I ask this as the error you are getting is the same as these will give if the document is not well formed (message from the OS resident xml parser).

If you cannot open the document then the issue is with the web service provider.
Having said this I am not sure this is possible as my understanding is that the xml parser will check each message before it is sent.

If you can open it then can you show the code you are using and highlight where you are getting the error.
Did you write the code yourself or did you import a WSDL?

Not sure if this is relevant but I have just looked at a number of response docs I have and the [?xml version="1.0" ?]" is always the first line.

Regards

DerekT
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: