Deploying ValidatePayment to the OTN SOA VM

The Oracle SOA product management team does a nice job of publishing a Pre-built Virtual Machine for SOA Suite. They also produce an exceptional Oracle SOA Suite 12.1.3 end-to-end tutorial. As I often use the solutions from that tutorial as a baseline for demonstrating other SOA features, such as BAM or API Management, I wanted to document the steps to getting the tutorial’s ValidatePayment composite deployed to the pre-built virtual machine. This primarily involves importing the sample data and configuring the ValidatePayment composite to use the compact domain configured with the VM rather than the integrated domain.

Step 1: Download Resources

Step 2: Configure the Database

Create a SOA_TUTORIAL User

  1. Start SQL Developer (use the icon on the destkop)
  2. Enter the following commands:
    CREATE USER SOA_TUTORIAL IDENTIFIED BY SOA_TUTORIAL;
    GRANT CONNECT, RESOURCE TO SOA_TUTORIAL;
    GRANT UNLIMITED TABLESPACE TO SOA_TUTORIAL;

    01_CREATE_SOA_TUTORIAL

Import Tutorial Sample Data

  1. Start JDeveloper (use the icon on the desktop)
  2. Open the Databases Windows (Window > Database > Databases)
  3. Create a new IDE Connection:
    • Connection Name: SOA_TUTORIAL
    • Connection Type: Oracle (JDBC)
    • Username: SOA_TUTORIAL
    • Driver: thin
    • Host Name: localhost
    • SID: ORCL
    • Test Connection
      02_CREATE_DB_CONN
  4. Open e2e_1201_create_all_tables_oracle.sql in JDeveloper.
  5. Comment out the COMMIT at the end of the script as the JDBC driver will auto commit the changes.
  6. Select SOA_TUTORIAL in the connection dropdown in the upper right and press F5 to run the script.
    03_RUN_SCRIPT
  7. Close the e2e_1201_create_all_tables_oracle.sql script.

Step 3: Open the Validate Payment Solution in JDeveloper

The ValidatePayment solution provided with the tutorial is configured to use the integrated SOA server along with the JavaDB database that’s configured with the integrated server. We need to change the configuration to use the compact domain along with the Oracle Database we just configured.

  1.  Expand SOASuite12c_Tutorial > e2e-1201-orderprocessing > solutions > ch2-validatePayment and extract e2e-1201-composites-ch2.zip.
  2. Open in JDeveloper e2e-1201-composites > e2e-1201-composites.jws. Select Yes on the Open Warning that the application is going to be migrated to 12.2.1.

Update the Database Adapter

  1. Open the ValidatePayment composite.
  2. Double-click the getPaymentInformation to start the Database wizard.
  3. Click Next and the wizard will complain about the missing connection.

    04_CONN_WARN

  4. Click OK and then click the magnifying class to select the SOA_TUTORIAL connection we just established.
  5. Set the JNDI Name to eis/DB/SOA_TUTORIAL. We will configure this soon.

    05_SERVICE_CONN

  6. Click Next to walk through the remainder of the wizard. Nothing else has to change. Click Finish at the end.

Update the Address Location

  1. Open SOA > WSDLs > ValidatePayment_concrete.wsdl. Select the validatePaymentPort service address and change the port from 7101 to 8001.

    051_EDIT_WSDL1

    052_EDIT_WSDL2

  2. Save the close the WSDL.

Step 4: Start the SOA Domain

  1. Open the SOA Domain folder on the desktop and click Start soa_domain Admin Server. Monitor the terminal window that opens and wait for startup to complete.

    06_SOA_DOMAIN

  2. Start the soa_domain SOA Server.

Configure the SOA_TUTORIAL Datasource

  1. Start Firefox.
  2. Use the WLS > WLS Admin Console – SOA and Insight Domain bookmark to open the Admin Console.
  3. Login using weblogic / welcome1.
  4. Select Data Sources.
  5. Create a New > Generic Data Source.
  6. Set the Name to SOA_TUTORIAL_DS and the JNDI Name to jdbc/SOA_TUTORIAL. Leave the Database Type as Oracle.

    07_DS_PROPS

  7. Click Next and select *Oracle’s Drive (Thin XA) for Instance connections: Versions:Any for the Database Driver.

    08_DS_DRIVER

  8. Click Next and Next and set the following:
    Database Name: ORCL
    Host Name: localhost
    Port: 1521
    Database User Name: SOA_TUTORIAL
    Password: SOA_TUTORIAL
    Confirm Passord: SOA_TUTORIAL

    09_DS_CONN
  9. Click Next and Test Configuration. Ensure the test succeeded:

    10_DS_TEST

  10. Click Next and target the datasource to the soa_server:

    11_DS_TARGET

  11. Click Finish.

Update the DB Adapter

Here we will map the JNDI name we configured in our composite, eis/DB/SOA_TUTORIAL, to the data source we just configured.

  1. Click Deployments.
  2. Find and click DbAdapter.
  3. Select the Configuration Tab and Outboud Connection Pools tabs.
  4. Click New.
  5. Select the javax.resource.cci.ConnectionFactory and click Next:

    12_CONN_GROUP

  6. Set the JNDI Name to eis/DB/SOA_TUTORIAL (which matches the name of the DB Adapter in our composite)

    13_JNDI

  7. Click Finish and OK to save the deployment plan:

    14_SAVE_DP

  8. Return to Configuration > Outbound Connection Pools. Expland the javax.resource.cci.ConnectionFactory and click the eis/DB/SOA_TUTORIAL factory we just created:

    15_EDIT_CF

  9. Set the XADataSourceName to jdbc/SOA_TUTORIAL. This maps the connection factory to the data soure we created earlier.

    16_SET_DS

  10. Click Save.
  11. Click Deployments and find the DbAdapter again.
  12. Select the checkbox in the first column and click Update.

    17_UPDATE

  13. Click Next and Finsh. You should see the message:

    18_MESSAGE

Step 5: Deploy Validate Payment

  1. Return to JDeveloper. Right-click the ValidatePayment project and select Deploy > ValidatePayment to open the Depoy wizard.
  2. Select Deploy to Application Server and click Next:

    19_DEPLOY

  3. Select Overwrite any existing composites with the same revision ID. This selection isn’t required for this initial deployment, but we will use it on subsequent deployments. Click Next.

    20_DEPLOY2

  4. Select SOA_DOMAIN and click Next.

    21_DEPLOY3

  5. Select soa_server1 and click Next and Finish.

    22_DEPLOY4

  6. The Deployment – Log should indicate a successful deployment:

    32_DEPLOY_LOG

Step 6: Test Validate Payment Composite

  1. Use the EM > Oracle Enterprise Manager – SOA and Insight Domain bookmark in Firefox to open Enterprise Manager Fusion Middleware Control.
  2. Login using weblogic / welcome1.
  3. Using the Target Navigation menu on the left, switch to SOA > soa-infra (soa_server1)
    24_TARGET_NAV
  4. Switch to the Deployed Composites tab where you should find ValidatePayment.

    25_DEPLOYED_COMPOSITES

  5. Select ValidatePayment and click the Test button.

    26_VALIDATE_PAYMENT

  6. The tutorial includes sample payload we can use to test the service. Under the Request tabl of the Test Web Service page click the Browse button and open SOASuite12c_Totorial > e2e-1201-orderprocessing > sample_input > PaymentInfoSample_Authorized_soap.xml:

    27_TEST

  7. Click Test Web Service. You should see a response status as “Authorized”:

    28_RESPONSE

 

Congratulations, you have successfully deployed the Validate Payment composite to the SOA 12c virtual machine.

 

Advertisements

One thought on “Deploying ValidatePayment to the OTN SOA VM

  1. Pingback: An Introduction to Oracle Business Activity Monitoring (BAM) – Part 1: Message Production | W Brian Leonard

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s