Specific: how to remove text from incoming xml-message

BlackBird
Member Posts: 52
Hi there,
I have a communication set up with a 3rd party webservice. I send and receive messages through SOAP which worked fine until now.
The reponse i get has changed. Instead of the following repons (example):
When i try to fetch the response through:
objDomDocResponse := objXMLHTTP.responseXML; (objDomDocResponse = 'Microsoft XML, v3.0'.DOMDocument30' and objXMLHTTP = Microsoft XML, v3.0'.XMLHTTP) it doesn't load the response because when i try to save it to a physical file it's 0 Kb.
My guess is that the 4 headers in the respons is the cause because the same code worked fine when the headers weren't there.
Does anyone recognize this behaviour? Do you have any idea how to solve this?
Thanks for your help.
I have a communication set up with a 3rd party webservice. I send and receive messages through SOAP which worked fine until now.
The reponse i get has changed. Instead of the following repons (example):
<soap:Envelope soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <SendEmailResponse xmlns="http://www.xxxxxx.nl/Webservice"> <result> <success xsi:type="xsd:boolean">true</success> <message xsi:type="xsd:string">The message has been sent successfully</message> </result> </SendEmailResponse> </soap:Body> </soap:Envelope>i get the following respons:
Status: 200 OK Content-Length: 592 Content-Type: text/xml; charset=utf-8 SOAPServer: SOAP::Lite/Perl/0.710.08 <soap:Envelope soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <SendEmailResponse xmlns="http://www.xxxxxxx.nl/Webservice"> <result> <success xsi:type="xsd:boolean">true</success> <message xsi:type="xsd:string">The message has been sent successfully</message> </result> </SendEmailResponse> </soap:Body> </soap:Envelope>
When i try to fetch the response through:
objDomDocResponse := objXMLHTTP.responseXML; (objDomDocResponse = 'Microsoft XML, v3.0'.DOMDocument30' and objXMLHTTP = Microsoft XML, v3.0'.XMLHTTP) it doesn't load the response because when i try to save it to a physical file it's 0 Kb.
My guess is that the 4 headers in the respons is the cause because the same code worked fine when the headers weren't there.
Does anyone recognize this behaviour? Do you have any idea how to solve this?
Thanks for your help.
0
Comments
-
try to use objXMLHTTP.response0
-
Thanks for the tip.
Can you tell me if it's possible to remove the headers through these functions, or do i have to remove the headers and save the remainder as a physical file and pick it up again?0 -
I believe response returns only the body of the message, unless the webservice sends the Header messages inside the body.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions