Web Service Integration

Dear All with help of Dynamics User Community i had integrated web services In navision. Thanks to all.

I am able communicate, send Soap Requests and save the value in a XMl Doc.

A Small issue is still pending I am unable to get Node value to a text Variable.

Code

// Webservice call method
//Initialization
IF ISCLEAR(locautXmlDoc) THEN
CREATE(locautXmlDoc);
locautXmlDoc.async:=FALSE;
IF ISCLEAR(XMLnode) THEN
CREATE(XMLnode);
XMLnode.async:=FALSE;
//Posting WSDL
IF ISCLEAR(locautXmlHttp) THEN
CREATE(locautXmlHttp);
locautXmlHttp.open(‘post’,‘10.32.9.51:8082/RackConfigService.svc
//Soap Header
locautXmlHttp.setRequestHeader(‘Content-type’,‘text/xml; charset=UTF-8’);
//Soap Action
locautXmlHttp.setRequestHeader(‘SOAPAction’,‘tempuri.org/…/CreateRackConfig’);:wink:
//Loading XML Response
locautXmlDoc.loadXML(’<SOAP-ENV:Envelope xmlns:SOAP-ENV="">schemas.xmlsoap.org/.../" xmlns:SOAP-ENC="’
+’">schemas.xmlsoap.org/…/" xmlns:xsi="">www.w3.org/…/XMLSchema-instance" xmlns:xsd="’
+’’">www.w3.org/…/XMLSchema">’
+’ SOAP-ENV:Body
+’ <m:CreateRackConfig xmlns:m="’">http://tempuri.org/">’
+’ <m:strOrderKey>2</m:strOrderKey>’
+’ <m:intSqueezeByPer>0</m:intSqueezeByPer>’
+’ </m:CreateRackConfig>’
+’</SOAP-ENV:Body>’
+’</SOAP-ENV:Envelope>’);

//Sending XML Response
locautXmlHttp.send(locautXmlDoc);
//Captureing the Final Response
locautXmlDoc.load(locautXmlHttp.responseXML);

//Save XML result
locautXmlDoc.save(‘c:\NHW\Ws.xml’);

//unable to collect the NODE value
XMLnode:= locautXmlDoc.selectSingleNode(’//CreateRackConfigResponse/CreateRackConfigResult’);

Error is invalid assignment. it is not possible to assign a IXMLDOMELEMENT to a DOMDocumnet

IF NOT ISCLEAR(XMLnode) THEN
MESSAGE(XMLnode.text);

This is the response. In which i want to capture the Node value to a text variable.
<s:Envelope xmlns:s="">schemas.xmlsoap.org/…/">

Variable i defined in Navision
Name DataType Subtype Length
locautXmlDoc Automation ‘Microsoft XML, v6.0’.DOMDocument
locautXmlHttp Automation ‘Microsoft XML, v6.0’.XMLHTTP
test Text 250
XMLnode Automation ‘Microsoft XML, v6.0’.DOMDocument

Please help me In this issue.