SOA Suite 11g 开发指南之九:为物流商配置JMS Queue

声明:该博文来自热爱JAVA,热爱生活。原文地址http://maping930883.blogspot.com/


接上一个实验,订单配送规则已经制定完毕,剩下的就是与物流公司的系统对接了。
我们首先想到的就是把订单信息发送到一个Queue中,这样便于与不同的物流系统对接。我们为每个物流公司建立一个Queue,这样逻辑比较清楚。
这里为了简单,把三个物流商的逻辑Queue都指向了一个物理Queue。
SOA 应用设计如下:





重要步骤说明:
1. 设置JNDI Name:



2. 三种方式查看Queue中的消息
(1)WLS Console
[domain_name]> Services>Messaging>JMS Modules>SOAJMSModule,点击demoFulfillmentQueue>Monitoring,选中 SOAJMSModule!demoFulfillmentQueue,点击 Show Messages。
(2)ConsumeJMSFulfillmentApp
(3)OEMS Send/Receive utlility

3. SOA系列实验至此是一个比较完整的单元,现在我们测试以下三种情况:
(1)<$1000的小订单
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body xmlns:ns1="http://xmlns.oracle.com/ns/order">
<ns1:PurchaseOrder>
<ns1:CustID>1111</ns1:CustID>
<ns1:ID>2121</ns1:ID>
<ns1:productName>Bluetooth Headset</ns1:productName>
<ns1:itemType>Electronics</ns1:itemType>
<ns1:price>49.99</ns1:price>
<ns1:quantity>1</ns1:quantity>
<ns1:status>Initial</ns1:status>
<ns1:ccType>Mastercard</ns1:ccType>
<ns1:ccNumber>8765-8765-8765-8765</ns1:ccNumber>
</ns1:PurchaseOrder>
</soap:Body>
</soap:Envelope>

其订单流程如下:不进入Approve Large Order流程(当然也就无需验证信用卡),直接自动审批通过,写入文件,并把订单信息放入USPS的Queue中。

(2)>$1000 and <$5000的大订单
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body xmlns:ns1="http://xmlns.oracle.com/ns/order">
<ns1:PurchaseOrder>
<ns1:CustID>1111</ns1:CustID>
<ns1:ID>2222</ns1:ID>
<ns1:productName>iPod shuffle</ns1:productName>
<ns1:itemType>Electronics</ns1:itemType>
<ns1:price>145</ns1:price>
<ns1:quantity>30</ns1:quantity>
<ns1:status>Initial</ns1:status>
<ns1:ccType>Mastercard</ns1:ccType>
<ns1:ccNumber>1234-1234-1234-1234</ns1:ccNumber>
</ns1:PurchaseOrder>
</soap:Body>
</soap:Envelope>

其订单流程如下:进入Approve Large Order流程后,验证信用卡,验证通过后,直接自动审批通过,写入文件,并把订单信息放入UPS的Queue中。

(3)>$5000的超大订单

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body xmlns:ns1="http://xmlns.oracle.com/ns/order">
<ns1:PurchaseOrder>
<ns1:CustID>1111</ns1:CustID>
<ns1:ID>1212</ns1:ID>
<ns1:productName>HD TV</ns1:productName>
<ns1:itemType>Electronics</ns1:itemType>
<ns1:price>2250</ns1:price>
<ns1:quantity>10</ns1:quantity>
<ns1:status>Initial</ns1:status>
<ns1:ccType>Mastercard</ns1:ccType>
<ns1:ccNumber>1234-1234-1234-1234</ns1:ccNumber>
</ns1:PurchaseOrder>
</soap:Body>
</soap:Envelope>

其订单流程如下:进入Approve Large Order流程后,验证信用卡,验证通过后,还需人工审批,审批通过后,写入文件,并把订单信息放入FedEx的Queue中。
发贴者 千红一窟 时间: 下午8:20

猜你喜欢

转载自c-life.iteye.com/blog/1617876