If you go through orabpel related jars most of the classes would be having package name with ‘collaxa’ in it.Few words about this startup company.
Collaxa was a pure-play BPM startup whose BPM orchestration product has supported BPEL for more than a year. Collaxa was founded in 2000 and was one of the first companies to build its product around the Business Process Execution Language (BPEL), a Web services specification. BPEL is designed to be an XML-based industry standard for business process management. They packaged the emerging Web service orchestration standards (SOAP Conversation, BPEL4WS and WS-Transaction) into a reliable and easy-to-manage software solution and made it easy for Java developers to publish synchronous and asynchronous Web services and compose them into reliable and transactional business flows.
Collaxa has a long history with BPEL, creating one of the first and most proven implementations of BPEL. With its native BPEL engine, Collaxa provided organizations such as the European Space Agency, SAIC and British American Tobacco the most open means for executing business processes written in BPEL
Collaxa was acquired by Oracle in June 2004, and its BPEL Server product is now marketed as Oracle BPEL Process Manager.
I would like to list down some of the issues I faced and their workarounds while trying to invoke a BPEL process from JAVA program using RMI
Some of you would be aware that sample RMI code is available in the samples provided by SOA Suite.I am explaining the steps you need to follow to make the program working.
Create a java project and add the 2 jars required for compilation namely orabpel.jar and xmlparserv2.jar
The code should first set the properties required for RMI invocation
DeliveryService is used for invocation of the process. Will explain the methods during the invocation.
Create the input xml message to be given to the BPEL process
String xml = "<ns1:BPELProcess2ProcessRequest xmlns:ns1=\"http://xmlns.oracle.com/BPELProcess2\">\n" +
"<ns1:input>geo</ns1:input>\n" +
"</ns1:BPELProcess2ProcessRequest>";
You can get the xml snippet by running the process once in you BPEL console and copy the request tags .Now create a NormalizedMessage object which will be passed with the invocation.
NormalizedMessage nm = new NormalizedMessage( );
nm.addPart("payload", xml );
As you would be knowing there are 2 types of invocations.
One-way invocation and two-way invocation
So for one-way invocation use Post method of the DeliveryService
String processid = "OneWayHello";
String operation = "initiate";
deliveryService.post(processid, operation, nm);
For two-way invocation use request method of the DeliveryService
String processid = "TwoWayHello";
String operation = "process";
NormalizedMessage res = deliveryService.request(processid, operation, nm);
To view the response message use XMLHelper
Map payload = res.getPayload();
Element partEl = (Element) payload.get("payload");
System.out.println( "HelloWorld is " + XMLHelper.toXML(partEl) );
To run the RMI program you need to have some more additional jars in your classpath
Oc4j.jar,oc4jclient.jar,,rmic.jar and commons-logging.api.
If the oc4jinstance is wrongly mentioned like you have specified home instead of oc4j_soa then you will be getting following exception
java.lang.Exception: Failed to create "ejb/collaxa/system/DeliveryBean" bean; exception reported is: "javax.naming.NameNotFoundException: ejb/collaxa/system/DeliveryBean not found
Your code should be up and running and be able to interact with BPEL process.