Showing posts with label jdevloper. Show all posts
Showing posts with label jdevloper. Show all posts

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!

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

Sunday, March 1, 2009

Setting an environment variable in Mac OS X

Setting the environment variable in files like .bash_profile won't work (unless you launch the application from the terminal) because in OSX the applications are not started as in other UNIX'es, they don't inherit the parents shell variables.

Applications like Oracle JDeveloper for mac also don't work by just setting .bash_profile. The only way is to edit /etc/launchd.conf to contain a line like this: "setenv VAR value" and then reboot the system.

Saturday, February 21, 2009

Oracle JDeveloper anti aliased text

I don't know about you, but I love anti aliased text. Here's how to add it to Jdeveloper.

Add this to your jdev.conf file:
"AddVMOption -Dswing.aatext=true"

Tuesday, November 18, 2008
















Calling a WS-Security secured web service from Oracle BPEL

Oracle provides a nice guide to show you how to secure a web service using the Oracle Web Service Manager here. So how do you call this WS-Security enabled web service? Easy, just follow the following steps:

1. Import the secured wsdl as a partner link.

2. Go to the properties tab, and add the following properties:

  • wsseHeaders - Property Value : credentials
  • wsseUsername - Property Value : your_webservice_username
  • wssePassword - Property Value : your_webservice_password

3. Click ok.
4. Thats it, you can now call the partner link with an invoke and map all the fields you require.

5. The BPEL process can now be deployed.

Update:
If the source service uses http for authentication method, use in your properties tab:

  • basicHeaders - Property Value : credentials
  • basicUsername - Property Value : your_webservice_username
  • basicPassword - Property Value : your_webservice_password


Saturday, November 8, 2008

Installing Subversion on Windows for use with Oracle Jdeveloper.

Versions I used (Note that these versions are certified by Oracle. Using other versions might not work):

1. Download the following files:
  • svn-1.3.2-setup.exe
  • svn-win32-1.3.2_javahl.zip
  • subversion_bundle.zip from above links.

2. Install subversion (svn-1.3.2-setup.exe).

3. Extract the contents of svn-win32-1.3.2_javahl.zip to a temporary folder, and copy libsvnjavahl-1.dll & svnjavahl.jar to the subversion bin folder. (Mine was C:\Program Files\Subversion\bin)
4. Edit environment variables svn_editor to point at a text editor of your choice.
Mine was:

“c:\windows\notepad.exe”

5. Create a directory for your repo, and your repo.

svnadmin create "c:\repos\mynewrepo"

6. Within that newly created folder, uncomment the following lines in the conf/svnserve.conf file by removing the pound character from the start of each line and change to:

anon-access = none
auth-access = write
password-db = passwd

7. Edit passwd file.

  • Remove the default users.
  • Add users in the format uname = password one per line.

8. Start Subverstion. Run (and keep window open)

svnserve --daemon --root "c:\repos\mynewrepo"

You can also write a .bat file and put it in your system startup to start the svn automatically. Mine looked something like this:
(Note you might want to add your svn's bin folder to your path environment variable)

start svnserve.exe --daemon --root "c:\repos\mynewrepo"

@echo SVNServe

9. In another command window type:

svn mkdir svn://localhost/myproject

  • Your svn_editor of choice should open so add a comment at the top, then save and close it.
  • In the command prompt window it should ask you to authenticate.
  • It defaults to the current logged in username so unless you created that user hit return to skip.
  • Enter the username of a user you added in the passwd file.
  • Enter the password.
  • You should see "committed revision 1". - This means your subversion is up and running.

10. Open JDeveloper.
  • Go to Help -> Check for updates -> Choose from file, and choose the subversion_bundle.zip you downloaded above.

  • Go to Versioning -&amp;amp;amp;gt; Select Version System -> Subversion
  • Go to View -> Subversion Navigator
  • In the navigator, right click on Subversion -> New repository connection
  • Fill in your details and test your connection.

  • Click ok and start using subversion!