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');
Answers
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
Thomas
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 chars
And if that don't work change to 'Microsoft XML, v6.0'.ServerXMLHTTP and try example below: