Wednesday, June 04, 2008

Calling Secure Services

There are two most popular ways of securing Webservices, We will talk about them and how to invoke those secured services from BPEL.


Basic Secure Services:

These services are required to send authentication information (username / password) in HTTP Header to access.

WS-Security Services:

These services are required to send authentication information ( username / password) as WS-Security tokens in SOAP Envelope to access.

How to Add HTTP Authentication in BPEL:

Add the following properties in bpel.xml under the partner link for that service.

<property name="httpHeaders">credentials</property>
<property name="httpUsername">kalyan</property>
<property name="httpPassword">welcome1</property>

OR


<property name="basicHeaders">credentials</property>
<property name="basicUsername">kalyan</property>
<property name="basicPassword">welcome1</property>


How to Add WS-Security Tokens in BPEL

Add the following properties in bpel.xml under the partner link for that service.

<property name="wsseHeaders">credentials</property>
<property name="wsseUsername">kalyan</property>
<property name="wssePassword">welcome1</property>

Thursday, April 17, 2008

Oracle SOA Suite Patchsets

Important Oracle Patch sets:

10.1.3.1 : Download From OTN http://otn.oracle.com/soa
10.1.3.3 : Available as a patch from Metalink Patch # 6148874
10.1.3.3.1 : Available as a patch from Metalink Patch # 6492514

10.1.3.3 Addendum : YOU MUST READ THIS
Doc Id: 435108.1 : Oracle Application Server 10g Release 3 (10.1.3.3) Patch Set Notes Addendum

Additional Notes you should read the following notes on metalink if you are installing on Solaris Sparc 64
Doc Id: 460283.1 : Patch 6148874 Does Not Deploy Any OC4J Applications on Solaris
Doc Id: 6330834 : WHEN USING NFS, OC4J 10.1.3.3 DOESN'T START CORRECTLY.

10.1.3.3.1 Bugs FixedLink


10.1.3.3.1 Additional InformationLink

Friday, April 11, 2008

Why timeout property is not working ?

When we call a synchronous webservice we can specify how much we want to wait for the response to come back before the sytem level timeout occurs.

This is acheived with "timeout" property added to the partnerlink binding in the bpel.xml.

ex:
<partnerlinkbinding name="CallCreditService">
<property name="wsdlLocation">http://KBITRA-LAP:7777/orabpel/default/TestHello/TestHello?wsdl</property>
<property name="timeout">30</property>

so you are waiting for this to timeout in 30seconds but does not appear to be working and the system level timeout occurs.

The reason for this is this property works when the invocation happens on soap stack, when bpel calling another bpel process as you know by now automatically switches this soap call to be local binding call. In order to achieve this you have to add another property called "optSoapShortcut to false" in the bpel.xml for that partner link

How to do it: Steps

1. Open BPEL project from Jdeveloper
2. Open bpel.xml look for "partnerLinkBinding" for the partner you are trying to invoke and add the following property tag inside.
false

So here is the changed version:

<partnerLinkBinding name="CallCreditService">
<property name="wsdlLocation">http://KBITRA-LAP:7777/orabpel/default/TestHello/TestHello?wsdl</property>
<property name="timeout">30</property>
<property name="optSoapShortcut">false</property>
</partnerLinkBinding>

Wednesday, March 19, 2008

Using XE as Dehydration for SOA Suite

If you are using XE as your dehydration store for oracle soa suite, often you see a connection issue happening from BPELConsole or ESBConsole or OWSM that server "Cannot fetch a datasource connection". One of the possible reasons after making sure your connection information is correct is to increase the number of sessions/processes for XE.

The default number of sessions / process in XE is 20 each which is not sufficient for SOA Suite, you have to increase that to a minimum of 50.

Here are the instructions on how to do it !

Increase Database Sessions / Processes

Make sure you shutdown your soa suite.
Goto Start->Oracle Database 10g Express Edition ->Run SQL Command Line
At the SQL Prompt enter the following commands.
SQL> connect / as sysdba
SQL> show parameters processes
SQL> alter system set processes=100 scope=spfile;
SQL> alter system set sessions=100 scope=spfile;
SQL> shutdown immediate
SQL> startup
SQL> show parameters processes