VB.NET : s'authentifier sur un webserice ws-security
Bonjour,
j'ai écumé le net pour comprendre comment s'authentifier sur un webservice ws-security, mais en vain! quelqu'un pourrait-il m'expliquer svp ?
Un grand merci !
voici mon code :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
|
Dim service As New LeWebService.WebServiceSystemeUImplService
Dim enregistrementOK As New LeWebService.PlanificationResponse
Dim monTableau(5) As LeWebservice.PlanificationType
'[....]
'on appel le WS
service.Credentials = New System.Net.NetworkCredential("LOGIN","PWD")
enregistrementOK = service.planificationProcess (monTableau) |
et j'ai un message d'erreur du style
Citation:
System.Web.Services.Protocols.SoapHeaderException: These policy alternatives can not be satisfied:
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}SupportingTokens
{http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702}UsernameToken
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)