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!


Sunday, October 12, 2008

Create a US iTunes Account from South Africa (Or anywhere else)

Many of you might have seen that the South African iTunes don't have any games for the iPhone, not even free ones.. :-( Well you can create a free US account to download them!

Here's how:

1. In iTunes, sign out of any other accounts you have. (By clicking on your account name in the top right corner, and then selecting "Sign Out".
2. Go to the botton of the page, and choose “United States” for the country.


3. Go to any free item to download. (A free game in the appstore will work well). Click "Get App".


4. When prompted to log in, choose “Create New Account”
5. Hit “Continue”
6. Agree & “Continue”

7. Fill in some details and click “Continue”. Note you'll need a real valid email address.

8. Select “None” for payment option, make your state “FL – Florida”, City “Tallahassee”, ZIP Code “32301”. (Put in any other street and telephone number)


9. You will receive a activation email, click on the link and your account will be activated!

Note, you will only be able to download free content. I you want to buy content you will need to buy a iTunes gift certificate. I think you can find some on eBay, or if you live in the Johannesburg area, I saw that WW Computers in Cresta shopping centre sell some.

Happy downloading!

Sunday, August 24, 2008

Color Code Your Mac Terminal

Something I realized on my Mac is that the terminal isn't color coded. It is however when you ssh to a linux machine but not locally. However there is a quick and easy fix..

From the terminal open the following file (create if it don't exist) in home directory with your favorite text editor (vi should work fine): "~/.bash_profile"
Add the following lines:

export TERM=xterm-color
alias ls='ls -G'
alias ll='ls -hl'

Your 'ls' command should now display some color like this:

Monday, August 4, 2008

Connect to a Windows Server VPN from Leopard

Well I had some trouble connecting to a Windows Server VPN with Leopard, and found a very simple solution. I don't know if this will work in all cases, but here goes anyway..

Goto System Preferences -> Network. Then click on the little "+" sign at the bottom left saying Create a new service when you hover the mouse over it. Choose VPN for Interface, and PPTP for VPN Type. Add a New Configuration, type in your Server Address, Account Name (This is your VPN username), and under Authentication Settings your password.

When I did all of this I could connect, but couldn't access anything on the network. The fix was to go to "Advanced" and check the Send all traffic over VPN connection option.



After doing all this you should be able to connect and access the network.

Monday, July 21, 2008

Sqlplus on a Mac with Oracle Instant Client

One of the things any Oracle developer uses is sqlplus, but getting it to work on Mac OS-X is not quite as easy as on Windows. Follow these steps to install sqlplus on your Mac.

1. Download the Oracle Instant Client Zip files:
  • Instant Client Package - Basic
  • Instant Client Package - SQL*Plus
  • Instant Client Package - JDBC Supplement (Optional)
  • Instant Client Package - SDK (Optional)
2. Launch the Terminal and unzip the files to instantclient10_2.

unzip instantclient-basic-macosx-10.2.0.4.0.zip
unzip instantclient-sqlplus-macosx-10.2.0.4.0.zip
unzip instantclient-jdbc-macosx-10.2.0.4.0 #Optional
unzip instantclient-sdk-macosx-10.2.0.4.0 #Optional

3. Move the directory to where you want it. I put mine in /usr/local/oracle/instantclient_10_2.

sudo mkdir /usr/local/oracle/
sudo mv instantclient_10_2 /usr/local/oracle/

4. Then go to this directory and make symbolic links for dynamic libraries.

sudo ln -s libclntsh.dylib.10.1 libclntsh.dylib
sudo ln -s libocci.dylib.10.1 libocci.dylib

5. I reccomend creating a tnsnames.ora file where you add all your connection details. I placed mine in /usr/local/oracle/network/admin.

Example of a tnsnames.ora file:

IDENTIFIER =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = userid.myhosteddb.net)(PORT = 1521))
)
(CONNECT_DATA = (SID = odb))
)

6. Then you need to set up necessary environment variables. I added mine to my .bash_profile script so they are alway's set when I run the terminal.

In your home folder you can type:


vi .bash_profile

And then add the following lines at the end of the file (Make sure you set the PATH correctly otherwise sqlplus won't run):

export DYLD_LIBRARY_PATH="/usr/local/oracle/instantclient_10_2"
export SQLPATH="/usr/local/oracle/instantclient_10_2"
export TNS_ADMIN="/usr/local/oracle/network/admin"
export NLS_LANG="AMERICAN_AMERICA.UTF8"
export PATH=$PATH:$DYLD_LIBRARY_PATH

7. You should now be able to run sqlplus. Close the terminal and re-lunch it. Now run:

sqlplus [username]/[password]@[service]

8. Sqlplus should now run and look something like this:

Saturday, July 5, 2008

Oracle E-Business Suite on a Mac

One of my first concerns as a Oracle developer when considering switching to a Mac was if I would be able to access Oracle E-Business Suite. (Or Oracle Applications as many may know it by) Even though the official Oracle E-Business suite blog (http://blogs.oracle.com/stevenChan/2006/08/18/) clearly states that is supports it, I know from previous experience that it can be quite a mission to work with Jinitiator (the java tool required to access Oracle forms), especially if you are a consultant and move between different sites who uses different versions of E-Business, and more importantly different Jinitiator versions. From different versions of Jinitiators that clash, to Firefox that don't recognize it, to Internet Explorer crashing on me, I always had problems on Windows, so surely getting it to work on a Mac must be quite a mission right? Wrong! Since E-Business on a Mac only uses Java and no Jinitiator its a breeze to use, and I could access E-Business with Safari without doing anything, or installing any plugins!


Apps Login screen

Apps Navigation Menu


Find Concurrent Request


Shipping Transactions


Quoting Module


Workfow Monitor

After it was sooo easy to login to E-Business from Safari, I thought there is no chance of Firefox working so easily. I fired up Firefox and logged into E-Business again without having to install anything. Awesome!


Oracle Financials in Firefox

Something I did pick up though which is very annoying is the default assignments of the F-keys in Mac OS X. Since its the default way to search in E-Business with the F11-key, but in Leopard's System Prefrences its set to Desktop. The easiest way to get rid of this problem is to go to System Preferences -> Keyboard & Mouse -> Keyboard Shortcuts -> Desktop, and deselect it.



My conclusion is that it is even easier to work on Oracle E-Business suite on Mac OS X than on Windows, and I would recommend any E-Business user who is thinking of switching, to seriously consider it!

Applications Versions Used:
Mac OS X Leopard: 10.5.3
Safari: 3.1.1
Oracle E-Business Suite: 11i
Java: build 1.5.0_13-119
Firefox: 3.0