Monday, January 5, 2009

Install & Use Oracle SQL Developer 1.5.x on a Mac
To install Oracle SQL Developer on a Mac is as easy as installing any application on a Mac. Just unzip the downloaded archive (download it from here), and drag the file to your applications folder. SQL Developer is a great SQL tool for the mac, but there are quite a few things I didn't like with its default settings, so here's what I changed:

1. Line Terminator – If you work like me in a Windows dominant office, you'll be sure to change your line terminator from “Platform Default” to “Windows”. This will insure that your newline caracters you add also show up on a Windows, Linux and Mac computer so you can't go wrong with that setting.

2. Fontsize – On my Macbook pro 15” the fontsize is way too small for me. To do this go to Tools -> Preferences -> Code Editor -> Fonts. I changed mine from the default 12 to 15 on Monospaced.




3. Colors – Coming from Toad, the default SQL Developer text color's are downright ugly. I liked the Toad color scheme, so I changed mine to the same colors. To do this go to Tools -> Preferences -> Code Editor -> Syntax Colors. Change the following colors:
  • Default Keyword –> Blue. Also turn off Bold.
  • Default Comment –> Green.
  • Default String –> Red.
  • Default Number –> Dark red.
  • Selected Text – Foreground -> Black. Background –> Light Grey.
You can even save your new scheme as “Toad” ;-) Your colors will then go from this first image to the second one.. :-)


Another few changes I have made is to the accelerators.You can find them under Tools -> Preferences ->Accelerators.
1. Popup Describe – I made this F4. (The same as Toad)
2. Execute Statement – I made mine Cmd+Enter and CTRL+Enter.
Done!

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