Calling Web Service from Access 2003

P

Paul Litwin

In Access 2002 you need to use the Office Web Services toolkit to call a web
service. Does this toolkit work with Access 2003? Or is there a better way?

Thanks,
Paul
 
J

JohnFol

This is not correct for Access 2002 as web services can be called without
any additional toolkits. You can call a web service by making a reference to
the "Microsoft SOAP Type Library"
For example I have a Web Service written in VB.Net that I can call as
follows:

Private Sub Command1_Click()

'Set up the error handler
On Error GoTo handler:


Dim strResponse As String
Dim soapClient As MSSOAPLib.soapClient
Dim strXMLIn As String

strXMLIn = "</MyXML>"

'Create an instance of the SOAP client
Set soapClient = CreateObject("MSSOAP.SoapClient")

'Point the client at the web service
soapClient.mssoapinit
"http://127.127.127.999/WebDir/WebService.asmx?wsdl"

'Assign the result of the call back to a string
strResponse = soapClient.IncomingMessage(strXMLIn)

MsgBox strResponse

Exit Sub
handler:

'Display the error
MsgBox Err & " - " & Error


End Sub

Note the IP is made up, and in this case the .Net component raises a soap
exception that I can trap with the On Error block.


Regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top