{"id":2062,"date":"2011-05-12T23:18:03","date_gmt":"2011-05-13T04:18:03","guid":{"rendered":"http:\/\/jianmingli.com\/wp\/?p=2062"},"modified":"2015-04-17T13:57:43","modified_gmt":"2015-04-17T18:57:43","slug":"soa-11g-tutorial-credit-verification-app","status":"publish","type":"post","link":"https:\/\/jianmingli.com\/wp\/?p=2062","title":{"rendered":"SOA 11g Tutorial: Credit Verification App"},"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=\"#Create_a_New_SOA_Application\">Create a New SOA Application<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Add_DBAdapter\">Add DBAdapter<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Add_Mediator_Component\">Add Mediator Component<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Add_Outbound_Web_Service\">Add Outbound Web Service<\/a>\n\t\t<ol class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Create_WSDL\">Create WSDL<\/a>\n\t\t\t<\/li>\n\t\t<\/ol>\n\t<li>\n\t\t<a href=\"#Wire_Web_Service_Mediator_and_DBAdapter\">Wire Web Service, Mediator and DBAdapter<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Add_Transformation_Steps\">Add Transformation Steps<\/a>\n\t\t<ol class='toc-even level-2'>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Input_Mapper\">Input Mapper<\/a>\n\t\t\t<\/li>\n\t\t\t<li>\n\t\t\t\t<a href=\"#Reply_Mapper\">Reply Mapper<\/a>\n\t\t\t<\/li>\n\t\t<\/ol>\n\t<li>\n\t\t<a href=\"#Create_a_Server_Connection\">Create a Server Connection<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Deploy\">Deploy<\/a>\n\t<\/li>\n\t<li>\n\t\t<a href=\"#Testing\">Testing<\/a>\n\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=\"Create_a_New_SOA_Application\"><h3>Create a New SOA Application<\/h3><\/span>\n<p>* File -> New -> General -> Applications -> SOA Application<br \/>\n* On Create SOA Application wizard Step 1, enter<br \/>\nApplication Name: CreditCardValidation<br \/>\nDirectory: C:\\po\\CreditCardValidation<br \/>\nApplicatoin Package Prefix: blank<br \/>\n* On Step 2, enter<br \/>\nProject Name: validationForCC<br \/>\nDirectory: C:\\po\\CreditCardValidation\\validationForCC<br \/>\n* On Step 3, select<br \/>\nEmpty Composite<br \/>\n* Click Finish<\/p>\n<span id=\"Add_DBAdapter\"><h3>Add DBAdapter<\/h3><\/span>\n<p>* Drag and drop Database Adapter from Component Palette to External References lane<br \/>\n* On Adapter Configuration Wizard, Step 2 of 4, enter:<br \/>\nService Name: getCreditValidation<br \/>\n* On Step 3,<br \/>\n&#8211; Click green plus icon, enter<br \/>\nConnection Name: soademoDatabase<br \/>\nConnection Type: Oracle(JDBC)<br \/>\nUsername: soademo<br \/>\nPassword: soademo<br \/>\nSave Password: checked<br \/>\nDriver: thin<br \/>\nHost Name: localhost<br \/>\nService Name: orcl.world<br \/>\nJDBC Port: 1521<br \/>\n&#8211; Click Test Connection, should see success! under the button<br \/>\n&#8211; Click OK<br \/>\n* Still on Step 3, verify<br \/>\nJNDI Name: eis\/DB\/soademoDatabase<br \/>\nand click Next<br \/>\n* On Step 4, select<br \/>\nPerform an Operation on a Table -> Select<br \/>\n* On Step 5, click Import Tables&#8230; and then<br \/>\n&#8211; Click Query<br \/>\n&#8211; Move CREDITCARDINFO from left to right<br \/>\n&#8211; Click OK<br \/>\n* On Step 6, select CCNUMBER as primary key<br \/>\n* On Step 7, click Next<br \/>\n* On Step 8,<br \/>\nun-check all columns except status<br \/>\n* On Step 9,<br \/>\n&#8211; click Add button and enter a new parameter named ccnb, click OK<br \/>\n&#8211; click Edit button, click Add&#8230; button, and select<br \/>\nFirst Argument\/Query Key: ccnumber<br \/>\nOperator: EQUAL<br \/>\nSecond Argument: Parameter -> ccnb<br \/>\n&#8211; click OK<br \/>\n* Click Finish<\/p>\n<span id=\"Add_Mediator_Component\"><h3>Add Mediator Component<\/h3><\/span>\n<p>* Drag and drop a Mediator from Palette to Components lane, enter<br \/>\nName: RouteRequest<br \/>\nTemplate: Define Interface Later<br \/>\n* Click OK<\/p>\n<span id=\"Add_Outbound_Web_Service\"><h3>Add Outbound Web Service<\/h3><\/span>\n<p>* Drag and drop Web Service from Component Palette to Exposed Services lane<br \/>\n* On Create Web Service screen, enter<br \/>\nName: getStatusByCC<br \/>\nType: Service<br \/>\n* Click Create WSDL from schema icon (second one to the right of WSDL URL field)<\/p>\n<span id=\"Create_WSDL\"><h4>Create WSDL<\/h4><\/span>\n<p>* On Create WSDL screen, accept<br \/>\nFile Name: getStatusByCC.wsdl<br \/>\nDirectory: C:\\po\\CreditCardValidation\\validationForCC<br \/>\nNamespace: http:\/\/oracle.com\/sca\/soapservice\/CreditCardValidation\/validationForCC\/getStatusByCC<br \/>\nPort Type: execute_ptt<br \/>\nOperation: execute<br \/>\nInterface Type: <strong>Synchronous Interface<\/strong><\/p>\n<p><strong>Define Input<\/strong><br \/>\n* click the green plus icon above the Input panel<br \/>\n* On Add Message Part screen, click the browse for schema icon (magnifying glass)<br \/>\n* On Type Choose screen, click the Import Schema File icon (first icon on upper right)<br \/>\n* On Import Schema File screen, enter<br \/>\nCheck: Copy to Project<br \/>\nURL: file:\/C:\/po\/schemas\/creditcheck.xsd (or click the magnifying glass and browse to creditcheck.xsd file)<br \/>\n&#8211; click OK<br \/>\n* On Localize Files screen,<br \/>\n&#8211; <strong>uncheck <\/strong>maintain original directory structure&#8230;<br \/>\n&#8211; click OK<br \/>\n* Back on Type Choose screen,<br \/>\n&#8211; select creditcardStatusRequest<br \/>\n&#8211; click OK<br \/>\n* Back on Add Message Part screen, enter<br \/>\nPart Name: <strong>creditcardStatusRequestPart<\/strong><br \/>\nURL: xsd\/creditcheck.xsd<br \/>\nSchema Element: creditcardStatusRequest<br \/>\n&#8211; click OK<\/p>\n<p><strong>Define Output<\/strong><br \/>\n* click the green plus icon above the Output panel<br \/>\n* On Add Message Part screen, click the browse for schema icon (magnifying glass)<br \/>\n* On Type Choose screen,<br \/>\n&#8211; expand creditcheck.xsd<br \/>\n&#8211; select creditcardStatus<br \/>\n&#8211; click OK<br \/>\n* Back on Add Message Part screen, enter<br \/>\nPart Name: <strong>creditcardStatusPart<\/strong><br \/>\nURL: xsd\/creditcheck.xsd<br \/>\nSchema Element: creditcardStatus<br \/>\n&#8211; click OK<\/p>\n<p><strong>Define Fault<\/strong><br \/>\n* click the green plus icon above the Fault panel<br \/>\n* On Add Message Part screen, click the browse for schema icon (magnifying glass)<br \/>\n* On Type Choose screen,<br \/>\n&#8211; expand creditcheck.xsd<br \/>\n&#8211; select error<br \/>\n&#8211; click OK<br \/>\n* Back on Add Message Part screen, enter<br \/>\nPart Name: <strong>errorPart<\/strong><br \/>\nURL: xsd\/creditcheck.xsd<br \/>\nSchema Element: error<br \/>\n&#8211; click OK<\/p>\n<p><strong>Finish Create WSDL<\/strong><br \/>\n* Click OK on Create WSDL screen<br \/>\n* On Create Web Service screen, verify<br \/>\n&#8211; copy wsdl and its dependent artifacts into the project: <strong>unchecked<\/strong><br \/>\n&#8211; Transaction Participation: NEVER<br \/>\n* Click OK<\/p>\n<span id=\"Wire_Web_Service_Mediator_and_DBAdapter\"><h3>Wire Web Service, Mediator and DBAdapter<\/h3><\/span>\n<p>* Drag right arrow on upper right of getStatusByCC web service and drop on lower left of RouteRequest.<br \/>\n* Drag right arrow on lower right of RouteRequest and drop on right arrow on upper left of getCreditValidation.<\/p>\n<span id=\"Add_Transformation_Steps\"><h3>Add Transformation Steps<\/h3><\/span>\n<p>* Double click RouteRequest<\/p>\n<span id=\"Input_Mapper\"><h4>Input Mapper<\/h4><\/span>\n<p>* Click on the first transformation icon (to the right of the first &#8220;Transform Using&#8221; field)<br \/>\n* Select Create New Mapper File and click OK<br \/>\n* On the new mapper file,<br \/>\n&#8211; drag from left side inp1:CCNumber to right side top:ccnb<br \/>\n* Save and close mapper file<\/p>\n<span id=\"Reply_Mapper\"><h4>Reply Mapper<\/h4><\/span>\n<p>* Click on the transformation icon to the right of the second Transform Using field<br \/>\n* Select Create New Mapper File and click OK<br \/>\n* On the new mapper file,<br \/>\n&#8211; drag from left side top:status to right side inp1:creditcardStatus<br \/>\n* Save and close mapper file<\/p>\n<p>* Save and close RouteRequest.mplan file<\/p>\n<span id=\"Create_a_Server_Connection\"><h3>Create a Server Connection<\/h3><\/span>\n<p>* Click File -> New&#8230; -> General -> Connections -> Application Server Connection<br \/>\n* Click OK on New Gallery screen<br \/>\n* On Create Application Server Connection Step 1 screen, enter<br \/>\nConnection Name: MyAppServerConnection<br \/>\nConnection Type: WebLogic 10.3<br \/>\n* Step 2, enter<br \/>\nUsername: weblogic<br \/>\nPassword: welcome1<br \/>\n* Step 3, enter<br \/>\nWeblogic Hostname: localhost<br \/>\nPort: 7001<br \/>\nWeblogic Domain: soa_domain<br \/>\n* Step 4, click Test Connection<\/p>\n<pre lang=\"txt\">\r\nTesting JSR-160 Runtime                ... success.\r\nTesting JSR-160 DomainRuntime          ... success.\r\nTesting JSR-88                         ... success.\r\nTesting JSR-88-LOCAL                   ... success.\r\nTesting JNDI                           ... success.\r\nTesting JSR-160 Edit                   ... success.\r\nTesting HTTP                           ... success.\r\nTesting Server MBeans Model            ... success.\r\nTesting HTTP Authentication            ... success.\r\n\r\n9 of 9 tests successful.\r\n<\/pre>\n<p>* Step 5, click Finish<\/p>\n<span id=\"Deploy\"><h3>Deploy<\/h3><\/span>\n<p>* Right click validationForCC project<br \/>\n* Select Deploy -> validationForCC<br \/>\n* On Deploy validationForCC screen,<br \/>\n&#8211; select Deploy to Application Server<br \/>\n* On Deploy Configuration screen,<br \/>\n&#8211; check <strong>Overwrite any existing composites with the same revision ID<\/strong> if reploying<br \/>\n&#8211; click Next<br \/>\n* One Select Server screen,<br \/>\n&#8211; select MyAppServerConnection<br \/>\n&#8211; click Next<br \/>\n* Click Finish on Summary screen<\/p>\n<span id=\"Testing\"><h3>Testing<\/h3><\/span>\n<p>* Login Enterprise Console http:\/\/localhost:7001\/em<br \/>\n* Click Farm_soa_domain -> SOA -> soa-infra (soa_server1) -> default -> validationForCC<br \/>\n* Click Test tab<br \/>\n* Under Input Arguments, enter<br \/>\nCCNumber: 1234-1234-1234-1234<br \/>\n* Click Test Web Service button<br \/>\n* Should return VALID<br \/>\n* Enter<br \/>\nCCNumber: 4321-4321-4321-4321<br \/>\nshould return INVALID<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is part of the Oracle SOA11g hands on tutorials. Create a New SOA Application * File -> New -> General -> Applications -> SOA Application * On Create SOA Application wizard Step 1, enter Application Name: CreditCardValidation Directory: C:\\po\\CreditCardValidation &hellip; <a href=\"https:\/\/jianmingli.com\/wp\/?p=2062\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","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-2062","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-xg","_links":{"self":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/2062","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=2062"}],"version-history":[{"count":10,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/2062\/revisions"}],"predecessor-version":[{"id":10661,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/2062\/revisions\/10661"}],"wp:attachment":[{"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2062"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2062"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jianmingli.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2062"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}