Could not create an instance of the OLE or Automation...

erarunarya
Member Posts: 21
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:
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
-
Hi,
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.0 -
HI vremeni4,
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'.IXMLDOMNode0 -
Hi,
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.0 -
](*,) may be this is due the corrupted library for XMLNode. Didn't find any solution till now.0
-
Hello everyone!
your answers were helpfull for me also, thank you very much!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions