The problem occurs with the use of: msxml / Microsoft XML, v6.0 / comws / XMLReadFile and the classes MSXML2_IXMLDOMElement / MSXML2_IXMLDOMNode
For consume REST/JSON in TD 6.1, I try to use https://wiki.tdcommunity.net/index.php/ ... ft_XMLHTTP from Dave Rabelink
This uses "Microsoft XML, v6.0.apl" generated with the ActiveX Wizard
At the same time, I have been using a lot:
msxml.apl, comws.apl from Lubos Vnuk, and the function XMLReadFile from https://samples.tdcommunity.net/index.p ... ample2.zip
If I include "msxml.apl" and "Microsoft XML, v6.0.apl" at the same time it generates many errors due to duplicate classes.
So take "msxml.apl" and comment all the classes already included in "Microsoft XML, v6.0.apl" (assuming the same behavior in both).
I called this "msxml_coment.apl"
And now the problem arises for which I need help: XMLReadFile and comws generate data type conflict.
The conflict apparently would be due to differences between "msxml.apl" and "Microsoft XML, v6.0.apl" in:
Functional Class: MSXML2_IXMLDOMElement
Functional Class: MSXML2_IXMLDOMNode
Then it gives error
MSXML2_DOMDocument: selectSingleNode (parameter MSXML2_IXMLDOMElement)
MSXML2_IXMLDOMElement: appendChild (MSXML2_IXMLDOMElement: cSubElement)
MSXML2_IXMLDOMNodeList: PropGetitem
and some others
How should I do so that it does not error, and everything that I was using continues to work, and also the "Microsoft XML, v6.0.apl" library (without renaming the classes)
Attached the use case.
Thanks !!!
MSXML2_IXMLDOMElement / MSXML2_IXMLDOMNode: Function argument does not match declared data type
MSXML2_IXMLDOMElement / MSXML2_IXMLDOMNode: Function argument does not match declared data type
You do not have the required permissions to view the files attached to this post.
-
- Founder/Site Admin
- Posts: 3437
- Joined: 24 Feb 2017, 09:12
- Location: Gouda, The Netherlands
Re: MSXML2_IXMLDOMElement / MSXML2_IXMLDOMNode: Function argument does not match declared data type
The "old" Lubos Vnuk sample uses manual changes to the XML library to get the sample working.
For example, the class
And the class
I recommend not to mix the Vnuk library and the newly generated Microsoft XML, v6.0.apl.
Use the Microsoft XML, v6.0.apl and adapt the sample to only use the classes from that library.
The function
For example, the class
MSXML2_IXMLDOMDocument2
is derived from MSXML2_IXMLDOMNode
.And the class
MSXML2_IXMLDOMElement
is derived from MSXML2_IXMLDOMNode
.I recommend not to mix the Vnuk library and the newly generated Microsoft XML, v6.0.apl.
Use the Microsoft XML, v6.0.apl and adapt the sample to only use the classes from that library.
The function
selectSingleNode
needs as second parameter a MSXML2_IXMLDOMNode
object and not a MSXML2_IXMLDOMElement
object.Regards,
Dave Rabelink
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
Dave Rabelink
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
Re: MSXML2_IXMLDOMElement / MSXML2_IXMLDOMNode: Function argument does not match declared data type
Hi Dave,
Now I understand.
I really appreciate your answer.
Thanks !!!
Now I understand.
I really appreciate your answer.
Thanks !!!
Re: MSXML2_IXMLDOMElement / MSXML2_IXMLDOMNode: Function argument does not match declared data type
hello,
Can you shared an example how to serialize/deserialize the response?
Can you shared an example how to serialize/deserialize the response?
Who is online
Users browsing this forum: No registered users and 1 guest