Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Web-Development VB.NET .NET4 , +
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 8-May-13 11:01am
Comments
jkirkerx at 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 at 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 at 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
0 Sergey Alexandrovich Kryukov 520
1 Mathew Soji 335
2 BillWoodruff 260
3 OriginalGriff 215
4 Afzaal Ahmad Zeeshan 188
0 OriginalGriff 6,168
1 Sergey Alexandrovich Kryukov 5,853
2 DamithSL 5,028
3 Manas Bhardwaj 4,539
4 Maciej Los 3,845


Advertise | Privacy | Mobile
Web02 | 2.8.1411019.1 | Last Updated 8 May 2013
Copyright © CodeProject, 1999-2014
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