Mar 6, 2009

The lost (collaxa) BPEL-tutorials: 102.Invoking... RMI

This tutorials shows, how to invoke a BPEL process inside Oracle's PM using RMI.
To run this tutorial please deploy the CrediRatingService like shown in this posting.

Then enter the directory $ORACLE_HOME/bpel/samples/tutorials/102.InvokingProcesses/rmi. First take a look at the sample code (com/otn/samples/

Locator locator = new Locator("default","bpel",props);
IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
// construct the normalized message and send to collaxa server
NormalizedMessage nm = new NormalizedMessage( );
nm.addPart("payload", xml );
NormalizedMessage res = deliveryService.request("CreditRatingService", "process", nm);
Map payload = res.getPayload();

and the properties inside

and that's all.
To run this example set BPEL_HOME to $ORACLE_HOME/bpel and type
$ORACLE_HOME/ant/bin/ant javac
$ORACLE_HOME/ant/bin/ant run

The result should look like this:

oracle@mysoaserver:tutorials/102.InvokingProcesses/rmi >/opt/oracle/product/ run
Buildfile: build.xml

[copy] Copying 1 file to $ORACLE_HOME/bpel/samples/tutorials/102.InvokingProcesses/rmi/classes
[echo] JRMI Client on ias_10g app-server
[java] ssn is 123-12-1234
[java] {java.naming.provider.url=opmn:ormi://gipsun173.gip.local:6003:oc4j_soa/orabpel, java.naming.factory.initial=com.evermind.server.rmi.RMIInitialContextFactory, orabpel.platform=ias_10g,,}
[java] BPELProcess CreditRatingService executed!<br>
[java] Credit Rating is <rating xmlns="">560</rating>

Total time: 12 seconds

You can find all bpel tutorials on this blog via this link.

No comments:

Post a Comment