Hi,
I am trying to run a processing report to update items on magento from Nav thorough APIs.
For this i am using Automation Server in which i have take a variable of XMLNode of type 'Microsoft XML, v3.0'.IXMLDOMNode.
Now i am using this variable in the code:
"XMLDOM.load(objConn.OutputStream);
XMLDOM.getElementsByTagName('loginReturn');
XMLNode := XMLDOM.selectSingleNode('//loginReturn');
SessionId := FORMAT(XMLNode.text);"
But an error come everytime i run this report mentioned in image below:
0
Comments
The problem is that you did not create the automation. You have to use the command CREATE to do this.
You need first to define a variable:
Name DataType Subtype Length
XmlDoc Automation 'Microsoft XML, v6.0'.DOMDocument60
Then in the code you have to create automation.
IF ISCLEAR(XmlDoc) THEN CREATE(XmlDoc);
XmlDoc.load(objConn.OutputStream);
I hope this helps.
Thanks.
Problem is not in XMLDom and outstream, I have created it properly.
Actually on debugging it shows the error on XMLNOde (). Afterwards if I am going to create this automation then also there is an error that this library is not properly register or corrupted. :-k
Name DataType Subtype Length
XMLNode Automation 'Microsoft XML, v6.0'.IXMLDOMNode
In one of the database we have this code
IF ISCLEAR(XmlDoc) THEN CREATE(XmlDoc);
XmlDoc.load(XmlHttp.responseBody);
XmlNode := XmlDoc.selectSingleNode('//Soap:Envelope/Soap:Body/Checkline_Result/return_value/');
//MESSAGE(XmlNode.text);
XmlDoc.save('C:\response.xml');
//HYPERLINK('C:\response.xml');
CLEAR(XmlDoc);
Name DataType Subtype Length
XmlDoc Automation 'Microsoft XML, v6.0'.DOMDocument60
XmlNode Automation 'Microsoft XML, v6.0'.IXMLDOMNode
It works fine.
Also you can take a look at the standard codeunit
Type ID Name Modified Version List Date Time Compiled Locked Locked By
5 6224 XML DOM Management No NAVW13.10 17/12/01 12:00:00 Yes No
as it provides some additional examples.
It may be worth to try to run repair from NAV setup DVD.
I hope this helps.
Thanks.
your answers were helpfull for me also, thank you very much!