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. ;-)

Tuesday, November 17, 2009

Oracle SQL Developer 2.1 User Snippets

If you are like me and installed the new Oracle SQL developer 2.1 Early Adopter edition on your mac you might have noticed that your user snippets are gone. Also that the directory where you could normally back them up from is no longer working. Well, its only stored in a new location and you can find all your SQL developer settings like your UserSnippets.xml, UserReports.xml and SqlHistory.xml in there.

SQL Developer 1.x location:
/Users/youruser/Library/Application Support/SQLDeveloper/

SQL Developer 2.1 EA location:
/Users/youruser/.sqldeveloper/

Also note that the new directory is a hidden folder so you might need to use the terminal (or any other way you access hidden files) to access it.

Sunday, August 16, 2009

Launch Apex from Oracle eBusiness Suite Release 12

From eBusiness Suite Release 12, we can't use the SSWA plsql function any more. Thus we have to use a jsp function to launch a web page. Here's how to launch a Apex report from a function:

1. Download the xx_launch_apex.jsp file here.

2. Copy xx_launch_apex.jsp to the $OA_HTML folder on the APPS application server. (Something like /u02/DEV/apps/apps_st/comn/webapps/oacore/html)

3. Compile the JSP.
- You can turn on autocompile: Metalink Note: 458338.1.
- Or you can run the following command as user applmgr:
perl -x /u01/app/oracle/TRAIN/apps/apps_st/appl/fnd/12.0.0/patch/115/bin/ojspCompile.pl --compile -s xx_launch_apex.jsp -conf /u01/app/oracle/TRAIN/inst/apps/TRAIN_trn82301/appl/admin/ojspCompile.conf –-flush

4. Set up function to use JSP. (Example below)


(hostname=mssoa11.bytes.local&port=7777&appnum=141&pagenum=1)
(hostname=apex_hostname&port=apex_port&appnum=apex_application_number&pagenum=apex_application_page_number)
Note: If you have no port number use 'null' for the port number.

5. Add function to menu and launch!