Hi,
I search for a solution for the following problem.
I consume a webservices via SOAP with the xmlhttprequest ('Microsoft XML, v6.0'.XMLHTTP60). The output, the answer of the webservice, of the responseXML-function is a complete SOAP-Message with the xml-message inside the body.
But, how can I extract this body from the hole SOAP to work with the xml-answer itselfs? I have the problem, that I cannot separate the xml from the soap with the MSXMLDom to have this xml in a node... So it is not possible to get the values of the other nodes...
Does anyone did somethink like that?
Thank´s
Mathias
0
Comments
Here is what i'm trying:
In my case the result from the webservice is a full xml document, and when i try to call the [CurrNode.text] I get the error 'The length of the string exceeds the size of the string buffer.'
And as I just found that this error can be solved using this http://www.mibuso.com/forum/viewtopic.php?t=13161
This should work for you as it does for me.
/dog
The answers from the webservices are much longer...
I hoped, that there is a possibility like a function in the msxmldom, which can separate the content from the soap-information automaticly, as you tried it.
Otherwise it has do be possible to get the node <content>xml-message</content> within the xml-data. And here I have the problem, that there is a namespace prefix for the hole document like:
<nsprefix:nodename>
So you have do call the function selectsinglenode with a prefix to get the node like:
xmldomnode1 := xmldomenode.selectsinglenode('nodename'), but right is something like that
xmldomnode1 := xmldomenode.selectsinglenode('prefix:nodename'), but this doesn´t work too, because of the missing prefix. So I tried to set a prefix to the xmldomdoc, from which the node is a child with:
XMLDomDoc.setProperty('',''); but this doesn´t work too...
Any ideas?
Thank´s
Mathias
RIS Plus, LLC
Mathias...
Write a wrapper dll file.
Write the xml doc into file and read the file.
xmldom.save('c:\temp.xml');
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
RIS Plus, LLC
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n
that are good ideas, and I tried all these before, but nothing works correct. Interesting is the "saving to file" - method. If you save the domdoc.element to a file and this as the textformat, than you are able to get the content from the soap. With the saving and the loading into the domdoc after that, it is possible to read the content and this as literal, and it works for short texts, but not for documents ...
But this is not a solution for the using of a webservice, because the idea is, to go away from the saving and work with the domdoc anytime in the navisionobjects. So I tried the streammethod, which doesn´t work (as ara3n mentioned) because the known problem.
Now I go from node to node to get the content, but at the end I´ll have the encoding problem. Do anyone have a new Idea?
I think that the import is possible, because the "dirty" way with the saving works...
Mathias
Not too sure if you still have interest with the matter but you can visit my blog article below:
http://mibuso.com/blogs/mandyk/2009/06/ ... xml-format
In short, I have developed COM wrapper dll to extract and upload big value of XML node to the Stream data type.
Cheers
You should use xmlTextNode to read embedded data.
Look at this How to read XML data where all fields in single string ?, Error while sending URL via HTTP POST using XMLHTTP and this Error When Create & Load MSXML DOM Document. topics.
Nav, T-SQL.