//XML EXPORT //------------- IF XMLPORT.EXPORT(50009,lstrOutStream,lrecEloHeader) THEN BEGIN ltmpBlob.Blob.CREATEINSTREAM(lstrInStream); lautXml.load(lstrInStream); lautXml.save('C:/Question.xml'); END ELSE BEGIN ERROR('error:'+ GETLASTERRORTEXT); END; //XML send //------------- CREATE(locautXmlHttp); CREATE(locautXmlResponse); locautXmlHttp.open('POST','http://management.companyname.be/nav.php',TRUE); locautXmlHttp.setRequestHeader('Content-type','application/x-www-form-urlencoded'); locautXmlHttp.setRequestHeader('Connection', 'close'); //This line gives an error //locautXmlHttp.send('navml='+lautXml.xml)); //So I want to remove al the breaks from the xml generated by the xmlport. I hope that this is the cause of the error. lchr10 := 10; lchr13 := 13; intPos := STRPOS(FORMAT(lautXml.xml),FORMAT(lchr10)); WHILE intPos > 0 DO BEGIN lbtxtXML := DELSTR(FORMAT(lautXml.xml),intPos,1); intPos := STRPOS(lbtxtXML,FORMAT(lchr10)); END; locautXmlHttp.send(FORMAT(lbtxtXML)); //RETRIEVE ANSWER //------------------- locautXmlResponse.load(locautXmlHttp.responseXML); locautXmlResponse.save('C:\Response.xml');
Comments
locautXmlHttp.send(lautXml));
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
Regards.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n