>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