Wednesday, March 7, 2012

Call Soap SqlXML soap webservice

I setup a soap webservice using sqlxml 3.0 on our IIS server, I can
consume the webservice via "dotNET" but I am having a heck of a time
trying to make a call out of a vba project. Currently I do not have
the time to develope a new interface all in dotNET, thus the my need to
try and post to the soap object from Access2003... another idea is to
shell out to the vb.net app where I have the webservice working ... :|
Dim http As Object
Set http = CreateObject("Microsoft.XMLHTTP")
http.Open "POST", "http://localhost/ws/report", False
Call http.send("<SR =TEST /> ")
Debug.Print http.responseText
Set http = Nothing
my response for this is:
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:sqltypes='http://schemas.microsoft.com/SQLServer/2001/12/SOAP/types'
xmlns:sqlmessage='http://schemas.microsoft.com/SQLServer/2001/12/SOAP/types/SqlMessage'
xmlns:sqlresultstream='http://schemas.microsoft.com/SQLServer/2001/12/SOAP/types/SqlResultStream'>
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Client</faultcode>
<faultstring>Incorrectly formatted SOAP request</faultstring>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
SOAP is a message protocol in XML form that you can send over HTTP. Below
you tried to send an XML only over HTTP (which you can do if your server
knows what to do with it). So if you want to avoid developing a new
interface, the easiest would probably be to create the SOAP message that you
want to send in your VB code (look at the message that is sent from the
VB.Net app or the SOAP 1.0 spec for details on what the SOAP message format
needs to look like).
Best regards
Michael
<fhtapia@.gmail.com> wrote in message
news:1130949535.378275.277320@.f14g2000cwb.googlegr oups.com...
>I setup a soap webservice using sqlxml 3.0 on our IIS server, I can
> consume the webservice via "dotNET" but I am having a heck of a time
> trying to make a call out of a vba project. Currently I do not have
> the time to develope a new interface all in dotNET, thus the my need to
> try and post to the soap object from Access2003... another idea is to
> shell out to the vb.net app where I have the webservice working ... :|
> Dim http As Object
> Set http = CreateObject("Microsoft.XMLHTTP")
> http.Open "POST", "http://localhost/ws/report", False
> Call http.send("<SR =TEST /> ")
> Debug.Print http.responseText
> Set http = Nothing
> my response for this is:
> xmlns:xsd='http://www.w3.org/2001/XMLSchema'
> xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
> xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'
> xmlns:sqltypes='http://schemas.microsoft.com/SQLServer/2001/12/SOAP/types'
> xmlns:sqlmessage='http://schemas.microsoft.com/SQLServer/2001/12/SOAP/types/SqlMessage'
> xmlns:sqlresultstream='http://schemas.microsoft.com/SQLServer/2001/12/SOAP/types/SqlResultStream'>
> <SOAP-ENV:Body>
> <SOAP-ENV:Fault>
> <faultcode>SOAP-ENV:Client</faultcode>
> <faultstring>Incorrectly formatted SOAP request</faultstring>
> </SOAP-ENV:Fault>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
|||Michael,
Thanks for your help on this, so what I need is a soap envelope... I
wish I could have ran into this documentation earlier on, I also
downloaded the "soap sdk" and utilized the trace utility in order to
capture my call and get the correct soap envelop as used by dotNet here
is my variation
request = "<?xml version='1.0' encoding='UTF-8' standalone='no'?>" &
_
"<SOAP-ENV:Envelope
xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>" & _
" <SOAP-ENV:Body>" & _
" <SR xmlns='http://Localhost/ws/Report'>" & _
" <XmlReport>'" & strXML & "'</XmlReport>" & _
" </SR>" & _
" </SOAP-ENV:Body>" & _
"</SOAP-ENV:Envelope>"
|||Glad to be of help.
Michael
"seeCoolGuy" <fhtapia@.gmail.com> wrote in message
news:1131046410.373083.163320@.g47g2000cwa.googlegr oups.com...
> Michael,
> Thanks for your help on this, so what I need is a soap envelope... I
> wish I could have ran into this documentation earlier on, I also
> downloaded the "soap sdk" and utilized the trace utility in order to
> capture my call and get the correct soap envelop as used by dotNet here
> is my variation
> request = "<?xml version='1.0' encoding='UTF-8' standalone='no'?>" &
> _
> "<SOAP-ENV:Envelope
> xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>" & _
> " <SOAP-ENV:Body>" & _
> " <SR xmlns='http://Localhost/ws/Report'>" & _
> " <XmlReport>'" & strXML & "'</XmlReport>" & _
> " </SR>" & _
> " </SOAP-ENV:Body>" & _
> "</SOAP-ENV:Envelope>"
>

No comments:

Post a Comment