Click here to Skip to main content
13,006,195 members (78,316 online)
Rate this:
Please Sign up or sign in to vote.
Probably a simple question...

I've connected to simple web services before by using Visual Studio to add a web service where it creates all the class information for you. But soon I will need to connect to a secure web service using WS usernametoken (username and password with nonce + created + password).

Will I be able to just add the service as before using the URL?WDSL to get all the class information and then code in the usernametoken when using it or will it require authentication before I can get the WDSL? If I have to authenticate before I get the WDSL will I need to create the service connector manually? -any guidance on that?

Posted 8-May-13 10:01am
jkirkerx 8-May-13 17:07pm
The authentication should be part of the wsdl, you submit it all at once.

Unless you have 2 wsdl files, one for authentication and 1 for processing.
RichWebCode 9-May-13 4:05am
Thanks for the quick reply, confused slightly, how do I put the authentication in the WSDL when I can't get the WSDL info without authentication?

jkirkerx 9-May-13 12:28pm
You usually just download the WSDL file, and add it to your project as a web service I think. project, Add Service Reference, Put the local path in the address bar, click advanced and ok.

If you don't have the WSDL or this is none, then it's probably not a WSDL web service, and you have to code to a API document.

UPS is like that, they have a client access XML request, and a rate request, and you transmit both at the same time, back to back.

In this case, I had to make a XSD file, a schematic of the API that will create the XML for me, and one for the response that will decode or parse the response, so one for request and one for response.

After I created the XSD, I compiled it as a class, using xsd.exe that comes with Visual Stidio.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170628.1 | Last Updated 8 May 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100