Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with XML
Message
From
05/02/2001 20:03:34
 
 
To
05/02/2001 18:17:58
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00472731
Message ID:
00472753
Views:
21
>I am using the following code in a program to send an XML message to a URL:
>
>
> ** Create the XmlHTTP Object.
> objHTTP = CREATEOBJECT("Microsoft.XMLHTTP.1")
> objHTTP.Open( "POST", tcUrl, .F. )
> objHTTP.SetRequestHeader( "Content-type", "text/xml" )
> objHTTP.Send(tcXmlMsg)
>
>Through validation routines I know for a fact that the URL (tcURL) and the XML message (tcXmlMsg) are valid. However, when the program hits the "objHTTP.Send(tcXmlMsg)" portion of the code, I get a "OLE IDispatch exception code 0 from ?: Bad variable type."
>


I have similar code to the above running and working fine. The only differences in my code and yours:

ProgID is Microsoft.XMLHTTP (shouldn't make a difference)
and I didn't explicitly set the content-type.

What happens if you taker out the SetRequestHeader line?
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform