14 Working with SOA Extensibility

This chapter provides overview information about Service-Oriented Architecture (SOA) extensibility for Oracle Communications Network Integrity.

This chapter contains the following sections:

About SOA Extensibility

SOA extensibility topics covered in this chapter include creating an SOA development environment, setup, development, and testing of the Network Integrity SOA application.

The Business Process Execution Language (BPEL) provides enterprises with an industry standard for business-process orchestration and execution. Using BPEL, you design a business process that integrates a series of discrete services into an end-to-end process flow.

The Oracle BPEL Process Manager is a tool for designing and running business processes. This product creates, deploys, and manages cross-application business processes with both automated and human workflow steps in a service-oriented architecture.

The Sample Network Integrity SOA application provides a BPEL process that contains two parallel sequences. These sequences automate search and update Network Integrity discrepancies.

The following shows how this automation occurs:

  1. Search for Network Integrity discrepancies of type attribute mismatch for nativeEmsServiceState and update their resolution to Correct in UIM, if those discrepancies' network value is In service and import value is Out of service.

  2. Search for Network Integrity discrepancies of type attribute mismatch for physicalAddress and update their priority to High and discrepancy owner to given input value.

Purpose of Documentation

The developer should learn to install SOA, setup SOA Development environment, and use it for Network Integrity SOA application extensibility.

Extensibility Tasks

The tasks involve setting up of developer environment to update and extend the Network Integrity SOA application for future requirements.

Required software includes:

  1. Oracle WebLogic Server

  2. Oracle JDeveloper

  3. Oracle Application Development Framework

  4. Oracle Application Runtime Framework

  5. Oracle Fusion Middleware Repository Creation Utility

  6. SOA suite

  7. Oracle Database

Installing Oracle Weblogic Server

To install Oracle Weblogic Server, use the following procedure:

  1. Download Oracle WebLogic Server.

  2. Run ./wls1036_linux32.bin

  3. Click Next.

  4. Enter the WL_Home directory location to create a home directory for Oracle Fusion Middleware.

  5. Click Next.

  6. Select the I wish to receive security updates via Oracle Support check box and click Next. (Optional)

  7. Select Custom for the installation type.

  8. Click Next.

  9. Select the WebLogic Server check box to install all WebLogic Server components.

  10. Click Next.

  11. Select the Sun JDK check box.

  12. Click Next.

  13. Review the installation directories.

  14. Click Next.

  15. Review the installation summary of the products and JDKs to be installed.

  16. Click Next. This step begins the installation.

  17. When the installation is complete, deselect Run Quickstart.

  18. Click Done.

  19. Setup BEA_HOME, JAVA_HOME, WL_HOME environment variables and update PATH with the Java executable location. For example,

    export BEAHOME=/opt/beahome
    export WL_HOME=$BEAHOME/wlserver_10.3
    export JAVA_HOME=$BEAHOME/jdk160_33_R27.6.5-32
    
    export PATH=$JAVA_HOME/bin:$PATH
    

Installing Oracle JDeveloper

To install Oracle JDeveloper, use the following procedure:

  1. Download Oracle JDeveloper (Oracle_JDeveloper_11g_and_Oracle_Application_Development_Framework_11g.zip) software from the Oracle software delivery website:

    https://edelivery.oracle.com/

  2. Unzip the installer to any directory.

  3. Open a console.

  4. Change the console directory to the unzipped installer directory.

  5. Run the installer using the following command:

    java –jar jdevstudio11116install.jar
    

    The Installer starts extracting the setup files and Installation wizard opens when it reaches to 100%.

  6. Click Next.

  7. Select Use the existing Middleware Home to select the Middleware home you created in "Installing Oracle Weblogic Server".

  8. Select JDeveloper Studio and ADF too install all JDeveloper Studio and ADF components.

  9. Click Next.

  10. Select the existing Sun SDK.

  11. Click Next.

  12. Confirm JDeveloper and WLS home directories and click Next.

  13. Review the Installation summary and click Next. This step begins the installation.

  14. Click Done when the installation is complete.

Installing Oracle Application Runtime

To install Oracle Application Runtime, use the following procedure:

  1. Download Oracle Application Development Runtime software from the Oracle software delivery website:

    https://edelivery.oracle.com/

  2. Unzip the installer to any directory.

  3. Open a console.

  4. Change the console directory to the unzipped installer directory.

  5. Run the installer using the following command:

    . Disk1/runInstaller
    
  6. Enter the JAVA HOME location to launch installation wizard.

  7. Click Next.

  8. Click Next button after Prerequisite Checks are complete.

    Tip:

    Install the required system package if a check fails.
  9. Click Browse and navigate to WL_Home.

  10. Click Next.

  11. Click Install.

  12. Click Next after the installation is complete.

  13. Click Finish.

Installing Oracle SOA Suite

To install Oracle SOA Suite, use the following procedure:

  1. Download Oracle SOA Suite software from the Oracle software delivery website:

    https://edelivery.oracle.com/

  2. Unzip the installer to any directory.

  3. Open the console and change to unzipped folder directory.

  4. Run the installer using the following command:

    . Disk1/runInstaller
    
  5. Enter the JAVA HOME location to launch installation wizard.

  6. Click Next.

  7. Click Next after Prerequisite Checks are complete.

    Tip:

    Install the required system package if a check fails.
  8. Click Browse and navigate to WL_Home. Do not modify the Oracle Home Directory name.

  9. Click Next.

  10. Click Install.

  11. Click Next after the installation is complete.

  12. Click Finish.

Creating SOA Metadata Service Schemas

To creates a metadate service (MDS) schema for the Business Activity Monitoring (BAM) and SOA servers, use the following procedure:

  1. Download Oracle Fusion Middleware Repository Creation Utility software from the Oracle software delivery website:

    https://edelivery.oracle.com/

  2. Unzip the Repository Creation Utility (RCU) to any directory.

  3. Open the console and change to unzipped folder directory.

  4. Run the installer using the following command:

    ./rcuHome/bin/rcu 
    
  5. Click Next.

  6. Select Create in the Create Repository screen

  7. Click Next.

  8. Enter database details as required.

  9. Click Next.

  10. Click OK.

  11. Select Create a new Prefix in the Select Components screen and enter a prefix in the text box.

  12. Select the following from the Component list:

    • Metadata Service

    • SOA Infrastructure

    • Business Activity Monitoring

    • User Messaging Service

    These components are required for the SOA and BAM servers.

    Tip:

    Remember the Schema Owners for subsequent procedures.
  13. Click Next.

  14. Enter passwords for all components in the Schema Passwords screen.

    Tip:

    Remember the Schema Passwords for subsequent procedures.
  15. Click Next.

  16. Review the Schema Owner, Tablespace Type, and Tablespace Name for each Component in the Summary screen.

  17. Click Next to accept the settings.

  18. Click OK to create the tablespaces.

  19. Click OK when the prerequisites are complete.

  20. Click Create in the Summary screen to create the tablespaces. This step can take up to ten minutes.

  21. Click Close after the tablespaces are created.

Updating JDeveloper for Latest SOA Composite Editor

SOA design time in JDeveloper requires a JDeveloper extension called SOA Composite editor. While this is normally updated over the network when using release-level software, you can also perform the update manually if you have the extension file. JDeveloper periodically prompts you to accept an automatic network update. Since this is released software, you have the option to click OK to update to a newer version.

To update JDeveloper for the latest SOA Composite editor, use the following procedure:

  1. Start JDeveloper Studio.

  2. Select Default Role.

  3. Deselect Show this dialog every time.

  4. Click OK.

  5. Click No for Migrate from previous release. After starting JDeveloper, wait for the Integrated Weblogic Domain to be created. This domain is created the first time you run JDeveloper after installation. It is not used by SOA. Watch for the completion message for setting up the domain in the JDeveloper Messages log window at the bottom of the JDeveloper IDE:

    [12:37:11 PM] Creating Integrated Weblogic domain...
    [12:38:05 PM] Extending Integrated Weblogic domain...
    [12:38:14 PM] Integrated Weblogic domain processing
     completed successfully.
    

    Now you can update the SOA Composite editor extension. These instructions show you how to update the extension over the network.

  6. Select Help | Check For Updates.

  7. Click Next.

  8. Select Search Update Centers.

  9. Select Oracle Fusion Middleware Products.

  10. Click Next. The system searches the update center for extensions.

  11. From the list of extensions, select Oracle SOA Composite Editor.

  12. Click Next to begin downloading. When the extension finishes downloading, it is listed with the version number detail.

  13. Click Finish.

  14. Restart JDeveloper when prompted.

  15. Click No for Migrate from previous release.

  16. When JDeveloper is running again, select Help then About.

  17. Select the Version tab and review the version.

Creating WebLogic Domain with SOA Products

To creates an Oracle WebLogic domain with the required products for SOA applications, use the following procedure:

  1. Open the console and change to unzipped folder directory.

  2. Run the following command:

    ./<BEAHOME>/wlserver_10.3/common/bin/config.sh
    
  3. When the Welcome screen appears, select Create a new WebLogic domain.

  4. Click Next.

  5. Select Generate a domain, SOA Suite, Enterprise Manager, and Business Activity Monitoring. Dependent products are selected automatically.

  6. Click Next.

  7. Enter domain1 for the domain name.

  8. Click Next.

  9. Enter the user name weblogic and a password. The password welcome1 is assumed in this document.

  10. Click Next.

  11. Select Sun SDK 1.6_33 and leave Development Mode checked.

  12. Click Next.

  13. Select the check boxes for the components that you want to change.

  14. Enter Welcome1 for the Schema Password.

  15. Change the Service, Host Name, and Port values as required.

  16. Click Next.

  17. Review the Schema Owners for the individual component schemas and confirm that the owners match those selected in the "Creating SOA Metadata Service Schemas" procedure.

    Tip:

    To change the Schema Owner field, use the following steps:
    1. Remove the check boxes for all Component Schema items.

    2. Select the check box for the Component Schema that you want to change.

    3. Change the Schema Owner field.

    4. Remove the check box for the component schema item you changed.

  18. Click Next to begin a data source connection test.

  19. Click Next if all connection tests are successful. If the connection tests are not successful, click Previous and correct any errors.

  20. Click Next.

  21. Click Create in the Configuration Summary screen.

  22. Click Done when the domain has been created.

    When a domain is created, the Configuration Wizard creates one admin server and two managed servers with the following details:

    • Admin Server

      Name: admin_server

      Port: 7001

    • SOA Server

      Name: soa_server1

      Port: 8001

    • BAM Server

      Name: bam_server1

      Port: 9001

    See the startManagedServer_readme.txt file in the domain folder to start the servers.

Creating and Updating Sample SOA Application Using Network Integrity Web Service

To update an SOA application using the Network Integrity SOA application, use the following procedure:

  1. Download the Sample Network Integrity SOA application (NetworkIntegrity-SOA_Sample_App-version.zip) software from the Oracle software delivery website:

    https://edelivery.oracle.com/

  2. Unzip the application to any directory.

  3. Start Oracle Jdeveloper.

  4. From the Jdeveloper main menu, choose File then Open then browse to NISOAApplication folder and select NISOAApplication.jws.

  5. Click Open.

    The NISOAApplication.jws contains the NIDiscrepancyService project. The main components for this project are:

    • NetworkIntegrityControlService.wsdl: This is the Network Integrity Sample Web Services WSDL file.

    • xds: This folder contains Network Integrity Sample Web Service schema files.

    • composite.xml: This file describes the entire composite assembly of services, service components, references, and wires

      In the project, composite.xml file is automatically created when the SOA project was created. In this application only service components (including Network Integrity Sample Web Service) are used.

    • NIBPELDiscrepancyProcess.bhel: This file contains a list of variables and the main sequences in which he Network Integrity Web Service calls to update the Network Integrity Discrepancies are defined. There are two parallel sequences named as Sequence_1 and Sequence_2 to update Attribute mismatch discrepancies for nativeEMSServiceState (go to step 6) and physicalAddress (go to step 8) respectively.

    It is necessary that both client side artifacts (wsdl and schema) and server side artifacts are in sync and of same version.

  6. To search for natieEMSServiceState attribute mismatch discrepancies (Sequence_1), search for the following discrepancies:

    • TYPE = ATTRIBUTE_VALUE_MISMATCH

    • ATTRIBUTEORRELATIONSHIPNAME = nativeEmsServiceState

    • STATUS = DISCREPANCY_OPENED

    • COMPARESOURCE = INVENTORY

    • REFERENCESOURCE = NETWORK using findDiscrepancy webservice operation.

  7. Loop over each discrepancy and submit to updateDiscrepancy if COMPAREVALUE = 'IN_SERVICE' and REFERENCEVALUE ='OUT_OF_SERVICE' to update OPERATION as 'Correct in UIM' and STATUS as 'OPERATION_IDENTIFIED'.

  8. To search for physicalAddress attribute mismatch discrepancies, search for the following discrepancies:

    • TYPE = ATTRIBUTE_VALUE_MISMATCH

    • ATTRIBUTEORRELATIONSHIPNAME = physicalAddress

    • STATUS = DISCREPANCY_OPENED using findDiscrepancy webservice operation.

  9. Loop over each discrepancy and submit to updateDiscrepancy by setting PRIORITY to High and DISCREPANCYOWNER to given value.

  10. Right-click composite.xml and select Configure WS Policies to add appropriate security client policy to the Network Integrity Web Service component.

  11. Update NetworkIntegrityControlService.wsdl's SOAP address location with Network Integrity Web Service URL. For example:

    <soap:address location="https://<host_address>:<ssl_port>/NetworkIntegrityApp-NetworkIntegrityControlWebService-context-root/NetworkIntegrityControlServicePortType"/>
    

    This should be done before building the SOA application or use deployment plan while deploying the SOA application to update the SOAP address location with the Network Integrity Web Service URL. This configuration is required for SOA application to communicate with Network Integrity Web Services.

Starting and Stopping SOA Servers

To start and stop SOA servers, use the following procedure:

  1. To start the Administration Server run to following command: <domain>/startWeblogic.sh

  2. To start the SOA managed server, run the following command (here soa_server1 is name of SOA managed server): <domain>/bin/startManagedServer.sh soa_server1

  3. To enter the WebLogic console, use:

    http://Host_Address:7001/console
    
  4. To enter the Enterprise Manager console, use:

    http://Host_Address:7001/em
    
  5. To enter SOA Infra, use:

    http://Host_Address:8001/soa-infra
    
  6. Press Ctrl + C to stop the servers.

Building and Deploying the SOA Application

To build and deploy the SOA application, use the following procedure:

  1. In Jdeveloper, go to Application Navigator then right-click NIDiscrepancyService project.

  2. Click Make NIDiscrepancyService.jpr in the menu to build the project. The project should build successfully without any compilation errors or warnings.

  3. Start the Administration and SOA servers that are created as part SOA domain creation (see "Starting and Stopping SOA Servers" and "Creating WebLogic Domain with SOA Products").

  4. Create a standalone server connection for the SOA server.

  5. Right-click NIDiscrepancyService and select 'Deploy' to Application server.

  6. The SOA suite provides an ant script to deploy and undeploy the SOA archive (SAR) file (deployable SOA application jar) in the BEA HOME. Use the following to deploy and undeploy the SAR file:

    • To deploy, use the following:

      ant -f <BEAHOME>/Oracle_SOA1/bin/ant-sca-deploy.xml 
      -DserverURL=<http://soa_server_host:soa_server_port>  
      -DsarLocation=<SOA archive file path>
      

      For example,

      ant -f /home/beahome/Oracle_SOA1/bin/ant-sca-deploy.xml 
      -DserverURL=http://<localhost>:8001 
      -DsarLocation=/home/example/beahome/mywork/NISOAApplication/NIDiscrepancyService/deploy/sca_NIDiscrepancyComposite_rev1.0.jar
      
    • To undeploy, use the following:

      ant -f <BEAHOME>/Oracle_SOA1/bin/ant-sca-deploy.xml undeploy 
      -DserverURL= <http://soa_server_host:soa_server_port>  
      -DcompositeName=<SOA composite name>
      -Drevision=<SOA composite version>
      

      For example,

      ant -f /home/beahome/Oracle_SOA1/bin/ant-sca-deploy.xml undeploy 
      -DserverURL=http://<localhost>:8001 
      -DcompositeName=NIDiscrepancyComposite 
      -Drevision=1.0
      

Testing Sample SOA application

To test a sample SOA application, use the following three tools:

Note:

Oracle Enterprise Manager (EM) can also helpful in debugging and auditing of BPEL sequence exceptions.

Testing Network Integrity SOA Application Using EM

To test a sample SOA application with EM, use the following procedure:

  1. Log on to the Enterprise manager as admin.

  2. Expand the SOA folder to the deployed composite (NIDiscrepancyComposite).

  3. Click Test to test composite.

  4. Enter any value for the input argument for SOA Web Service.

  5. Click Test Webservice. Wait for a response.

  6. Click Launch Message Flow Trace to see detailed output.

  7. Click NIBPELDiscrepancyProcess to view the Audit Trail, Flow, and so on.

  8. Expand the payloads to see detailed input and output of each Web Service invoked.

Testing Network Integrity SOA Application Using soa-infra

To test a sample SOA application with soa-infra, use the following procedure:

  1. Log on to soa-infra using the following URL:

    http://Host_Address:8001/soa-infra
    
  2. Enter any input required for the test.

  3. Click Invoke.

Testing Network Integrity SOA Application Using SOAP UI Tool

To test a sample SOA application with the Simple Object Access Protocol (SOAP) UI tool, use the following procedure:

  1. Create a SOAP UI project at the following URL:

    http://Host_Address:8001/soa-infra/services/default/NIDiscrepancyComposite/nibpeldiscrepancyprocess_client_ep?WSDL
    
  2. Enter any input required for the test.

  3. Create a request run.