Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / February 2006

Tip: Looking for answers? Try searching our database.

WS-security client code in vs 2005

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Karl Prosser - 13 Feb 2006 20:38 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.