Tuesday, February 19, 2008

Using SOAP_CLIENT to access Human Tasks services

The are a lot of issues related to access the human work flow tasks from java. Especially via SOAP. The Java API of Oracle SOA Suite provides a mechanism to use various access method:
  • JAVA_CLIENT
  • REMOTE_CLIENT
  • SOAP_CLIENT
It is hard to get the Java API working with the SOAP_CLIENT method. I'm using now SOA Suite 10.1.3.3.1 And dit the following:
  • commons-logging-api.jar
  • commons-logging.jar
  • bpm-infra.jar
  • orabpel-common.jar
  • orabpel-thirdparty.jar
  • orabpel.jar
  • oc4jclient.jar
  • jazncore.jar
  • xml.jar
  • xmlparserv2.jar
  • orasaaj.jar
  • soap.jar
  • bpm-services.jar
  • wsclient_extended.jar
Note :wsclient_extended.jar can be download from OTN.

Create you Java project and use the following libraries, I copied the libraries from the application server.

The I changed the orabpel.jar file! It is a strange trick, but you must remove all the files from META-INF directory:
  1. Extract orabpel.jar
  2. Remove all files in META-INF
  3. Re-jar orabpel.jar
Make sure you have a correct version of the wf_client_config.xml file. This file must be located in your source directory. The file is copied from application server $ORACLE_HOME/bpel/system/services/config. Verify that the connection to your remote server is removed! Remove the ejb tags.
   <ejb>
<serverURL>opmn:ormi://linux.site:oc4j_soa/hw_services</serverURL>
<user>oc4jadmin</user>
<password>welcome1</password>
<initialContextFactory>oracle.j2ee.rmi.RMIInitialContextFactory</initialContextFactory>
</ejb>
When you got this working, you will find that predicates, aka the where clause, are not working. This can be solved by setting the property:
  Predicate.enableXMLSerialization(true);
Before you use any predicate. The SOAP call is based on HTTP and therefore the predicate must be serialized to send over to the server.

Post a Comment