Oracle® Fusion Middleware Application Adapter Best Practices Guide for Oracle WebLogic Server 11g Release 1 (11.1.1.4.0) E17059-04 |
|
Previous |
Next |
This chapter lists and describes general best practices that are common to all Oracle Application Adapters for Oracle WebLogic Server. It contains the following sections:
Oracle WebLogic Server (WLS) creates and maintains a pool of connections to the iWay J2CA resource adapter. These are called "managed connections". Each managed connection maintains a distinct set of connections to a back-end Enterprise Information System (EIS) systems (exposed as an adapter target). The set is initially empty and becomes populated only as specific adapter target connections are requested by an executing SOA process that is using the managed connection.
A managed connection maintains only a single connection to any given adapter target and reuses it each time a connection to that target is requested. When WLS destroys a managed connection, the managed connection closes all its internal EIS connections.
By way of illustration, the following steps detail a scenario in which a SOA process containing references to multiple iWay adapter targets is used.
SOA process requests a managed connection to the iWay resource adapter ("eis/OracleJCAAdapter/DefaultConnection") and receives a new, empty, managed connection called "Managed1".
SOA process invokes a service with adapter target MySAP/SAP1 using Managed1.
Managed1 creates a new MySAP adapter instance, activates it for target SAP1, and adds it to its internal EIS connection set.
Service is invoked, response returned, and SOA process continues.
SOA process invokes a service with adapter target MySAP/SAP2 using Managed1.
Managed1 creates a new MySAP adapter instance, activates it for target SAP2, and adds it to its internal EIS connection set.
Service is invoked, response returned, and SOA process continues.
SOA process invokes a service with adapter target JDEdwards/JDE1 using Managed1.
Managed1 creates a new JDEdwards adapter instance, activates it for target JDE1, and adds it to its internal EIS connection set.
SOA process terminates. WLS returns Managed1 to the connection pool.
After termination of the SOA process, Managed1 is available to be used by some other SOA process. Its internal EIS connections (SAP1, SAP2, JDE1) remain open. They are reused the next time a process requests connections to those targets from Managed1. They are closed only when WLS destroys Managed1.
You can monitor the managed connection pool in the WLS admin console, as shown in Figure 1-1.
The "current connections" column is the number of managed connections that are currently in use, presumably by executing SOA processes. This number should go up when a SOA process is started and should go down after a period of inactivity.
When a SOA process needs a managed connection, it tries to retrieve one from the connection pool. If a managed connection is not available, and the number of current connections does not yet exceed the maximum size of the pool, then it creates a new one. If the maximum size of the pool has been reached and no free connection is available, then a resource availability error is generated. When a process is finished, the connection is returned to the pool.
It is important to remember that these numbers represent connections to the iWay resource adapter and not to any specific EIS. A single iWay managed connection may contain any number of EIS connections depending upon its usage history. Consequently, there is no way to introspect the number of EIS connections in use by the iWay resource adapter.
The maximum size of the managed connection pool, the minimum size, and other pool parameters can be set in the weblogic-ra.xml
file and viewed in the admin console, as shown in Figure 1-2.
There are many pool parameters, but because they control the pool of connections to the iWay resource adapter and not any specific EIS many of these are immaterial. Setting an initial pool size, for example, accomplishes nothing except creating a set of empty resource adapter connections. There is no reason to do this. For similar reasons, the "capacity increment" parameter is also not particularly useful.
You have to set the initial capacity to zero always to work with the iWay adapters.
Note: You cannot set anything other than the value of zero. |
Some settings have implicit effects for all adapter targets. For example, setting a maximum size for the managed connection pool implicitly establishes the maximum number of connections that can be made to any single target since each managed connection can hold at most one connection to a unique adapter target. Similarly, defining the lifetime of a managed connection implicitly defines the lifetime for all EIS connections created by the connection. However, there is no way to control connection pooling for specific EIS targets using the iWay "universal" resource adapter.
Application adapters integrate Oracle WebLogic Server with various packaged applications, such as SAP R/3 and Siebel. These adapters include Oracle Application Adapter for PeopleSoft, Oracle Application Adapter for SAP R/3, Oracle Application Adapter for Siebel, and Oracle Application Adapter for J.D. Edwards OneWorld.
This section describes the steps required to successfully deploy the 11g Release 1 (11.1.1.4.0) Oracle Application Adapters in a cluster environment (in all available SOA nodes, which in this case is two systems) and working with inbound and outbound processes.
Before continuing, ensure that the following prerequisites are available:
Two systems with the High Availability (HA) cluster configuration completed successfully. For more information about configuring the HA cluster, see:
http://download.oracle.com/docs/cd/E12839_01/core.1111/e10106/ha_soa.htm#CHDDAHEC
Upgrade from 11g Release 1 (11.1.1.3.0) to 11g Release 1 (11.1.1.4.0).
Pack/unpack the domain configuration from system1 to the second system (system2).
Install Oracle Application Adapters 11g Release 1 (11.1.1.4.0) on both systems.
Configure a J2CA configuration as a database repository on both systems.
Perform the required changes to the ra.xml and weblogic-ra.xml files before deployment.
To deploy the J2CA Connector Application:
Start the Oracle WebLogic Server for the Oracle WebLogic Server domain that has been configured.
Start the SOA_Server1 and SOA_Server2 for both systems.
Open the Oracle WebLogic Server Administration Console in a Web browser by entering the following URL:
http://host name
:port
/console
Where host name
is the name of the system where Oracle WebLogic Server is running and port
is the port number for the domain you are using.
The Oracle WebLogic Server Administration Console logon page is displayed, as shown in Figure 1-3.
Figure 1-3 Oracle WebLogic Server Administration Console Logon Page
Log in to the Oracle WebLogic Server Administrative Console using an account that has administrator privileges.
The Oracle WebLogic Server Administration Console home page is displayed, as shown in Figure 1-4.
Figure 1-4 Oracle WebLogic Server Administration Console Home Page
In the Domain Structure section in the left pane, click Deployments.
The Deployments page is displayed, as shown in Figure 1-5.
Click Lock & Edit in the Change Center.
Click Install.
The Install Application Assistant page is displayed, as shown in Figure 1-6.
Browse to the following directory:
C:\oracle\product\fmw\soa\soa\thirdparty\ApplicationAdapters\iwafjca.rar
Select the option next to iwafjca.rar and click Next, as shown in Figure 1-7.
Figure 1-7 Next Button In the Install Application Assistant Page
The Choose Targeting Style page is displayed, as shown in Figure 1-8.
Accept the default selection (Install this deployment as an application) and click Next.
The Select Deployment Target page is displayed, as shown in Figure 1-9.
In the Clusters section, select SOA_Cluster followed by All servers in the cluster.
Click Next.
The Optional Settings page is displayed, as shown in Figure 1-10.
Accept the default values and click Next.
The Summary page is displayed, as shown in Figure 1-11.
Click Finish.
In the displayed Settings page for the J2CA (iwafjca) Connector Application, click Save.
In the Domain Structure section in the left pane, click Deployments and navigate through the table that lists all the deployed applications and find the J2CA (iwafjca) connector application.
Select the check box next to iwafjca, as shown in Figure 1-12.
Click the Start submenu (down arrow) and select Servicing all requests.
The Start Application Assistant page is displayed, as shown in Figure 1-13.
Figure 1-13 Start Application Assistant Page
Click Yes.
Verify that the application has successfully started in the Deployments page, as shown in Figure 1-14.
Similarly, repeat steps 5 through 20 for the iwafjca.war deployment.
The following configuration steps must be performed in the Oracle WebLogic Server Administration Console to work with the outbound process:
Open the Oracle WebLogic Server Administration Console in a Web browser by entering the following URL:
http://host name
:port
/console
Where host name
is the name of the system where Oracle WebLogic Server is running and port
is the port number for the domain you are using.
The Oracle WebLogic Server Administration Console logon page is displayed, as shown in Figure 1-15.
Figure 1-15 Oracle WebLogic Server Administration Console Logon Page
Log in to the Oracle WebLogic Server Administrative Console using an account that has administrator privileges.
The Oracle WebLogic Server Administration Console home page is displayed, as shown in Figure 1-16.
Figure 1-16 Oracle WebLogic Server Administration Console Home Page
In the Domain Structure section in the left pane, click Deployments.
The Deployments page is displayed, as shown in Figure 1-17.
Click FileAdapter.
The Settings for FileAdapter page is displayed, as shown in Figure 1-18.
Figure 1-18 Settings for File Adapter Page
Click the Configuration tab followed by the Outbound Connection Pools tab.
The Outbound Connection Pool Configuration Table page is displayed, as shown in Figure 1-19.
Figure 1-19 Outbound Connection Pool Configuration Table Page
Expand javax.resource.cci.ConnectionFactory and click eis/HAFileAdapter.
The settings for javax.resource.cci.ConnectionFactory page is displayed, as shown in Figure 1-20.
Figure 1-20 Javax.resource.cci.ConnectionFactory Page
Click the Properties tab.
Provide a valid location for the controlDir property and click Save.
Check if the success message is displayed, as shown below in Figure 1-21.
Figure 1-21 Deployment Plan Success Message
In the Domain Structure section in the left pane, click Deployments, as shown in Figure 1-22.
Select FileAdapter from the deployments list and click Update.
The Update Application Assistant page is displayed, as shown in Figure 1-23.
Figure 1-23 Update Application Assistant Page
Select Update this application in place with new deployment plan changes and click Next.
The Summary page is displayed, as shown in Figure 1-24.
Click Finish.
Check if the success message is displayed, as shown in Figure 1-25.
Copy the generated plan.xml file from the first system (first node in the cluster configuration) to the same location (Oracle_Home\Middleware\Oracle_SOA1\soa) in the second system (second node in the cluster configuration).
Restart the servers (Admin_Server, SOA_Server1, SOA_Server2).
Create a shared input location that is accessible by both systems.
For example, if the inputs are pasted in this location, they can be consumed by system1 and system2.
To configure the outbound process:
Create a target using Application Explorer on the first system.
Connect to the target (on the first system) and create an outbound WSDL for the Oracle Application Adapter for SAP R/3 (MySAP node).
On the second system, create a target using Application Explorer with the same name as specified on the first system.
Restart the Admin Server and the soa_servers on both systems.
As shown below in Figure 1-26, create an outbound Mediator process using Oracle JDeveloper with the following configuration:
Figure 1-26 Outbound Mediator Process in Oracle JDeveloper
Select the Read_file_adapter.jca file and make the following changes:
Change <connection-factory location="eis/FileAdapter" UIincludeWildcard="*.xml" adapterRef=""/>
to <connection-factory location="eis/HAFileAdapter" UIincludeWildcard="*.xml" adapterRef=""/>
Add the value <property name="MaxRaiseSize" value="5"/>
to the end, as shown in Figure 1-27.
Save the process and deploy the process to both SOA servers.
Provide the input files in the input location configured in the Read file adapter and check if the outputs are shared and placed in the output location (in two systems) configured in the Write file adapter.
The following configuration steps must be completed (for PeopleSoft, Siebel, and J.D. Edwards OneWorld Application Adapters) before executing an inbound process:
Navigate to the following location:
Oracle_Home
\product\11.1.0\ohs_1\Oracle_WT1\instances\instance1\config\OHS\ohs1
Open the mod_wl_ohs.conf file.
Add the IP address and port number (port number configured while creating the channel for the adapter) for both systems in the mod_wl_ohs.conf file.
For example (for the PeopleSoft adapter):
<Location /name
>SetHandler weblogic-handlerWebLogicClustersystem1_ip:port, system2_ip:port
WLLogFilec:\tmp\psft.log
</Location>
Where:
name
- Is any appropriate name.
system1_ip
and system2_ip
- Are the system IP addresses where SOA_Server1 and SOA_Server2 are configured.
port
- The port number that is configured in the channel configuration for system1 and system2.
Open a command prompt and navigate to:
Oracle_Home
\product\11.1.0\ohs_1\Oracle_WT1\instances\instance1\bin
Restart the Oracle HTTP server using the following command:
opmnctl restartproc ias-component=ohs1
When providing the URL in the back end for the adapters (PeopleSoft, Siebel, JDEdwards) the URL must be in the following format:
http://ohsserver_ip
:7777/name
Where ohsserver_ip
is the IP address of the system where the Oracle HTTP server is installed and name
is the name of the Location configured in the mod_wl_ohs.conf file.
To configure the inbound process:
Create a target and channel using Application Explorer on the first system.
Connect to the target (on the first system) and create an inbound WSDL for the Oracle Application Adapter for SAP R/3 (MySAP node).
On the second system, create a target and channel using Application Explorer with the same name as specified on the first system.
Restart the Admin Server and the soa_servers on both systems.
As shown in Figure 1-28, create an inbound Mediator process using Oracle JDeveloper with the following configuration:
Figure 1-28 Inbound Mediator Process in Oracle JDeveloper
Save the process and deploy the process (to both SOA servers).
Trigger from the back end or use HTTP publisher and check if the output is shared and placed in the output locations (in both systems) that are configured in the Write File adapter.
To perform Singleton testing:
On the first system, create a target and channel using Application Explorer.
Connect to the target (on the first system) and create an inbound WSDL for the Oracle Application Adapter for SAP R/3 (MySAP node).
On the second system, create a target and channel using Application Explorer with the same name as specified on the first system.
Restart the Admin Server and the soa_servers on both systems.
As shown in Figure 1-29, create an inbound Mediator process using Oracle JDeveloper with the following configuration:
Figure 1-29 Inbound Mediator Process in Oracle JDeveloper
For singleton testing, open the composite.xml file (source view) and add the following property in the Service section:
<property name="singleton">true</property>
For example:
<service name="Service1" ui:wsdlLocation="MATMAS01_receive_cluster.wsdl"><interface.wsdl interface="http://xmlns.oracle.com/pcbpel/iWay/wsdl/MySAP/isdsrv2_cluster/MATMAS01#wsdl.interface(MATMAS01PortType)"/><binding.jca config="MATMAS01_receive_cluster_3P.jca"/><property name="singleton">true</property>
</service>
Save the inbound Mediator process and deploy the process to both SOA servers.
Trigger from the back end or use HTTP publisher and check if the messages are received by any system in the output location.
Stop the soa_server of the system that is receiving the messages.
Check whether the messages are being received by the second system.
When you are using the Singleton testing feature with Oracle Application Adapter for SAP R/3, there are some loss of messages (messages are dumped in the SAP GUI). This is caused because the end-point activation of the second system is in progress after the first system is down.
To retrieve the lost messages, perform the following steps:
Login to the SAP GUI.
Enter the /sm58 transaction and navigate to the dumped messages.
Right-click a dumped message, and then select Execute LUW.
Repeat step 3 for all the dumped messages.
All the lost messages are received in the Oracle Enterprise Manager console.
This section describes the steps required to successfully deploy the 11g Release 1 (11.1.1.4.0) Oracle Application Adapters in a cluster environment for Oracle Service Bus (OSB) and configuring for inbound processes.
This section describes how to configure and deploy J2CA.
To configure settings for the J2CA Connector Application:
Locate the ra.xml
file, which is located in the following directory:
<OSB_HOME>\Oracle_OSB1\3rdparty\ApplicationAdapters\iwafjca.rar\META-INF\ra.xml
Open the ra.xml
file in an editor.
Enter a value for the IWayHome
property. This is the folder where the Oracle Application Adapters are installed. For example:
<config-property> <config-property-name>IWayHome</config-property-name> <config-property-type>java.lang.String</config-property-type> <config-property-value> OSB_Home\Oracle_OSB1\3rdparty\ApplicationAdapters </config-property-value></config-property>
Enter a value for the IWayConfig
property. This is the value that you specified when you created a new J2CA configuration using Application Explorer. For example:
config-property> <config-property-name>IWayConfig</config-property-name> <config-property-type>java.lang.String</config-property-type> <config-property-value>J2CA_SampleConfig</config-property-value></config-property>
Enter a value for the Loglevel
property. This property can be set to DEBUG, INFO, or ERROR. For example:
<config-property> <config-property-name>LogLevel</config-property-name> <config-property-type>java.lang.String</config-property-type> <config-property-value>DEBUG</config-property-value></config-property>
Save the ra.xml
file and exit from the editor.
To deploy the J2CA Connector Application:
Open the Oracle Service Bus Administration Console in a Web browser by entering the following URL:
http://host name:port/sbconsole
Where host name
is the name of the system where Oracle WebLogic Server is running and port
is the port for the domain you are using. The port for the default domain is 7001.
The Oracle Service Bus Administration Console is displayed, as shown in Figure 1-30.
Figure 1-30 Oracle Service Bus Administration Console
Click Oracle WLS Console located on the menu bar.
The Oracle WebLogic Server Administration Console is displayed, as shown in Figure 1-31.
Figure 1-31 Oracle WebLogic Server Administration Console
In the Domain Structure section in the left pane, click Deployments.
The Deployments page is displayed.
Click Install.
The Install Application Assistant page is displayed.
Browse to the following directory:
<OSB_HOME>\Oracle_OSB1\3rdparty\ApplicationAdapters\
Select the option next to iwafjca.rar and click Next.
The Choose Targeting Style page is displayed.
Leave the default option selected (Install this deployment as an application) and click Next.
The Optional Settings page is displayed.
Leave the default options selected and click Next.
The Select deployment targets page is displayed, as shown in Figure 1-32.
Figure 1-32 Select Deployment Targets Page
Select AdminServer from the Servers section and OSB_Cluster_1 from the Clusters section.
Click Next.
The Summary page is displayed.
Click Finish.
The Settings page for the J2CA (iwafjca) Connector Application is displayed.
Click Save.
Verify that a success message is displayed.
This section describes how to deploy the J2CA Installation Verification Program (IVP).
To deploy the J2CA Installation Verification Program (IVP):
Open the Oracle Service Bus Administration Console in a Web browser by entering the following URL:
http://host name:port/sbconsole
Where host name
is the name of the system where Oracle WebLogic Server is running and port
is the port for the domain you are using. The port for the default domain is 7001.
The Oracle Service Bus Administration Console is displayed, as shown in Figure 1-33.
Figure 1-33 Oracle Service Bus Administration Console
Click Oracle WLS Console located on the menu bar.
The Oracle WebLogic Server Administration Console is displayed, as shown in Figure 1-34.
Figure 1-34 Oracle WebLogic Server Administration Console
In the Domain Structure section in the left pane, click Deployments.
The Deployments page is displayed.
Click Install.
The Install Application Assistant page is displayed.
Browse to the following directory:
<OSB_HOME>\Oracle_OSB1\3rdparty\ApplicationAdapters\
Select the option next to iwafjca.war and click Next.
The Choose Targeting Style page is displayed.
Leave the default option selected (Install this deployment as an application) and click Next.
The Optional Settings page is displayed.
In the Name field, enter iwafjcatest.
Leave the remaining default options selected and click Next.
The Select deployment targets page is displayed, as shown in Figure 1-35.
Figure 1-35 Select Deployment Targets Page
Select AdminServer from the Servers section and OSB_Cluster_1 from the Clusters section.
Click Next.
The Summary page is displayed.
Click Finish.
The Settings page for the J2CA IVP is displayed.
Click Save.
Verify that a success message is displayed.
Before executing an inbound process, the following configuration steps must be completed for the PeopleSoft, Siebel, and J.D. Edwards Oracle Application Adapters:
Navigate to the following location:
<Oracle_Home>\Oracle_WT1\instances\instance1\config\OHS\ohs1
Open the mod_wl_ohs.conf
file in an editor.
Add the IP address and port number for both systems.
Note: The port number refers to the value that was specified while creating the channel for the Oracle Application Adapter using Application Explorer. |
For example (PeopleSoft Adapter):
<Location /name>SetHandler weblogic-handlerWebLogicCluster system1_ip:port, system2_ip:portWLLogFile c:\tmp\psft.log </Location>
Where name
is any appropriate name, system1_ip
and system2_ip
are the system IP addresses where the SOA_Server1 and SOA_Server2 are configured, and port
are the numbers that are configured in the channel configuration for both systems.
Save the mod_wl_ohs.conf
file.
Perform the following steps to restart the Oracle HTTP server:
Open a command prompt and navigate to the following location:
C:\oracle\product\11.1.0\ohs_1\Oracle_WT1\instances\instance1\bin
Execute the following command:
opmnctl restartproc ias-component=ohs1
Use the following format when providing the URL for the PeopleSoft, Siebel, and J.D. Edwards Oracle Application Adapters:
http://ohsserver_ip
:7777/name
Where ohsserver_ip
is the IP address of the system where the Oracle HTTP server is installed and name
is the name that was specified in the <Location>
element in the mod_wl_ohs.conf
file.
As a best practice, it is recommended to use only a database repository (for example, Oracle) for adapters in development, test, and production environments. Do not use the File repository, which is provided by default only for initial startup purposes. The File repository is not supported for troubleshooting any issues.
This section describes how to generate input XML documents that can be used as payloads for outbound BPEL and Mediator processes.
Before continuing, ensure that the following components and applications are available:
Outbound WSDL document created using Application Explorer.
XML editor (for example, Oracle JDeveloper or Altova XML Spy, which is used as an example in this section).
Oracle WebLogic Server 11g Release 1 (11.1.1.4.0) with Oracle JDeveloper Studio.
To create a WSDL document using Application Explorer:
Ensure that Oracle WebLogic Server is started, which is where Application Explorer is deployed.
Open a command prompt window and navigate to the following directory:
<WLS_Home>
\user_projects\domains\base_domain\bin
Run setDomainEnv.cmd (Windows) or ../setDomainEnv.sh (UNIX/Linux).
The setDomainEnv
command sets the class path and other environment variables for Application Explorer in the Oracle WebLogic Server environment.
Do not close the command prompt window.
Navigate to the following directory:
For Oracle SOA Suite:
<Oracle_Home>
\Oracle_SOA1\soa\thirdparty\ApplicationAdapters\tools\iwae\bin
In this example, <ORACLE_HOME>
is the location where Oracle SOA Suite is installed.
For OSB:
<OSB_HOME>
\Oracle_OSB1\3rdparty\ApplicationAdapters\tools\iwae\bin\ae.bat
In this example, <OSB_HOME>
is the location where Oracle Service Bus is installed.
<OSB_Home>
\3rdparty\ApplicationAdapters\tools\iwae\bin
Run ae.bat (Windows) or iwae.sh (UNIX/Linux) to start Application Explorer.
Select an available J2CA configuration.
Select an appropriate adapter (for example, MySAP).
Create a new target or connect to an existing target.
Expand the created target adapter and select the appropriate object.
Right-click the object and select Create Outbound JCA Service(Request/Response).
The Export WSDL dialog is displayed.
Accept the default location in the Name field and click OK to export the WSDL document to the default location.
You can also click Browse to provide a different location and then click OK, which exports the WSDL document to your defined location.
Navigate to the location where the WSDL document was exported and verify that the WSDL, JCA, Request, and Response schema files are exported and available.
To generate an input XML file from a request schema:
Open an XML editor, as shown in Figure 1-36 (for example, Altova XML Spy, which is used as an example in this section).
Click File, and then select Open.
The Open dialog is displayed, as shown in Figure 1-37.
Navigate to the location on your file system where the XML request schema is exported, select the schema file and click Open.
The XML request schema file is opened and displayed in Altova XML Spy, as shown in Figure 1-38.
Figure 1-38 XML Request Schema File Displayed in Altova XML Spy
Check if the schema is well formed by clicking Check well-formedness or pressing F7, as shown in Figure 1-39.
Validate the schema by clicking Validate or pressing F8, as shown in Figure 1-40.
Once you have confirmed that the schema is well-formed and valid, click DTD/Schema, and then select Generate Sample XML File, as shown in Figure 1-41.
Figure 1-41 Generate Sample XML File Option
As shown in Figure 1-42, the Generate Sample XML File dialog is displayed.
Figure 1-42 Generate Sample XML File Dialog
Select the approprate parameters for your sample XML file and click OK when you are ready.
As shown in Figure 1-43, the sample XML file is generated in Altova XML Spy.
Figure 1-43 Sample XML File Generated in Altova XML Spy
Verify that the generated input XML file is well-formed and valid.
You can use the generated input XML file to invoke a BPM, BPEL, or Mediator process after providing the required values in the file.
Before you can use the generated input XML file in the Oracle Enterprise Manager console, verify that the following prerequisites are available:
BPM Outbound process created in JDeveloper and deployed in SOA_Server1
Mediator Outbound process created in JDeveloper and deployed in SOA_Server1
BPEL Outbound process created in JDeveloper and deployed in SOA_Server1
Mediator Outbound Process
Perform the following steps to use the input XML file in an outbound Mediator process:
Log in to the Oracle Enterprise Manager console by using the following URL:
http://localhost:7001/em
Expand your domain in the left pane followed by the SOA folder, as shown in Figure 1-44.
Figure 1-44 Oracle Enterprise Manager Console
As shown in Figure 1-45, select an outbound Mediator project (for example, MySAP_JCA_Test_BusinessArea_GetDetail_OB_Mediator).
Figure 1-45 Outbound Mediator Project Example
Click the Test button on the top right-hand corner of the console, as shown in Figure 1-46.
In the Input Arguments section, select XML View from the list and verify that the input XML is displayed, as shown in Figure 1-47.
Figure 1-47 XML View Option in Input Arguments Section
Note: For Mediator processes, it is mandatory for the input XML to be used with a namespace. |
The displayed XML in the Oracle Enterprise Manager console can be altered and used as follows:
XML Displayed in the Oracle Enterprise Manager Console
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body xmlns:ns1="urn:sap-com:document:sap:business"> <ns1:BusinessArea.GetDetail> </ns1:BusinessArea.GetDetail> </soap:Body> </soap:Envelope>
Altered XML
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body xmlns:ns1="urn:sap-com:document:sap:business"> <ns1:BusinessArea.GetDetail BusinessAreaId="1000"
> </ns1:BusinessArea.GetDetail> </soap:Body> </soap:Envelope>
The sample input XML that was generated using Altova XML Spy can be used after making the following required modifications:
Remove XML headers.
Add necessary inputs.
Add the soap headers as displayed in the Oracle Enterprise Manager console.
Modify the namespaces to match the namespaces in the input XML.
XML Generated Using Altova XML Spy
<?xml version="1.0" encoding="UTF-8"?> <!--Sample XML file generated by XMLSpy v2008 rel. 2 sp2 (http://www.altova.com)--> <bapi:BusinessArea.GetDetail BusinessAreaId="aaaa" xsi:schemaLocation="urn:sap-com:document:sap:business mysap_jca_BA_GetDetail_invoke_jan20_request.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bapi="urn:sap-com:document:sap:business"> <bapi:LANGUAGE>a</bapi:LANGUAGE> <bapi:LANGUAGE_ISO>aa</bapi:LANGUAGE_ISO> </bapi:BusinessArea.GetDetail>
Altered XML
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body xmlns:ns1="urn:sap-com:document:sap:business">
<ns1
:BusinessArea.GetDetail BusinessAreaId="1000
"> <ns1
:LANGUAGE>D</ns1
:LANGUAGE> <ns1
:LANGUAGE_ISO>EN</ns1
:LANGUAGE_ISO> </ns1
:BusinessArea.GetDetail></soap:Body> </soap:Envelope>
Click Test Web Service after providing the input XML, as shown in Figure 1-48.
The output is displayed in the Response tab.
BPEL Outbound Process
Perform the following steps to use the input XML file in an outbound BPEL process:
Log in to the Oracle Enterprise Manager console by using the following URL:
http://localhost:7001/em
As shown in Figure 1-49, expand your domain in the left pane followed by the SOA folder.
Figure 1-49 Oracle Enterprise Manager Console
As shown in Figure 1-50, select an outbound BPEL project (for example, MySAP_JCA_Test_BusinessArea_GetDetail_OB_BPEL).
Figure 1-50 Outbound BPEL Project in Oracle Enterprise Manager Console
Click the Test button on the top right-hand corner of the console, as shown in Figure 1-51.
In the Input Arguments section, select XML View from the list and verify that the input XML is displayed, as shown in Figure 1-52.
Figure 1-52 Input XML Document Inside Input Arguments Section
Note: For BPEL processes, it is not mandatory for the input XML to be used with a namespace. |
The displayed XML in the Oracle Enterprise Manager console can be altered and used as follows:
XML Displayed in the Oracle Enterprise Manager Console
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body xmlns:ns1="urn:sap-com:document:sap:business"> <ns1:BusinessArea.GetDetail> </ns1:BusinessArea.GetDetail> </soap:Body> </soap:Envelope>
Altered XML With Namespace
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body xmlns:ns1="urn:sap-com:document:sap:business"> <ns1:BusinessArea.GetDetail BusinessAreaId="1000"
> </ns1:BusinessArea.GetDetail> </soap:Body> </soap:Envelope>
Altered XML Without Namespace
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body xmlns="urn:sap-com:document:sap:business"> <BusinessArea.GetDetail BusinessAreaId="1000"
> </BusinessArea.GetDetail> </soap:Body> </soap:Envelope>
The sample input XML that was generated using Altova XML Spy can be used after making the following required modifications:
Remove XML headers.
Add necessary inputs.
Add the soap headers as displayed in the Oracle Enterprise Manager console.
Modify or remove the namespaces.
XML Displayed in XML View in the Oracle Enterprise Manager Console
<?xml version="1.0" encoding="UTF-8"?> <!--Sample XML file generated by XMLSpy v2008 rel. 2 sp2 (http://www.altova.com)--> <bapi:BusinessArea.GetDetail BusinessAreaId="aaaa" xsi:schemaLocation="urn:sap-com:document:sap:business mysap_jca_BA_GetDetail_invoke_jan20_request.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bapi="urn:sap-com:document:sap:business"> <bapi:LANGUAGE>a</bapi:LANGUAGE> <bapi:LANGUAGE_ISO>aa</bapi:LANGUAGE_ISO> </bapi:BusinessArea.GetDetail>
Altered XML With Namespace
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body xmlns:ns1
="urn:sap-com:document:sap:business"> <ns1
:BusinessArea.GetDetail BusinessAreaId="1000"
> <ns1
:LANGUAGE>D</ns1
:LANGUAGE> <ns1
:LANGUAGE_ISO>EN</ns1
:LANGUAGE_ISO> </ns1
:BusinessArea.GetDetail> </soap:Body> </soap:Envelope>
Altered XML Without Namespace
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body xmlns="urn:sap-com:document:sap:business"> <BusinessArea.GetDetail BusinessAreaId="1000"
> <LANGUAGE>D</ LANGUAGE> < LANGUAGE_ISO>EN</ LANGUAGE_ISO> </BusinessArea.GetDetail> </soap:Body> </soap:Envelope>
Click Test Web Service after providing the input XML with or without a namespace.
The output is displayed in the Response tab, as shown in Figure 1-53.
Input XML With Namespace
Figure 1-53 Input XML Document With Namespace
Response
Input XML Without Namespace
Figure 1-55 Input XML Document Without Namespace
Response
Figure 1-56 XML Response Document Being Returned
Using the Input XML File in an Outbound BPM Process
Perform the following steps to use the input XML file in an outbound BPM process:
Log in to the Oracle Enterprise Manager Console by using the following URL:
http://localhost:7001/em
Expand your partition under soa-infra (soa_server1) in the left pane followed by the SOA folder, as shown in Figure 1-57.
Figure 1-57 Partition Expanded Under soa-infra
As shown in Figure 1-58, select an outbound BPM project (for example, SAP2_isdsrv2_BA_GD_jca_ob).
Figure 1-58 Outbound BPM Project Selected
Click Test on the top right-hand corner of the console, as shown in Figure 1-59.
In the Input Arguments section, select XML View from the list and verify that the input XML is displayed, as shown in Figure 1-60.
Figure 1-60 XML View Option Selected in the Input Arguments Section
Note: For BPM processes, it is required for the input XML to be used with a namespace. |
The displayed XML in the Oracle Enterprise Manager console can be altered and used as follows:
XML Displayed in the Oracle Enterprise Manager Console
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body xmlns:ns1="http://xmlns.oracle.com/bpmn/bpmnProcess/Process"> <ns1:operation xmlns:ns2="urn:sap-com:document:sap:business"> <ns2:BusinessArea.GetDetail/> </ns1:operation> </soap:Body></soap:Envelope>
Altered XML
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body xmlns:ns1="http://xmlns.oracle.com/bpmn/bpmnProcess/Process"> <ns1:operation xmlns:bapi="urn:sap-com:document:sap:business"> <bapi:BusinessArea.GetDetail BusinessAreaId="0001"> <bapi:LANGUAGE>D</bapi:LANGUAGE> <bapi:LANGUAGE_ISO>DE</bapi:LANGUAGE_ISO> </bapi:BusinessArea.GetDetail> </ns1:operation> </soap:Body></soap:Envelope>
The sample input XML that was generated using Altova XML Spy can be used after making the following required modifications:
Remove the XML headers.
Add the necessary inputs.
Add the SOAP headers as displayed in the Oracle Enterprise Manager Console.
Modify the namespaces to match the namespaces in the input XML.
XML Generated Using Altova XML Spy
<?xml version="1.0" encoding="UTF-8"?> <!--Sample XML file generated by XMLSpyv2008 rel. 2 sp2 (http://www.altova.com)--> <bapi:BusinessArea.GetDetail BusinessAreaId="aaaa" xsi:schemaLocation="urn:sap-com:document:sap:business mysap_jca_BA_GetDetail_invoke_jan20_request.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bapi="urn:sap-com:document:sap:business"> <bapi:LANGUAGE>a</bapi:LANGUAGE> <bapi:LANGUAGE_ISO>aa</bapi:LANGUAGE_ISO></bapi:BusinessArea.GetDetail>
Altered XML
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body xmlns:ns1="http://xmlns.oracle.com/bpmn/bpmnProcess/Process"> <ns1:operation xmlns:bapi="urn:sap-com:document:sap:business"> <bapi:BusinessArea.GetDetail BusinessAreaId="0001"> <bapi:LANGUAGE>D</bapi:LANGUAGE> <bapi:LANGUAGE_ISO>DE</bapi:LANGUAGE_ISO> </bapi:BusinessArea.GetDetail> </ns1:operation> </soap:Body></soap:Envelope>
Click Test Web Service after providing the input XML, as shown in .
The output is received in the destination folder.