![]() ![]() ![]() ![]() ![]() ![]() |
This chapter describes how to publish to PurchaseOrderAggregatorJPD:
The PurchaseOrderProcessingService proxy invokes the PurchaseOrderFulfillment JPD via the PurchaseOrderFulfillmentJPD business service endpoint for fulfilling the order.
This chapter describes how to modify the message flow of the PurchaseOrderProcessing proxy to publish to PurchaseOrderAggregatorJPD.
This section describes how to invoke the PurchaseOrderAggregatorJPD from the Purchase Order Processing Proxy that you created in Creating the PurchaseOrderProcessingService Proxy.
For more information about Invoking PurchaseOrderAggregatorJPD, see Creating Proxy Service to Invoke a JPD.
PurchaseOrderAggregatorJPDBS.biz
. From the Invoking drop-down list, select AggregatePurchaseOrder.<soap:Body xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<AggregatePurchaseOrder xmlns="http://www.openuri.org/" xmlns:pur="http://www.openuri.org/PurchaseOrder">
<orderId>{$body/pur:PurchaseOrder/pur:PurchaseOrderId/text()}</orderId>
{$body/pur:PurchaseOrder/pur:ShippingAddress}
<customerName>{$body/pur:PurchaseOrder/pur:CustomerName/text()}</customerName>
</AggregatePurchaseOrder>
</soap:Body>
You have now described the message flow to publish to PurchaseOrderAggregatorJPDBS.biz
. Figure 8-3 shows the message flow.
The PurchaseOrderAggregatorJPD aggregates the results of the PurchaseOrderFulfillmentJPD and invokes the shipping service external system.
After the Purchase Order is completely processed, a callback is sent to the client using the PurchaseOrderNotificationService.proxy
.
This section describes how to send a callback via ALSB.
PurchaseOrderNotificationServiceJPDBS
, and click Next. http
http://localhost:7001/PurchaseOrderNotificationService
Note: | Remove the default endpoint. In this case it is http://examples.org . |
The PurchaseOrderNotificationJPDBS.biz
is created in Project Explorer. Figure 8-5 shows the business service in Design view, and in Project Explorer.
PurchaseOrderNotificationService
as the File Name. Click Next. jms
jms://localhost:7001/weblogic.jms.XAConnectionFactory/PurchaseOrderNotificationServiceRequest
Note: | Ensure that the Endpoint URI location matches with the Callback Proxy Location in the JPD Transport Configuration of PurchaseOrderAggregatorJPDBS.biz. |
Click Next. Figure 8-8 shows the Transport Configuration dialog box.
jms://localhost:7001/weblogic.jms.XAConnectionFactory/PurchaseOrderNotificationServiceResponse
. Click Next. Figure 8-8 shows the JMS Transport Configuration dialog box.PurchaseOrderNotificationProxy is created in Project Explorer, as shown in Figure 8-9.
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. |
PurchaseOrderResponse
.$inbound/ctx:transport/ctx:request/tp:headers/tp:user-header[2]/@value
Enter Variable as callbackURL
.
As discussed in Listing Notes:, the original callback location will be sent as a JMS property namely BEA_WLI_Target_Callback_Location by the JPD transport. We are retrieving it and will be using it to configure the outgoing business service for sending the callback to the actual JPD callback client in the next steps
Expression: <ctx:uri>{$callbackURL}</ctx:uri>
Figure 8-10 shows the values in the Insert Node.
<soap:Body xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<pur:PurchaseOrderStatus xmlns:pur="http://www.openuri.org/PurchaseOrder">
{$body/*}
</pur:PurchaseOrderStatus>
</soap:Body>
The callback notification is sent to the client via PurchaseOrderNotificationServiceBS.biz
. Figure 8-11 shows the message flow of callback.
Right-click on the TestClient.java file in the Package Explorer, select Run As > Run on Server to test the application as described in Testing the Application.
You can review PurchaseOrderFulfillmentJPD to verify that you have not provided any username and password to accessing the external services. Do the following to verify security context propagation:
The client is authenticated using the basic auth
method when the PurchaseOrderProcessingProxy
is invoked and the security context is propagated to the WLI layer (PurchaseOrderFulfillmentJPD) to ALSB to the external systems (inventory and credit card systems).
![]() ![]() ![]() |