Travelport / travelport-uapi-tutorial

The travelport-uapi-tutorial is a Java project for Universal API that will help you connect and code a standard workflow including Air and Hotel.
45 stars 34 forks source link

Username and password in xml request #288

Open srikanthtravel opened 7 years ago

srikanthtravel commented 7 years ago

Hi am developing worldspan flights website using asp.net c# i have consumed the web services of air now i wanted to know where can i include username and password in xml LowFareSearchReq while sending XML https request to your API.

NirandaG commented 7 years ago

Hi srikanthtravel,

After you add the WebServiceReferrence for the LowFareSearchRequest, you may be able to send the username and password using the created object. AirLowFareSearchPortTypeClient client = new AirLowFareSearchPortTypeClient("AirLowFareSearchPort", WsdlService.AIR_ENDPOINT); client.ClientCredentials.UserName.UserName = "Your username";

Thank you, B.Rgds, Niranda

vivekjyotipramanik commented 7 years ago

Hi srikanthtravel,

You can also add the credentials in the app.config for global use through out the application. Please let us know how it goes. Thanks.

https://github.com/Travelport/travelport-uapi-tutorial-c-sharp/blob/master/ConsoleApplication1/ConsoleApplication1/App.config