简体   繁体   English

Saber Java SOAP API集成

[英]Sabre Java SOAP api integration

I'm new to web-service integration as well as SOAP services. 我是Web服务集成以及SOAP服务的新手。 And, I was trying to integrate Sabre SOAP web services using java. 而且,我试图使用Java集成Saber SOAP Web服务。 On the SabreDevStudio website they provided the sample SOAP request which is format given below. 他们在SabreDevStudio网站上提供了示例SOAP请求,其格式如下。

<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?) 我的问题是1,这是否就是请求格式的全部?(我是说,它们是否有目的地隐藏了XML格式的其余部分,因为它很明显?)

2, If it is so, what should it be..? 2,如果是这样,那应该是什么?

3,Somebody please explain the significance of all the three "xmlns" in the code? 3,有人请解释一下代码中所有三个“ xmlns”的意义吗? 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. PS:-如果可以为上述请求创建等效的Java代码,则将为您提供很大的帮助。 Please. 请。

See, if you're using SOAP based service, this will be appended by it's header part as well. 看,如果您使用的是基于SOAP的服务,则该服务也将由其标头部分附加。 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). 该节点可以保留在正文部分,但标头必须通过在30分钟内(令牌失效的默认时间)重新创建二进制令牌来实现。 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. 这就解释了您的问题1和2,第三个问题的答案是:-如果您要遍历XSD,则会发现使用了各种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. 我希望您知道第一个服务是SessionCreateRQ。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM