Sabre Java SOAP api integration

876 views Asked by At

I'm new to web-service integration as well as SOAP services. And, I was trying to integrate Sabre SOAP web services using java. On the SabreDevStudio website they provided the sample SOAP request which is format given below.

<RequestPayload>
    <OTA_AirAvailRQ Version="2.2.0"
            xmlns="http://webservices.sabre.com/sabreXML/2011/10"
            xmlns:xs="http://www.w3.org/2001/XMLSchema"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <OriginDestinationInformation>
            <FlightSegment DepartureDateTime="12-21">
                <DestinationLocation LocationCode="DFW"/>
                <OriginLocation LocationCode="HNL"/>
            </FlightSegment>
        </OriginDestinationInformation>
    </OTA_AirAvailRQ>
</RequestPayload>

My Questions are 1, is is this all that is part of the request format?(I mean, did they hide the rest of the XML format purposefully because it was obvious?)

2, If it is so, what should it be..?

3,Somebody please explain the significance of all the three "xmlns" in the code? Which one is the request url and which one is the namespace...?

Thanks in advance.

PS:- It'll be a great help if you can create the equivalent java code for the above request. Please.

1

There are 1 answers

2
Shashwat Sharma On

See, if you're using SOAP based service, this will be appended by it's header part as well. This node can be kept in body part but the header will have to be implemented with having binarytoken freshly created within 30 minutes (Default time to expire a token). This explains your question 1 & 2, and for third question the answer is:- if you'll go through the XSD's, you'll find the use of various xmlns. Better to use marshalling and unmarshalling to consume the services.

If this doesn't give a clear picture, I'll try to give you a sample of already created request.

I hope you're aware of the fact that the first service would be SessionCreateRQ.