Solved

Sending XML via ASP page - msxml3.dll error 'c00ce56d'

Posted on 2004-08-12
3
2,431 Views
Last Modified: 2012-06-21
I get the following error when trying to send XML to a remote server

msxml3.dll error 'c00ce56d'

System error: -1072896659.

Here is the function that is causing the error

private function xmlsend(url, docSubmit)
Set poster = Server.CreateObject("MSXML2.ServerXMLHTTP")
poster.open "POST", url, false
poster.setRequestHeader "CONTENT_TYPE", "text/xml"
poster.send docSubmit
Set NewDoc = server.createobject("Microsoft.XMLDOM")
newDoc.ValidateOnParse= True
newDoc.LoadXML(poster.responseTEXT)
Set XMLSend = NewDoc
Set poster = Nothing
end function

I bulid a string line by line containing the XML info then I use the following code

Set SendDoc = server.createobject("Microsoft.XMLDOM")
SendDoc.ValidateOnParse= True
SendDoc.LoadXML(xmlString)

'Set the URL of the receiver
sURL = "https://epayhipvar.paymentech.net

'Call the XML Send function (defined below)
set NewDoc = xmlSend (sURL, SendDoc)'xmlString)

This obviously calls the function above.

This is my first attempt at sending XML and I am not sure where to begin

0
Comment
Question by:abishome
3 Comments
 
LVL 26

Accepted Solution

by:
rdcpro earned 250 total points
ID: 11786473
Don't use "Microsoft.XMLDOM" as this points to the old 1998 parser.  Use

Set NewDoc = server.createobject("Msxml2.DomDocument")

and

Set SendDoc = server.createobject("Msxml2.DomDocument")

Also, avoid strings wherever possible, as these often introduce encoding problems.  Try to use the stream interface of the XML document object as in:

newDoc.Load(poster.responseBody)

or even simply do something like:

dim NewDoc
set NewDoc = poster.responseXML


But in your case, I think your XML string is not well formed.  Write the responseText out to the console or the web page or whatever, and examine it closely.  You can also look at the parseError object (highly recommended) to see what's up.
 
Regards,
Mike Sharp
0
 
LVL 1

Author Comment

by:abishome
ID: 11787320
It was a parser error and the clue about the parseError object helped me locate the parse error

Thanks
0
 
LVL 17

Expert Comment

by:rstaveley
ID: 13628182
At the risk of being accused of spamming your mailboxes, I'd like to piggy-back this thread to let you know that it directed me to the solution for my problem too.

In a C++ project, which uses the IDispatch just like vbscript, I'd been passing a malformed XML string to Msxml2.DOMDocument.3.0, which I passed to Msxml2.ServerXMLHTTP.3.0 to send. The send method invocation on Msxml2.ServerXMLHTTP.3.0 failed with error code 0xc00ce56d.

Your good advice directed me to check the XML for well-formedness.

Many thanks, rdcpro and abishome.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question