![]() ![]() ![]() ![]() ![]() ![]() |
This chapter describes how to create proxy services for external clients.
The PurchaseOrderProcessingService proxy invokes the PurchaseOrderFulfillmentJPD via the PurchaseOrderFulfillmentJPD business service endpoint for fulfilling the purchase order. This chapter discusses the following topics:
This section describes how to create PurchaseOrderProcessService proxy service from the Service Access folder in Project Explorer.
PurchaseOrderProcessingService
as the File Name.The WSDL Web Service and ports are selected. Click Next. The Transport Configuration dialog box is displayed.
http
, and the Endpoint URI is /ServiceAccess/ProxyServices/PurchaseOrderProcessingService
, as shown in Figure 6-3.Note: | The security context is propagated to the WLI layer (PurchaseOrderFulfillmentJPD), to ALSB (ServiceProviderAccessProxy), to the external systems (inventory and credit card systems), so that no authentication is required while accessing the external systems from the PurchaseOrderFulfillmentJPD. |
Figure 6-4 shows the Create a Proxy - HTTP Transport Configuration dialog box.
After you have created the proxy service, you must design the pipeline for the proxy.
To design the proxy service pipeline, switch to the ALSB perspective. In the Design view of the PurchaseOrdeProcessingService.proxy, click Message Flow. The Design Palette is activated.
Figure 6-5 shows the Design Palette in ALSB perspective.
For more information about ALSB Design Palette, see Using the AquaLogic Service Bus IDE.
Note: | A PipelinePair node consists of a Request pipeline and a Response pipeline. Pipelines can include one or more stages, which in turn include actions. |
Process Purchase Order
.Select fulfillPurchaseOrder from the Invoking drop-down list. The Properties tab of the Publish node is as shown in Figure 6-7.
<soap:Body xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:open="http://www.openuri.org/" xmlns:pur="http://www.openuri.org/PurchaseOrder">
<open:orderId>{$body/pur:PurchaseOrder/pur:PurchaseOrderId/text()}</open:orderId>
{$body/pur:PurchaseOrder/pur:OrderLineItemInfo/*}
You have now created the message flow to publish to PurchaseOrderFulfillmentJPDBS.biz
. Figure 6-9 shows the message flow.
Note: | Alternately, the expressions in the XQuery/XSLT Expression Editor can be dragged and dropped into the Expression tab. Figure 6-8 illustrates an example: |
<SOAP-ENV:Body xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<ns0:ProcessPurchaseOrderResponse xmlns:ns0="http://www.openuri.org/"/>
</SOAP-ENV:Body>
The PurchaseOrderFulfillmentJPD invokes the external systems: inventory and credit card systems, and publishes these results to the message broker channels.
The PurchaseOrderAggregatorService aggregates these results and invokes the shipping service external system.
After creating the PurchaseOrderProcessingService.proxy, you can verify whether the PurchaseOrderProcessingProxy has invoked the PurchaseOrderFulfillmentJPD.
You can use the TestClient from the UseCaseWeb/src/alint.client.test to test the proxy. Right-click TestClient.java, select Run As > Run on Server.
To check whether the external services: inventory service, credit card service are invoked, see the debug messages on the server console, which are displayed as shown in Figure 6-10. These messages are displayed only if the PurchaseOrderProcessingService.proxy has invoked the external services.
In this chapter, you invoked the PurchaseOrderFulfillmentJPD business service endpoint by using the PurchaseOrderProcessService proxy service. In Aggregating the Purchase Order Fulfillment Results, you will design the PurchaseOrderAggregatorJPD, which aggregates the results of the order fulfillment and handle the order shipment. You will then modify the message flow of the PurchaseOrderProcessingService proxy to invoke the PurchaseOrderAggregatorJPD.
![]() ![]() ![]() |