send big XML Files

gkservice
Member Posts: 9
Hello,
we have the Problem that we can sucessfully write big xml-Files and also read them, but we can NOT send them via a webservice. We receive the message that the length of the string is longer then the length of the buffer.
Does someone have a Idea for us?
we have the Problem that we can sucessfully write big xml-Files and also read them, but we can NOT send them via a webservice. We receive the message that the length of the string is longer then the length of the buffer.
Does someone have a Idea for us?
IF ISCLEAR(XMLHttp) THEN CREATE(XMLHttp); IF ISCLEAR(XMLDoc) THEN CREATE(XMLDoc); rShippingAgent.GET(rParcelShipment."Shipping Agent"); XMLHttp.open('POST', rShippingAgent.Webservice, 0); XMLHttp.setRequestHeader('SoapAction', rShippingAgent."Operation - Shipment"); XMLHttp.setRequestHeader('Content-Type', 'text/xml; charset-utf-8'); XMLHttp.setRequestHeader('Connection', 'keep-alive'); XMLHttp.setRequestHeader('Keep-Alive', 'timeout=30, max=1000'); RequestFile.OPEN(RequestFilePath); RequestFile.CREATEINSTREAM(InFilestream); XMLDoc.load(InFilestream); XMLHttp.send(XMLDoc.xml); IF XMLHttp.status <> 200 THEN MESSAGE('Http Error' + ' ' + FORMAT(XMLHttp.status) + ': ' + XMLHttp.statusText); XMLDoc.async:=FALSE; XMLDoc.load(XMLHttp.responseBody); XMLDoc.save(rWarehouseSetup.Transactionfolder + '\RX_' + FORMAT(Shipment) + '.xml');
0
Answers
-
Hi
I suppose it works if you send the same file type but with less records. If possible, you should check with the persons responsible for that web service.
Hope this helps
Thomas0 -
Did you talk to the webservice guys?0
-
:?: Ok, but if your system has to use an existing ws, this service should be able to handle that data!? Imo either their service is not sufficient or your data do not match their specification...0
-
ta5 wrote::?: Ok, but if your system has to use an existing ws, this service should be able to handle that data!? Imo either their service is not sufficient or your data do not match their specification...
The File I produce is correct, and if I use for example "soapui" I can send this and get a correct response...only Navision can not send this file, cause it has more the 1024 chars0 -
Ok, misunderstanding. At what line do you get the error? Error could be from the return value of the automation object...0
-
ta5 wrote:Ok, misunderstanding. At what line do you get the error? Error could be from the return value of the automation object...
XMLHttp.send(XMLDoc.xml);
0 -
Try
XMLHttp.send(XMLDoc);
And if that don't work change to 'Microsoft XML, v6.0'.ServerXMLHTTP and try example below:XMLHTTPSrv.open('POST',WSURL,FALSE); XMLHTTPSrv.setRequestHeader('Content-Type','text/xml'); XMLHTTPSrv.setRequestHeader('SOAPAction',WSACTION); XMLHTTPSrv.send(XmlDoc);
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