Passing Credentials to Web Services

F

Francois Houde

Hi all! I have the following problem in Access 2007:

I want to connect to a web services using credentials. At the moment I can
connect to the web services and retrieve data from it. But I can't pass the
user credentials to the web services.

We can do it in VB.Net but we have an application in Access2007 that need to
access the same web services (Don't ask me to convert my Access to VS.Net it
won't be accepted by the client). Any idea on how I can resolve this issue,
if it can be resolved ?

The computer is :
Windows XP
Office 2007 (no toolkit installed)
Visual studio 2005

References added :
MS Office Soap Type Library v3.0

The code in problem :

Public Function test() As Boolean
On Error GoTo test_error

Dim sURL As String
dim result as string
dim soap As SoapClient30

Set soap = New SoapClient30

sUrl = "http://......................asmx?WSDL"

'This works fine
soap.MSSoapInit sURL

'My problem is here. I can't access the web services credentials like in
VB.NET
soap.Credentials = Mylogon

'This works fine
result = soap.FunctionX(XML_FILE, WHAT_TO_LOOK_IN_XML_FILE)

Debug.Print result

Exit Function
test_error:
Debug.Print Err.Number
Debug.Print Err.Description
End Function

Thanks in advance

Francois Houde
 

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