IF ISCLEAR(Connector) THEN CREATE(Connector); //Connector.Property('ProxyServer','isaserver'); //Connector.Property('ProxyPassword','proxypass'); //Connector.Property('ProxyUser','username'); Connector.Property('EndPointURL','http://localhost:1484/MCC-Webservice/Service.asmx?WSDL'); Connector.Connect; Connector.Property('SoapAction','http://tempuri.org/fromNavision'); Connector.BeginMessage; CREATE(Serializer); Serializer.Init(Connector.InputStream); Serializer.StartEnvelope('','STANDARD','utf-8'); Serializer.StartBody('STANDARD'); Serializer.StartElement('BillingService','uri:fromNavision'); Serializer.WriteString('Testing'); Serializer.EndElement; Serializer.EndBody; Serializer.EndEnvelope; Connector.EndMessage; IF ISCLEAR(XMLDOM) THEN CREATE(XMLDOM); XMLDOM.load(Connector.OutputStream); IF NOT ISCLEAR(XMLNode) THEN MESSAGE(XMLNode.text); XMLDOM.save('c:\vat.xml'); CLEAR(XMLDOM); CLEAR(Connector);
Comments
in above code, messageString is coming as null. and I am using SOAP Toolkit v3.0 in Navision.
Please suggest
Regards,
Vikas
PROCEDURE getRegistration@1000000001(regID@1000000000 : Text[30]);
VAR
xmlHttpReq@1000000001 : Automation "{F5078F18-C551-11D3-89B9-0000F81FE221} 5.0:{F5078F35-C551-11D3-89B9-0000F81FE221}:'Microsoft XML, v5.0'.XMLHTTP30";
xml@1000000002 : Text[1024];
locautXmlDoc@1000000003 : Automation "{F5078F18-C551-11D3-89B9-0000F81FE221} 5.0:{F6D90F11-9C73-11D3-B32E-00C04F990BB4}:'Microsoft XML, v5.0'.DOMDocument";
BEGIN
CREATE(xmlHttpReq);
xml := '<?xml version="1.0" encoding="UTF-8" standalone="no"?>';
xml := xml + '<soap:Envelope ';
xml := xml + 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ';
xml := xml + 'xmlns:xsd="http://www.w3.org/2001/XMLSchema" ';
xml := xml + 'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">';
xml := xml + '<soap:Body>';
xml := xml + '<getRegistration xmlns="http://tempuri.org/">';
xml := xml + '<regID>' + regID + '</regID>';
xml := xml + '</getRegistration>';
xml := xml + '</soap:Body>';
xml := xml + '</soap:Envelope>';
xmlHttpReq.open('POST','http://localhost/test/pjmLRPws.asmx',FALSE);
xmlHttpReq.setRequestHeader('Host','localhost');
xmlHttpReq.setRequestHeader('Content-Type','text/xml; charset=utf-8');
xmlHttpReq.setRequestHeader('Content-Length',FORMAT(STRLEN(xml)));
xmlHttpReq.setRequestHeader('SOAPAction','"http://tempuri.org/getRegistration"');
xmlHttpReq.send(xml);
CREATE(locautXmlDoc);
locautXmlDoc.load(xmlHttpReq.responseStream);
locautXmlDoc.save('c:\tempHTTP.xml');
END;
-- Bob Strusa
Bob Strusa