Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Trying to send XML document via XMLHTTP Open and Send methods Trying to send XML document via XMLHTTP Open and Send methodsTo: NULL Date: 9/25/2009 12:28:00 PM I keep getting the error: -2147024809 (80070057) The parameter is
incorrect
Here is the XML text:
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://
www.w3.org/2003/05/soap-envelope">
<soap12:Header>
<CMBHSAuthenticationHeader xmlns="http://www.dshs.state.tx.us/
cmbhs/">
<CMBHSUserName>SClinician1</CMBHSUserName>
<CMBHSPassword>D$h$..125</CMBHSPassword>
</CMBHSAuthenticationHeader>
</soap12:Header>
<soap12:Body>
<DownloadDocument xmlns="http://www.dshs.state.tx.us/cmbhs/">
<Parameter>
<ParentOrganizationNbr>2</ParentOrganizationNbr>
<OrganizationNbr>3</OrganizationNbr>
<FromDate>09/10/2009 4:03:11</FromDate>
<ToDate>09/23/2009 10:05:05</ToDate>
<DownloadType>1</DownloadType>
</Parameter>
</DownloadDocument>
</soap12:Body>
</soap12:Envelope>
Here is my VBA code:
Private Sub Command2_Click()
Dim XMLConnectString As String
Dim XMLResponseText As String
Me.Responsetext = ""
XMLConnectString = Me.fld
'Create the xmlhttp object
Dim xmlhttp
Set xmlhttp = CreateObject("Microsoft.XMLHTTP")
'Open a connection and send a request to the server in the form of
an XML fragment
Call xmlhttp.Open("POST", "http://cmbhstrn.dshs.state.tx.us/
cmbhswebservice/service/downloadservice.asmx", False)
Call xmlhttp.send(XMLConnectString)
'Create an xml document object, and load the server's response
Dim xmldoc
Set xmldoc = CreateObject("Microsoft.XMLDOM")
xmldoc.async = False
'Note: the ResponseXml property parses the server's response,
responsetext doesn't
'xmldoc.loadxml (xmlhttp.responsexml)
Me.Responsetext = xmlhttp.Responsetext
Exit Sub
End Sub
The error line is: Call xmlhttp.send(XMLConnectString)
Hopefully this is something simple.
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
