I send request to Web service from this code. Why I can not GET response from Web service ? What's wrong ?
OnRun()
CreateXML;
InvokeNavWS;
LOCAL InvokeNavWS()
CLEAR(xmlhttp);
CLEAR(xmldoc);
CLEAR(xmlnode);
CLEAR(xmlnodelist);
CLEAR(xmlattributes);
result := FALSE;
// Create XML Document
xmldoc :=xmldoc.XmlDocument;
xmldoc.Load(FileName);
// Create XMLHTTP and SEND
xmlhttp :=XmlHttpClass.XMLHTTPRequestClass;
xmlhttp.open('POST', '
http://de01-onec05.corp.111111.com/UT_111111-DEV/ws/Navision?wsdl', FALSE,'111111','111');
xmlhttp.setRequestHeader('Content-type', 'text/xml; charset=utf-8');
xmlhttp.setRequestHeader('SOAPAction', '
http://www.111111.com/Navision/package#Navision:CreateOrderToSupplier');
xmlhttp.send(xmldoc.ToString);
ResponseString := xmlhttp.responseText;
xmldoc.LoadXml(ResponseString);
// If status is OK - Get Result XML
IF xmlhttp.status=200 THEN
BEGIN
//xmldoc := xmlhttp.responseXML;
xmlnodelist := xmldoc.GetElementsByTagName('m:return');
Nodes := xmlnodelist.Count;
FOR i := 0 TO Nodes-1 DO BEGIN
xmlnode := xmlnodelist.ItemOf(i);
xmlattributes := xmlnode.Attributes;
xmlnode := xmlattributes.GetNamedItem('Error');
IF NOT ISNULL(xmlnode) THEN
errortxt := xmlnode.InnerText;
xmlnode := xmlattributes.GetNamedItem('Result');
IF NOT ISNULL(xmlnode) THEN
resulttxt := xmlnode.InnerText;
END;
END ELSE
result := TRUE;
xmldoc.Save('C:\Users\111111\Desktop\test50000_resp.xml');
CLEAR(xmlhttp);
CLEAR(xmldoc);
CLEAR(xmlnode);
CLEAR(xmlnodelist);
CLEAR(xmlattributes);
CreateXML()
CLEAR(TempBlob);
CLEAR(XMLStreamOut);
CLEAR(XMLStreamIn);
FileName := 'C:\Users\omegaplus\Desktop\test111111.xml';
ServerFileName := FileMgt.ServerTempFileName('xml');
XMLFile.CREATE(ServerFileName);
XMLFile.CREATEOUTSTREAM(XMLStreamOut);
XMLPORT.EXPORT(XMLPORT::TestSoap,XMLStreamOut);
XMLFile.CLOSE;
FileMgt.DownloadToFile(ServerFileName,FileName);
//MESSAGE('File Exported as: %1.', FileName);