Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Extracting the input from xml document in BPEL

581984Jun 15 2007 — edited Jun 18 2007

hi,
I have a simple JSP which invokes the "101.HelloWorld" provided with the samples.
The source code for the JSP is as follows:

<%@page import="com.oracle.bpel.client.Locator" %>
<%@page import="com.oracle.bpel.client.NormalizedMessage" %>
<%@page import="com.oracle.bpel.client.delivery.IDeliveryService" %>
<%@page import="java.util.Hashtable" %>
<%@page import="javax.naming.Context" %>
<%@page import="java.util.Map" %>
<%@page import="org.w3c.dom.Element" %>

<html>

<head>

<title>Invoke HelloWorld</title>

</head>

<body>

<%
    Hashtable jndi = null;
    jndi = new Hashtable();  
    jndi.put(Context.PROVIDER_URL, "opmn:ormi://BTP6ND09:6003:home/orabpel");
    jndi.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.rmi.RMIInitialContextFactory");
                  
    jndi.put(Context.SECURITY_PRINCIPAL, "oc4jadmin");
    jndi.put(Context.SECURITY_CREDENTIALS, "welcome1");
    jndi.put("dedicated.connection", "true");
    jndi.put("dedicated.rmicontext","true");

    String name = request.getParameter("name");
    if(name == null)
        name = "BPEL";


    String xml = "<name xmlns=\"http://btp6nd09:8888/BPELConsole/default/HelloWorld\">" + name + "</name>";
    
    Locator locator = new Locator("default","bpel",jndi);

    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!" );
%>
Please refer to the
BPEL Console
to see the status of the initiated HelloWorld BPEL Process.
</body>
</html>

Since the input goes as an xml to the Receive activity, i am not knowing how to extract the "name" element from it in the assign activity. Which "BPEL XPath Extension Function" should i use to extract the same?

Message was edited by:
user578981

Message was edited by:
user578981

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 13 2007
Added on Jun 15 2007
1 comment
1,041 views