Lost in getting data from soap XML answer
superbruger
Member Posts: 41
Hello
I have this code:
I get a message for the status as "200 OK"
But the file I save as XMLResponse1 is empty.
Can anybody please tell me, if I'm doing something wrong?
/Brian
I have this code:
XMLHttpConn.open('POST','http://server.name.de/soap.php HTTP/1.1',FALSE,'user','password');
//set some values in the request header depending on what the service requires
XMLHttpConn.setRequestHeader('Content-Type','text/xml;charset=UTF-8');
XMLHttpConn.setRequestHeader('SOAPAction','http://server.name.de/soap.php#getServerInfo');
XMLHttpConn.setRequestHeader('Authorization','something');
XMLHttpConn.setRequestHeader('Host','server.name.de');
//actually send the message
XMLHttpConn.send();
//get the response
IF ISCLEAR(XmlDoc) THEN
CREATE(XmlDoc);
XmlDoc.load(XMLHttpConn.responseXML);
MESSAGE('Status %1 %2',XMLHttpConn.status,XMLHttpConn.statusText);
//this is for diagnostics only, so you can see what you got back
XmlDoc.save('T:\Temp\XMLResponse1.xml');
I get a message for the status as "200 OK"
But the file I save as XMLResponse1 is empty.
Can anybody please tell me, if I'm doing something wrong?
/Brian
0
Comments
-
If the message is quet small you could try:
XmlDoc.loadXML(XMLHttpConn.responseText);
Sincerely yours, GRIZZLY
Follow my blog at http://x-dynamics.blogspot.com0 -
Thank You, Grizzly, but the text is to long to be read this way.
(Navision error)
So that means, I think, there is some answer from the server.
But then - how to read / save it?
/Brian0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K 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
- 324 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