i had posted this in the general webservices , but think this location may be
a better place, so sorry for the 'cross post', but it is a different week.
am having problems setting the 'credentials' to call a webservice..
i have the WSDL and successfully have created a proxy , and the right code
to call the webservice, other than setting the credentials..
i am using vs 2005 with dotnet framework 2.0
according to their docs the webservice (made by a third party) expects
authentication as below:
A WS-Security Username Token with password in clear text
<wsse:UsernameToken>
…….
</wsse:UsernameToken>
to which i can create a string such as :
<wsse:UsernameToken>
<wsse:Username>thelogin</wsse:Username>
<wsse:Password Type""wsse:PasswordText"">thepassword</wsse:Password>
</wsse:UsernameToken>
however i don't have a clue how to assign the above to the webservice proxy.
In my searches here (and some articles on codeproject, and msdn).. people use
a class called usernameToken to create the token.. a class i can't find
anywhere, and then adding them through a property of the proxy called
RequestSoapContext
however my proxy doesn't have anything like RequestSoapContext and i can't
find anything in my MSDN library about it either..
this is something that should be simple, but i've spent far too many hours
trying to find out the way to connect these simple dots.
please help.
Karl
Pablo Cibraro - 14 Feb 2006 13:12 GMT
Hi Karl,
The proxy created by Visual Studio by means of your WSDL is useless in this
case.
You need to use a proxy specially created to be used with WSE. You can
create that proxy using the tool "WseWsdl3.exe" provided by WSE. (For normal
web services, the proxy type must be "webclient").
Once you created the proxy using that tool, you will able to see a property
RequestSoapContext that you can use to set the Username token credential.
Regards,
Pablo Cibraro
http://weblogs.asp.net/cibrax
http://www.lagash.com
>i had posted this in the general webservices , but think this location may
>be
[quoted text clipped - 38 lines]
>
> Karl