Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Trying to send XML document via XMLHTTP Open and Send methods

From: Bob Alston <bobalston@-----.--->
To: 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.


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent