{"id":2552,"date":"2011-06-16T09:40:40","date_gmt":"2011-06-16T14:40:40","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=2552"},"modified":"2015-04-17T13:54:01","modified_gmt":"2015-04-17T18:54:01","slug":"soa-11g-tutorial-jms-adapter","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=2552","title":{"rendered":"SOA 11g Tutorial: JMS Adapter"},"content":{"rendered":"<div class='toc wptoc'>\n<h2>Contents<\/h2>\n<ol class='toc-odd level-1'>\n\t<li>\n\t\t<a href=\"#JMS_Adapter\">JMS Adapter<\/a>\n\t\t<ol class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Overview\">Overview<\/a>\n\t\t\t<\/li>\n\t\t<\/ol>\n\t<li>\n\t\t<a href=\"#Add_JMS_Adapter_to_Composite\">Add JMS Adapter to Composite<\/a>\n\t\t<ol class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Add_USPS_JMS_Adapter\">Add USPS JMS Adapter<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Add_USPS_JMS_Adapter_1\">Add USPS JMS Adapter<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Add_USPS_JMS_Adapter_2\">Add USPS JMS Adapter<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Wire_FulfillmentProcess_and_JMS_Adapters\">Wire FulfillmentProcess and JMS Adapters<\/a>\n\t\t\t<\/li>\n\t\t<\/ol>\n\t<li>\n\t\t<a href=\"#Invoking_Services_from_BPEL\">Invoking Services from BPEL<\/a>\n\t\t<ol class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Setup_USPS_Case\">Setup USPS Case<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Setup_USPS_Case_1\">Setup USPS Case<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Setup_USPS_Case_2\">Setup USPS Case<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Invoke_Services\">Invoke Services<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Assign_Input_Variables\">Assign Input Variables<\/a>\n\t\t\t<\/li>\n\t\t<\/ol>\n\t<li>\n\t\t<a href=\"#Deploy\">Deploy<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Test\">Test<\/a>\n\t\t<ol class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#View_JMS_Message\">View JMS Message<\/a>\n\t\t\t<\/li>\n<\/ol>\n<\/ol>\n<\/ol>\n<\/div>\n<div class='wptoc-end'>&nbsp;<\/div>\n<p>This is part of the <a href=\"?p=1924\">Oracle SOA11g hands on tutorials<\/a>.<\/p>\n<span id=\"JMS_Adapter\"><h2>JMS Adapter<\/h2><\/span>\n<span id=\"Overview\"><h3>Overview<\/h3><\/span>\n<p>* Supports both one-way and request-response interactions<br \/>\n* Supports byte, text, map messages<br \/>\n* XA-capable<br \/>\n* Certified with most JMS providers<br \/>\n&#8211; Oracle WebLogic JMS<br \/>\n&#8211; Oracle AQ JMS<br \/>\n&#8211; TIBCO EMS<br \/>\n&#8211; IBM WebSphere MQSeries<br \/>\n&#8211; Apache JMS<br \/>\n&#8211; Actice MQ<\/p>\n<span id=\"Add_JMS_Adapter_to_Composite\"><h2>Add JMS Adapter to Composite<\/h2><\/span>\n<span id=\"Add_USPS_JMS_Adapter\"><h3>Add USPS JMS Adapter<\/h3><\/span>\n<p>* Open composite.xml<br \/>\n* Drag and drop a JMS Adapter to the External References swim lane<br \/>\n* Name the service: JMS_USPS, click Next<br \/>\n* On JMS Provider dialog, select OEMS -> Oracle Weblogic JMS, click Next<br \/>\n* On Service Connection dialog, select MyAppServerConnection, click Next<br \/>\n* On Adapter Interface dialog, select Define from operation and schema (specified later), click Next<br \/>\n* On Operation dialog, select Product Message, click Next<br \/>\n* On Produce Operation Parameters,<br \/>\n&#8211; browse Destination Name (Queue) and select demoFulfillmentQueue<br \/>\n&#8211; specify JNDI Name: eis\/Queue\/demo<br \/>\n&#8211; click Next<br \/>\n* On messages dialog,<br \/>\n&#8211; click the magnifying glass and browse to Fulfillment.xsd -> Filfillment, click OK<br \/>\n&#8211; click Next<br \/>\n* Click Finish<\/p>\n<span id=\"Add_USPS_JMS_Adapter_1\"><h3>Add USPS JMS Adapter<\/h3><\/span>\n<p>* Repeat and name the service: JMS_UPS, click Next<\/p>\n<span id=\"Add_USPS_JMS_Adapter_2\"><h3>Add USPS JMS Adapter<\/h3><\/span>\n<p>* Repeat and name the service: JMS_FedEx, click Next<\/p>\n<span id=\"Wire_FulfillmentProcess_and_JMS_Adapters\"><h3>Wire FulfillmentProcess and JMS Adapters<\/h3><\/span>\n<p>* Drag wires to connect FulfillmentProcess to each of the three JMS Adapters<\/p>\n<p>* Save All<\/p>\n<span id=\"Invoking_Services_from_BPEL\"><h2>Invoking Services from BPEL<\/h2><\/span>\n<p>* Double click FulfillmentProcess to open FulfillmentProcess.bpel editor<br \/>\n* Drag and drop a Switch activity below the Business Rule icon<br \/>\n* Right click the switch icon and select Add switch case<br \/>\n* Repeat to add another switch case<br \/>\n* Right click otherwise switch lane and select delete<\/p>\n<span id=\"Setup_USPS_Case\"><h3>Setup USPS Case<\/h3><\/span>\n<p>* Click first condition, set the name to USPS<br \/>\n* Select Expression Builder icon, set condition expression to:<\/p>\n<pre lang=\"xml\">\r\nbpws:getVariableData('outputVariable','payload','\/ns2:CarrierSelection\/ns2:carrier') = 'USPS'\r\n<\/pre>\n<span id=\"Setup_USPS_Case_1\"><h3>Setup USPS Case<\/h3><\/span>\n<p>* Click first condition, set the name to UPS<br \/>\n* Select Expression Builder icon, set condition expression to:<\/p>\n<pre lang=\"xml\">\r\nbpws:getVariableData('outputVariable','payload','\/ns2:CarrierSelection\/ns2:carrier') = 'UPS'\r\n<\/pre>\n<span id=\"Setup_USPS_Case_2\"><h3>Setup USPS Case<\/h3><\/span>\n<p>* Click first condition, set the name to FedEx<br \/>\n* Select Expression Builder icon, set condition expression to:<\/p>\n<pre lang=\"xml\">\r\nbpws:getVariableData('outputVariable','payload','\/ns2:CarrierSelection\/ns2:carrier') = 'FedEx'\r\n<\/pre>\n<span id=\"Invoke_Services\"><h3>Invoke Services<\/h3><\/span>\n<p>* Drag and drop an Invoke activity onto USPS switch lane<br \/>\n* Drag a wire from newly added Invoke to JMS_USPS partner link<br \/>\n&#8211; Name it Invoke_USPS<br \/>\n&#8211; Create an Input variable using default value<br \/>\n&#8211; Click OK<br \/>\n* Repeat for UPS and FedEx switches<\/p>\n<span id=\"Assign_Input_Variables\"><h3>Assign Input Variables<\/h3><\/span>\n<p>* Drag and drop an Assign activity into the first switch case above the Invoke acitivity<br \/>\n* Double click Assign activity<br \/>\n&#8211; Create a copy operation<br \/>\nFrom<br \/>\ninputVariable\/payload\/\/ns2:Fulfillment<br \/>\nTo<br \/>\nInvoke_USPS_produce_Message_InputVariable\/body\/\/ms2:Fulfillment<br \/>\n&#8211; Click OK<br \/>\n* Repeat for the other two services<br \/>\n* Save all<\/p>\n<span id=\"Deploy\"><h2>Deploy<\/h2><\/span>\n<p>* Deploy as usual<\/p>\n<span id=\"Test\"><h2>Test<\/h2><\/span>\n<p>* Test small, large, extra large orders as in <a href=\"?p=2070\">business rules post<\/a><\/p>\n<span id=\"View_JMS_Message\"><h3>View JMS Message<\/h3><\/span>\n<p>* Login WebLogic Admin Console<br \/>\n* On upper left Domain Structure pane, click Services -> Messaging -> JMS Modules<br \/>\n* On right pane, click SOA JMSModule<br \/>\n* Click demoFulfillmentQueue<br \/>\n* Click Monitoring tab<br \/>\n* Check checkbox for the message you want to view and click Show Messages button<br \/>\n* Click ID:xxx to view the message details<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is part of the Oracle SOA11g hands on tutorials. JMS Adapter Overview * Supports both one-way and request-response interactions * Supports byte, text, map messages * XA-capable * Certified with most JMS providers &#8211; Oracle WebLogic JMS &#8211; Oracle &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=2552\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[100],"tags":[],"class_list":["post-2552","post","type-post","status-publish","format-standard","hentry","category-soa11g"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8cRUO-Fa","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/2552","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2552"}],"version-history":[{"count":7,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/2552\/revisions"}],"predecessor-version":[{"id":10649,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/2552\/revisions\/10649"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2552"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2552"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2552"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}