SOA

Calling BPEL process from JSP

Use the HelloWorld BPEL process in the /samples/tutorials folder. Deploy the BPEL process using obant command.

 

HelloWorld BPEL Process

*****************CallBPEL.jsp*****************

<%@ page import=”com.oracle.bpel.client.Locator”%>
<%@ page import=”com.oracle.bpel.client.NormalizedMessage”%>
<%@ page import=”com.oracle.bpel.client.delivery.IDeliveryService”%>
<html>
  <head>
    <meta http-equiv=”Content-Type” content=”text/html; charset=windows-1252″/>
    <title>InvokeBPELProcess</title>
  </head>
  <body><% 
  String name = request.getParameter(“name”);
  if (name == null)
  name = “BPEL”;
  String xml = “<name xmlns=\”http://samples.otn.com\“>” + name + “</name>”;
 
    Locator locator = new Locator(“default”,”bpel”);
    IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
    NormalizedMessage nm = new NormalizedMessage( );
    nm.addPart(“payload”, xml );
    deliveryService.post(“HelloWorld”, “initiate”, nm);
   
    out.println(“BPELProcess HelloWorld initiated!”);
  %></body>
</html>

*****************

Use obant to deploy the jsp file.

Advertisements