Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: Trying to send XML document via XMLHTTP Open and Send methods [Thread Next] Re: Trying to send XML document via XMLHTTP Open and Send methodsTo: 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
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
