0
我在這個環境中是新的,我想創建我的第一個紅色的應用程序,但我需要一些幫助連接的Web服務馬刀,你能幫我在這個開始的例子?我已經安裝了刀劍在其頁面中配置的Eclipse RCP,但沒有關於如何啓動的想法。我想創建我的第一個紅色的應用程序與軍刀
非常感謝。
我在這個環境中是新的,我想創建我的第一個紅色的應用程序,但我需要一些幫助連接的Web服務馬刀,你能幫我在這個開始的例子?我已經安裝了刀劍在其頁面中配置的Eclipse RCP,但沒有關於如何啓動的想法。我想創建我的第一個紅色的應用程序與軍刀
非常感謝。
我會建議捆綁在RedApp SDK示例文件夾中的com.sabre.redapp.example.cf.sws RedApp。
主要是,爲了使用Sabre WebServices,您將使用RedApp SDK中的通信框架類,它允許您使用服務而不用擔心低級別的通信,也就是說,您的大部分開發工作將是創建並解析XML有效載荷,用java消費的服務是非常簡單的:
// Set actionName to the correct Sabre Web Services action name
String actionName = "OTA_AirAvailLLSRQ***";
// Retrieve a reference to ISRWCommunication
ISRWCommunication com = Activator.getDefault().getServiceReference(ISRWCommunication.class);
// Create the request
SWSRequest request = new SWSRequest();
request.setAction(actionName);
request.setPayload(payload);
// Send the request
SWSServiceClient client = new SWSServiceClient(com);
ClientResponse <SWSResponse> rsp = client.send(request);
// Retrieve the response
if (rsp.isSuccess()) {
SWSResponse response = rsp.getPayload();
// Response for the sent request
Document responsePayload = response.getResponse();
}
***不要忘了對授權文件redapp.xml服務利用狀況:
<Authorization name="com.sabre.edge.cf.sws.SWS" metric="tpm">
<Action name="OTA_AirAvailLLSRQ" threshold="3" />
</Authorization>