SOA 11g Tutorial: Configuration/Deployment Plan

 

This is part of the Oracle SOA11g hands on tutorials.

Overview

* Application deployment is typically performed by administrators using scripts

Deployment Tools

* JDev
* EM
* Command line
– Ant scripts
– Python scripts

Configuration Plans

* Binding and other properties associated with
– References
– Components
– Services
* URLs in
– WSDL
– Imports
– Schema imports
– composite.xml
* JCA adapter properties
* OWSM WS-Policies

Generate Configuration Plan

Extract Binding Properties at Composite Level

* Open POProcessing composite.xml file.
* Select WriteApprovalResults file adapter.
* Open Property Inspector (View -> Property Inspector).

Add Binding Properties

* In Property Inspector.
– Expand Properties pane.
* Under Binding Properties, click green plus sign.
* In Create Property dialog
– Name: FileNamingConvention
– Value: test_%SEQ%.xml
– Click OK.
* Click Source tab of composite.xml file located at the lower left corner and check that FileNamingConvention property is created with value test_%SEQ%.xml:

  <reference name="WriteApprovalResults"
             ui:wsdlLocation="WriteApprovalResults.wsdl">
    <interface.wsdl interface="http://xmlns.oracle.com/pcbpel/adapter/file/POProcessing1/POProcessing/WriteApprovalResults#wsdl.interface(Write_ptt)"/>
    <binding.jca config="WriteApprovalResults_file.jca">
      <property name="FileNamingConvention" type="xs:string" many="false"
                override="may">test_%SEQ%.xml</property>
    </binding.jca>
  </reference>

* Add another property:
– Name: PhysicalDirectory
– Value: /tmp/po
* Save all.

Generate Configuration Plan

* From Projects Explorer, right click composite.xml file.
* Select Generate Config Plan.
* On Composite Configuration Plan Generator dialog, enter
– Name: POProcessing_dev_cfgplan.xml
– Click OK.
* Check that POProcessing_dev_cfgplan.xml is generated in the same directory as composite.xml file
* Locate WriteApprovalResults reference:

      <reference name="WriteApprovalResults">
         <!--Add search and replace rules for the binding properties-->
         <binding type="jca">
            <property name="FileNamingConvention">
               <replace>test_%SEQ%.xml</replace>
            </property>
            <property name="PhysicalDirectory">
               <replace>/tmp/po</replace>
            </property>
         </binding>
      </reference>

* Modify FileNamingConvention property value to orderoutput_%SEQ%.xml:

      <reference name="WriteApprovalResults">
         <!--Add search and replace rules for the binding properties-->
         <binding type="jca">
            <property name="FileNamingConvention">
               <replace>orderoutput_%SEQ%.xml</replace>
            </property>
         </binding>
      </reference>

Validate Configuration Plan

* From Projects Explorer, right click composite.xml file.
* Select Validate Config Plan
* Select POProcessing_dev_cfgplan.xml.
* Click OK.
* Examine report.log and compare old/new values.

Deploy New Configuration Plan using JDev

* Right click POProcessing.
* Select Deploy -> POProcessing…
* Select Deploy to Application Server.
– Click Next.
* On Deploy Configuration dialog, enter
– New Revision ID: 1.1
– Expand SOA Configuration Plan and Select
POProcessing_dev_cfgplan.xml
– Click Next buttons until Finish button is active.
– Click Finish.

Test

* Use test message

<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>900</ns1:price>
            <ns1:quantity>1</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>

* Check that orderoutput_1.xml is created in directory /tmp/po/test as configured:

/tmp/po/test >ls
orderoutput_1.xml

Deploy Configuration Plan with Ant

Compiling and Packaging

* Set PATH

set JDEV_HOME=C:\Oracle\Middleware\jdeveloper
set PATH=%JDEV_HOME%\ant\bin;%PATH%

* Compile

cd %JDEV_HOME%\bin
C:\Oracle\Middleware\jdeveloper\bin>ant -f ant-sca-package.xml ^
-DcompositeDir=C:\po\POProcessing1\POProcessing ^
-DcompositeName=POProcessing ^
-Drevision=1.1 ^
-Dscac.application.home=C:\po\POProcessing1
Buildfile: ant-sca-package.xml
     [echo] oracle.home = C:\Oracle\Middleware\jdeveloper\bin/..
    [input] skipping input as property compositeDir has already been set.
    [input] skipping input as property compositeName has already been set.
    [input] skipping input as property revision has already been set.

clean:
     [echo] deleting C:\po\POProcessing1\POProcessing/deploy/sca_POProcessing_rev1.1.jar
   [delete] Deleting: C:\po\POProcessing1\POProcessing\deploy\sca_POProcessing_rev1.1.jar

init:

scac-validate:
     [echo] Running scac-validate in C:\po\POProcessing1\POProcessing/composite.xml
     [echo] oracle.home = C:\Oracle\Middleware\jdeveloper\bin/..
    [input] skipping input as property compositeDir has already been set.
    [input] skipping input as property compositeName has already been set.
    [input] skipping input as property revision has already been set.

scac:
     [scac] Validating composite "C:\po\POProcessing1\POProcessing/composite.xml"
     [scac] INFO: SchemaManager.isIncrementalBuildSupported XMLSchema incremental build enabled.
     [scac] Composed "approveLargeOrder" in 211.1 milliseconds [nodes 47=2+45, 222.6 nodes/sec]
     [scac] Compiled "approveLargeOrder" in 1.772 seconds
     [scac] Gathered 6 files in 0.9 milliseconds
     [scac] Packaged "approveLargeOrder" in 17.2 milliseconds
     [scac] Composed "FulfillmentProcess" in 44.4 milliseconds [nodes 25=1+24, 563.3 nodes/sec]
     [scac] Compiled "FulfillmentProcess" in 1.112 seconds
     [scac] Gathered 5 files in 0.7 milliseconds
     [scac] Packaged "FulfillmentProcess" in 11.6 milliseconds
     [scac] warning: in ManualPOApproval.task: Task owner not specified
     [scac] warning: in ManualPOApproval.task: Error assignee not specified
     [scac] warning: in routePO.mplan: Case "ManualPOApproval.TaskService.initiateTask" doesnt have any payload transfor
mation Please make sure source and target message part name are same and of same type. Otherwise, target reference may f
ail to execute with error message like "Input sourcelike Null" or "Part not found"

package:
     [echo] oracle.home = C:\Oracle\Middleware\jdeveloper\bin/..
    [input] skipping input as property compositeDir has already been set.
    [input] skipping input as property compositeName has already been set.
    [input] skipping input as property revision has already been set.

compile-source:
    [mkdir] Created dir: C:\po\POProcessing1\POProcessing\dist
     [copy] Copying 69 files to C:\po\POProcessing1\POProcessing\dist
     [copy] Warning: C:\po\POProcessing1\POProcessing\src not found.
      [jar] Building jar: C:\po\POProcessing1\POProcessing\deploy\sca_POProcessing_rev1.1.jar
   [delete] Deleting directory C:\po\POProcessing1\POProcessing\dist

BUILD SUCCESSFUL
Total time: 10 seconds

* Deploy

ant -f ant-sca-deploy.xml ^
-DserverURL=http://localhost:8001 ^
-DsarLocation=C:\po\POProcessing1\POProcessing\deploy\sca_POProcessing_rev1.1.jar ^
-Doverwrite=true ^
-Duser=weblogic ^
-Dpassword=welcome1 ^
-DforceDefault=true ^
-Dconfigplan=C:\po\POProcessing1\POProcessing\POProcessing_dev_cfgplan.xml

Buildfile: ant-sca-deploy.xml
     [echo] oracle.home = C:\Oracle\Middleware\jdeveloper\bin/..

deploy:
    [input] skipping input as property serverURL has already been set.
    [input] skipping input as property sarLocation has already been set.
[deployComposite] setting user/password..., user=weblogic
[deployComposite] Processing sar=C:\po\POProcessing1\POProcessing\deploy\sca_POProcessing_rev1.1.jar
[deployComposite] Adding sar file - C:\po\POProcessing1\POProcessing\deploy\sca_POProcessing_rev1.1.jar
[deployComposite] INFO: Creating HTTP connection to host:localhost, port:8001
[deployComposite] INFO: Received HTTP response from the server, response code=200
[deployComposite] ---->Deploying composite success.

BUILD SUCCESSFUL
Total time: 30 seconds

Deploy Configuration Plan with EM Console

* Login to EM.
* Click Farm_soa_domain -> SOA -> soa-infra (soa_server1) -> default
* On right side panel,
– Click Deployment drop down box.
– Select Deploy to this partition.
* In Select Archive page,
– Select Archive is on the machine where this web browser is running.
– Browse to C:\po\POProcessing1\POProcessing\deploy\sca_POProcessing_rev1.1.jar.
– Select Configuration plan is on the machine where this web browser is running.
– Browse to C:\po\POProcessing1\POProcessing\POProcessing_dev_cfgplan.xml.
* In Confirmation page,
– Select Deploy as default revision.
– Click Deploy.

This entry was posted in soa11g. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


*

This site uses Akismet to reduce spam. Learn how your comment data is processed.