Sending Proxy Server Credentials in Apache SOAP

In Apache SOAP, a properties object that contains the proxy server credentials can be sent with each call to Galileo Web Services. See Java Sample Calls for examples of requests with proxy server credentials.

  1. Create a properties (*.props) file with the parameters for the proxy server credentials. For example:

Include the Galileo Web Services authentication credentials. User name and password are assigned by Galileo.

Note: The keys should remain consistent if using the proxy stub from the Galileo Web Services Sample Site.

GWS.user=GalileoUser

GWS.password=GalileoPassword

Include the authentication credentials for the local proxy server.
The
proxyUser and proxyPassword fields can be commented out if the proxy server does not require authentication.

GWS.proxy=localhost

GWS.proxyPort=8000

GWS.proxyUser=localUser

GWS.proxyPassword=localPassword

Define the Web Service locations. These examples point to the test locations for the XML Select, Reservation Builder eBL, and Flight Information eBL.

XWS.endpoint=https://americas.webservices.travelport.com/
B2BGateway/service/XMLSelect

BWS.endpoint=https://americas.webservices.travelport.com/
booking/gwsBooking.asmx

FWS.endpoint=https://americas.copy-webservices.travelport.com/B2BGateway/
service/FlightInformation.asmx

A Host Access Profile (HAP) is required to access Reservation Builder eBL.

XWS.profile=HostAccessProfile

For full functionality, Flight Information eBL requires HAPs to both Apollo and Galileo.

FWS.profile1V=ApolloHostAccessProfile

FWS.profile1G=GalileoHostAccessProfile

  1. Use the properties file to load a Properties object (java.util.Properties).

  2. Pass the Properties object into the constructor for each proxy class.

    Note
    : Apache SOAP does not include a tool for generating proxy stubs. Use the sample proxy stub code provided in the Galileo Web Services Sample Site to instantiate proxy classes.

  3. For each call to the Galileo Web Services, include the proxy class with proxy server parameters. In this example, the GWSTest class includes the java.util.Properties object in a call to the Galileo Web Services that cancels a booked trip:

Declare the class.

public class GWSTest

 

{

 

public static void main(String[] argv)

 

{

Load the properties that will be used for all service calls.

java.util.Properties props = new java.util.Properties();

Sample call.

 

Load the properties from the file.

props.load(new java.io.FileInputStream("GWSTest.props"));

Instantiate the Web Service. This example uses the Reservation Builder eBL.

proxy.soap.BookingWSProxy bws = new proxy.soap.BookingWSProxy(props);

A Host Access Profile is required to access Galileo Web Services.

String defaultProfile = props.getProperty("HostAccessProfile");

The record locator for the PNR/Booking File.

String recordLocator = "TEST";

Send the Cancel Trip request. The response is returned as an XML element.

The "P" value indicates that the cancellation request was received from a Passenger.

Element cancelResult =  bws.CancelTrip(defaultProfile, recordLocator, "P");

}

}