Click here to Skip to main content
15,893,486 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
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?

Thanks,
Posted
Comments
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?

Thanks,
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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900