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.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">
<category id="start-parameters">        
<data id="java-options" value="
-XX:MaxPermSize=128M –ms512M
-mx1024M -XX:AppendRatio=3
-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
/10.1.3/soad/bpel/lib/orabpel-boot.jar -Dhttp.proxySet=false"

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">
category id="start-parameters"> <data id="java-options" value="-server –mx1024M
-ms512M -XX:MaxPermSize=128M
-Dhttp.proxySet=false -Doc4j.userThreads=true
-Dhttp.proxyPort=8080 -Dhttp.nonProxyHosts="

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

1 comment:

sap testing said...

This given post describes how to invoke a partner web service through a proxy server. In this post you will find a program which accomplishes the given task. I find the program bit difficult to understand but I am surely going to try it again.