Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Trying to send XML document via XMLHTTP Open and Send methods

From: Bob Alston <bobalston@-----.--->
To: NULL
Date: 9/26/2009 7:50:00 AM
On Sep 25, 3:27=A0pm, "Bob Barrows" <reb01...@NOyahoo.SPAMcom> wrote:
> Bob Alston wrote:
> > I keep getting the error: =A0-2147024809 =A0(80070057) =A0The parameter=
 is
> > incorrect
>
> > Here is the XML text:
>
> > <?xml version=3D"1.0" encoding=3D"utf-8"?>
> > <soap12:Envelope xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance=
"
> <snip>
> > </soap12:Envelope>
>
> > Here is my VBA code:
>
> > Private Sub Command2_Click()
> > =A0 =A0 Dim XMLConnectString As String
>
> > =A0 =A0 Dim XMLResponseText As String
> > =A0 =A0 Me.Responsetext =3D ""
> > =A0 =A0 XMLConnectString =3D Me.fld
> > =A0 =A0 'Create the xmlhttp object
> <snip>
> > =A0 =A0 Call xmlhttp.send(XMLConnectString)
>
> <snip>
> > The error line is: =A0 =A0Call xmlhttp.send(XMLConnectString)
>
> > Hopefully this is something simple.
>
> Oh wait ... you can't pass a string. You have to pass an xmldocument:
> dim xmlSend as msxml2.domdocument
> set xmlsend =3D new msxml2.domdocument
> xmlsend.loadxml XMLConnectString
> Call xmlhttp.send(xmlsend)
>
> I suggest you use "msxml2." rather than "Microsoft." to avoid xml parser
> version issues.
> And it doesn't really make a lot of difference but I only use
> CreateObject in vbscript ... this definietly comes under the heading of
> "personal preference".
>
> --
> HTH,
> Bob Barrows- Hide quoted text -
>
> - Show quoted text -

Thank you.  that was it.  I cannot send a string.
I used

    Dim xmldoc
    Set xmldoc =3D CreateObject("Microsoft.xmldom")
    xmldoc.loadxml (XMLConnectString)

Bob


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