Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Credentials object
Message
De
15/04/2008 16:25:17
 
 
À
15/04/2008 12:04:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Web Services
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01310744
Message ID:
01310907
Vues:
14
>I am trying to connect to a Web Service, I have the VB code but can't find out how to do the equivelant of a .Net "Credentials" object. Can anyone help?
>
>VB Codes is:
>
>Dim strWebURI As String = "http://www.autotask.net/atservices/1.1/atws.asmx"
>Dim myService As New WebReference.ATWS
>myService.Url = strWebURI
>Dim cred As New System.Net.NetworkCredential("myUserName@domain.com", "myPassword")
>Dim credCache As New System.Net.CredentialCache
>credCache.Add(New Uri(myService.Url), "Basic", cred)
>myService.Credentials = credCache
>
>I've tried using the MSSoap object and also wwSoap (This has properties for Username & password) but whatever I do I get a 401 error returned.

For MSSOAP:
  loWS = .oSoap.SetUpClient(......)
  loWS.ConnectorProperty("AuthUser") = "username"
  loWS.ConnectorProperty("AuthPassword") = "password"
If you need credentials to perform the init itself then you can embed the username and password in the URL: e.g:
"http://username:password@url.asmx?wsdl"
HTH,
Viv
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform