XML responsetext

gunavs
Member Posts: 32
I am consuming a webservice by doing a string query POST and get the response back in xmlhttp.responsetext. Unfortunately for some situations i get a response text greater than 1024 characters which i cannot directly load into a navision string. Is there anyway i can load this responsetext somewhere else and not get a string buffer error?
Thank You!
I have Navision 3.7 so i do not have Bigtext or Blobs to load it into.
Thank You!
I have Navision 3.7 so i do not have Bigtext or Blobs to load it into.
0
Comments
-
use xmlhttp.responsebody
XMLDOC.LOAD(xmlhttp.responsebody);
http://mibuso.com/blogs/ara3n/2009/02/1 ... nitiative/0 -
Thanks ara3n. I tried doing that
XMLDoc.load(XMLReq.responseBody);
XMLDoc.save('C:\response1.xml');
Also the
XMLDoc.load(XMLReq.responseXML);
But the file is always empty. Only the responsetext had the return information from the webservice though it was exceeding 1024 characters for a few responses. Do i need to do any additional intital settings then what i have below
XMLReq.open('POST', 'url', FALSE);
XMLReq.setRequestHeader('Content-type','text/xml');
XMLReq.send(String);
The webservice only accepts query strings so i am not posting a .xml
Thanks again!!0 -
add this code to see why xmldoc couldn't parse the xml file
IF XMLDoc.parseError.errorCode <> 0 THEN
ERROR('XML DOM Error: ' +XMLDoc.parseError.reason +' - Errorcode : '+FORMAT(XMLDoc.parseError.errorCode));0 -
also what is the subtype for xmldoc variable?0
-
I get a "Invalid at the top level of the documet- Error code :- 1072896682."
Also my XmlDoc is 'Microsoft XML, v6.0'.DOMDocument60
Thank You ara3n0 -
Change it to
Microsoft XML, v6.0'.DOMDocument
don't use
DOMDocument600 -
I am still getting the invalid at the top level error. Thanks ara3n0
-
I suggest to download and install SOAPUI and test your webservice and make sure it returns the valid info.
It looks like the webservice is return an invalid xml file.0 -
But is there anyway i can load the XMLresponsetext somewhere without getting a string buffer error? I was going to invoke a SHELL command a copy this string into a empty file but i am not sure how to go about it or if it woulr still give me the buffer error. How did navision 3.7 handle huge strings when it did not have Bigtext and Blobs?
Thank You ara3n. I will check why my xmlresponsetext is fine and the xml is invalid.0 -
I checked and the web dll i am communicating with accepts an HTTP post, and not the WSDL functionality. Si get get only a string response since it is a http post?0
-
If a string is being returned back, then the only workaround is write your code in .NET and make a dll.
The other option is run your code using 2009 service tier and use variant type.0 -
I will try that. Thank You.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