Salve a tutti, ho un problema su cui non so raccapezzarmi. Anticipo
che sono abbastanza nuovo nell'uso dei webservices. Uso VS2008
Questo è il codice che utilizzo per poterlo interrogare:
InterrogazioneBaseService interroga = new InterrogazioneBaseService();
interroga.Credentials = new System.Net.NetworkCredential("utente",
"password");
Il mio problema è che mi restituisce fisso l'errore di token:
"WSEC5075E: No security token found which satisfies any one of
AuthMethods"
Parlando con i tecnici fornitori del WS mi hanno mandato un esempio di
come deve essere fatta la richiesta:
Vi mando la parte incriminata:
<soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/
encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/
ws/2003/06/secext" soapenv:mustUnderstand="1">
<wsse:UsernameToken>
<wsse:Username>xxxx</wsse:Username>
<wsse:Password>xxxxxxxx</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
Testando il WS con SOAPUI ho notato che lo username e la password
devono essere in chiaro.
Avrei bisogno di passare nel post della richiesta username e password
in chiaro. Come posso fare?
Grazie mille per l'aiuto

Rispondi quotando