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.

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:


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 -> 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!