Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Trying to send XML document via XMLHTTP Open and Send methods >Thread Next - Re: Trying to send XML document via XMLHTTP Open and Send methods Re: Trying to send XML document via XMLHTTP Open and Send methodsTo: NULL Date: 9/25/2009 4:27:00 PM Bob Alston wrote: > 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" <snip> > </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 <snip> > Call xmlhttp.send(XMLConnectString) > <snip> > The error line is: Call 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 = 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 | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
