Tuesday, December 23, 2014

Direct Binding Adapter between Oracle Fusion Middleware 11g and 12c

From Oracle documentation we know the following:
“A SOA composite can invoke any Service Bus SB WSDL-based proxy service. To invoke an SB proxy service, the SOA service component must use a direct binding reference of Target Type "Oracle Service Bus."

However can this we done between FMW11g and FMW12c? The answer is in fact YES, and this can help in a strategy to run 11g and 12c in parallel without compromising performance.
clip_image002[4]
Steps on how to achieve this:
Open your 11g Service Bus Console.
clip_image004[4]
Go to your http OSB proxy service, and edit the Transport Configuration.
clip_image006[4]
Switch the protocol from http to sb.
 clip_image008[4]
Click Last. Click Save. Click Activate. Click Submit.
 clip_image010[4]
Export the WSDL of the proxy to be used later in JDeveloper. (It will export as a .jar file that you can extract)
clip_image012[4]
You have now changed the protocol of the proxy from HTTP to SB. Thus this proxy cannot be invoked over the HTTP protocol anymore. Alternatively you can create a clone of the proxy service and have a HTTP and SB version available.
Now launch JDeveloper for 12.
clip_image014[4]
Create a new BPEL process in the same way as normally done.
clip_image016[4]
Now drag in the Direct Binding from the BPEL Services tab under the Components tab.
clip_image018[4]
Supply a name and change the Reference Target to Oracle Service Bus. Then browse for the WSDL file you downloaded earlier. Note that the Provider URL is t3 protocol.
Click OK.
clip_image020[4]
Create an Invoke step, and assign the input and output of the call like you would normally do.
 clip_image022[4]
Deploy the SCA to your 12c environment and log into Enterprise Manager 12c.
 clip_image024[4]
You can now test the Service.
 clip_image026[4]
You can also launch the flow trace to inspect the flow. Note the Direct Binding icon on the flow.
 clip_image028[4]
You have now successfully connected OSB11g and BPEL12c without the overhead of HTTP calls!

Friday, June 25, 2010

OTM EBS Customer Integration

I have got a couple of queries on the otmfaq.com site at: http://www.otmfaq.com/forums/f24/customer-information-616-new/
Thus I’ve provided the queries here:
select 'CUS-'||rac.customer_id customer_XID, rac.customer_name, 'ZAF' customer_country, 'CUS-'||rac.customer_id||'-'||arv.party_location_id customer_location_XID, rac.customer_name||','||substr(arv.city,1,10)||','||substr(arv.province,1,4)||','||nvl((SELECT b.iso_territory_code FROM FND_TERRITORIES_VL b WHERE UPPER(b.territory_code) = UPPER(arv.country)),'TBA') location_name, arv.address1, arv.address2,arv.address3, arv.address4, arv.city, arv.province, arv.postal_code, nvl((SELECT b.iso_territory_code FROM FND_TERRITORIES_VL b WHERE UPPER(b.territory_code) = UPPER(arv.country)),'TBA') country from ra_customers rac left join ar_addresses_v arv on rac.customer_id = arv.customer_id;
select 'CUS-'||rac.customer_id customer_XID, rac.customer_name, 'ZAF' customer_country, 'CUS-'||rac.customer_id||'-'||arv.party_location_id customer_location_XID, rac.customer_name||','||substr(arv.city,1,10)||','||substr(arv.province,1,4)||','||nvl((SELECT b.iso_territory_code FROM FND_TERRITORIES_VL b WHERE UPPER(b.territory_code) = UPPER(arv.country)),'TBA') location_name, nvl(arv.address1,' ') address1, nvl(arv.address2,' ') address2,nvl(arv.address3,' ') address3, nvl(arv.address4,' ') address4, nvl(arv.city,' ') city, nvl(arv.province,' ') province, nvl(arv.postal_code,' ') postal_code, nvl((SELECT b.iso_territory_code FROM FND_TERRITORIES_VL b WHERE UPPER(b.territory_code) = UPPER(arv.country)),'TBA') country from ra_customers rac left join ar_addresses_v arv on rac.customer_id = arv.customer_id;
--Customers
select 'CUS-'||rac.customer_id customer_XID, rac.customer_name, 'ZAF' customer_country from ra_customers rac;
--Customer locations
select 'CUS-'||rac.customer_id||'-'||arv.party_location_id customer_location_XID, rac.customer_name||','||substr(arv.city,1,10)||','||substr(arv.province,1,4)||','||nvl((SELECT b.iso_territory_code FROM FND_TERRITORIES_VL b WHERE UPPER(b.territory_code) = UPPER(arv.country)),'TBA') location_name, arv.address1, arv.address2,arv.address3, arv.address4, arv.city, arv.province, arv.postal_code, nvl((SELECT b.iso_territory_code FROM FND_TERRITORIES_VL b WHERE UPPER(b.territory_code) = UPPER(arv.country)),'TBA') country, 'CUS-'||rac.customer_id customer_parent from ra_customers rac left join ar_addresses_v arv on rac.customer_id = arv.customer_id;
For some of this you will need to set the environment first:
begin dbms_application_info.set_client_info(<your_org_id>); end;

Tuesday, December 1, 2009

Oracle BPEL - Invoking a Partner Web Service through a Proxy Server

When trying to call a web service through a proxy server (or trying to avoid using the proxy server for certain hosts) the BPEL Process Manager Administrator’s Guide have steps to edit a file, but I found doing this alone don’t work. The guide basically states to modify the following file: $ORACLE_HOME/bpel/bin/obsetenv.sh

And then modify the line set OB_JAVA_PROPERTIES= as follows:

set OB_JAVA_PROPERTIES="-Dhttp.proxySet=true"
"-Dhttp.proxyHost=myproxy004.company.com"
"-Dhttp.proxyPort=8090" "-Dhttp.nonProxyHosts=internal123.company.com"

After rebooting the BPEL server, it still didn’t work. What I had to do was also modify the following file: ORACLE_HOME/opmn/conf/opmn.xml

Look for the piece of XML that looks like this:

<process-type id="oc4j_soadev" module-id="OC4J" status="enabled">
<module-data>
<category id="start-parameters">        
<data id="java-options" value="
-server
-XX:MaxPermSize=128M –ms512M
-mx1024M -XX:AppendRatio=3
-
Djava.security.policy=$ORACLE_HOME/j2ee/oc4j_soadev/config/java2.policy
-Djava.awt.headless=true
-Dhttp.webdir.enable=false-Doraesb.home=/u01/app/oracle/product/10.1.3/soad/integration/esb -Dhttp.proxySet=false -Doc4j.userThreads=true -Doracle.mdb.fastUndeploy=60
-Dorabpel.home=/u01/app/oracle/product/10.1.3/soad/bpel
-Xbootclasspath^/p:/u01/app/oracle/product
/10.1.3/soad/bpel/lib/orabpel-boot.jar -Dhttp.proxySet=false"
/>             
</category>

Then modify the Dhttp.proxySet=false and change it to Dhttp.proxySet=true, add -Dhttp.proxyHost for your proxy server,  Dhttp.proxyPort for your proxy server port and Dhttp.nonProxyHosts for hosts that should not go through the proxy. The end result should look something like this:

<process-type id="oc4j_soadev" module-id="OC4J" status="enabled">
<module-data>
<
category id="start-parameters"> <data id="java-options" value="-server –mx1024M
-ms512M -XX:MaxPermSize=128M
-XX:AppendRatio=3-Djava.security.policy=$ORACLE_HOME/j2ee/oc4j_soadev
/config/java2.policy
-Djava.awt.headless=true
-Dhttp.webdir.enable=false-Doraesb.home=/u01/app/oracle/product/10.1.3/soad
/integration/esb
-Dhttp.proxySet=false -Doc4j.userThreads=true
-Doracle.mdb.fastUndeploy=60
-Doc4j.formauth.redirect=true
-Djava.net.preferIPv4Stack=true
-Dorabpel.home=/u01/app/oracle/product/10.1.3/
soad/bpel-Xbootclasspath^/p:/u01/app/oracle/product
/10.1.3/soad/bpel/lib/orabpel-boot.jar
-DHTTPClient.disableKeepAlives=true
-Dhttp.proxySet=true
-Dhttp.proxyHost=10.10.10.1
-Dhttp.proxyPort=8080 -Dhttp.nonProxyHosts=10.10.10.2"
/>    
</category>

Now you can call webservices through a proxy server. ;-)