XML format for input to BPEL process from client stub
Hi,
I have deployed SyncHelloWorld BPEL process as given in the tutorial in the BPEL Server. It is working fine. Now I am trying to invoke the process by creating a Java client stub . I created a stub using the Web-services wizard by specifying the WSDL of the BPEL. Now I want to know how to pass some string through XML document to the BPEL process.
I am using this code in the main method of the stub., but the value is not being passed to the BPEL nodes correctly. the output I am getting is "Hello "
and not "Hello XYZString". I think I am not able to form the XML document to pass as input correctly. Can anyone help.
Can anyone please help :
public static void main(String[] args)
try
SyncHelloWorldStub stub = new SyncHelloWorldStub();
// Add your own code here.
// Create an empty XML document
XMLDocument doc = new XMLDocument();
// Create an element
Element body = doc.createElementNS("http://xmlns.oracle.com/SyncHelloWorld", "SyncHelloWorldProcessRequest");
// Create the inner element
Element ip = doc.createElementNS("http://xmlns.oracle.com/SyncHelloWorld", "input");
// Create a text node
Text text = doc.createTextNode("input");
// Set the input parameter
text.setNodeValue("XYZString");
ip.appendChild(text);
body.appendChild(ip);
// Call the process. It returns a vector
Vector v = stub.process(body);
// Code to print the returned xml.
System.out.println("Received " + v.size() + " element");
Enumeration enum = v.elements();
// Walk through the vector and print out contents
while (enum.hasMoreElements())
Object o = enum.nextElement();
System.out.println("Returned a " + o.getClass().getName());
//If it is an element, print it out
if (o instanceof XMLElement)
XMLElement xml = (XMLElement)o;
xml.print(System.out);
else
System.out.println("Returned " + o.toString());
System.out.println("After executing : "+v.toString());
catch(Exception ex)
ex.printStackTrace();
This is the code for WSDL file for the BPEL process.
<?xml version="1.0" encoding="UTF-8" ?>
- <definitions name="SyncHelloWorld" targetNamespace="http://xmlns.oracle.com/SyncHelloWorld" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://xmlns.oracle.com/SyncHelloWorld" xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:client="http://xmlns.oracle.com/SyncHelloWorld">
- <types>
- <schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://xmlns.oracle.com/SyncHelloWorld" xmlns="http://www.w3.org/2001/XMLSchema">
- <element name="SyncHelloWorldProcessRequest">
- <complexType>
- <sequence>
<element name="input" type="string" />
</sequence>
</complexType>
</element>
- <element name="SyncHelloWorldProcessResponse">
- <complexType>
- <sequence>
<element name="result" type="string" />
</sequence>
</complexType>
</element>
</schema>
</types>
- <message name="SyncHelloWorldRequestMessage">
<part name="payload" element="tns:SyncHelloWorldProcessRequest" />
</message>
- <message name="SyncHelloWorldResponseMessage">
<part name="payload" element="tns:SyncHelloWorldProcessResponse" />
</message>
- <portType name="SyncHelloWorld">
- <operation name="process">
<input message="tns:SyncHelloWorldRequestMessage" />
<output message="tns:SyncHelloWorldResponseMessage" />
</operation>
</portType>
- <binding name="SyncHelloWorldBinding" type="tns:SyncHelloWorld">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <operation name="process">
<soap:operation style="document" soapAction="process" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
</binding>
- <service name="SyncHelloWorld">
- <port name="SyncHelloWorldPort" binding="tns:SyncHelloWorldBinding">
<soap:address location="http://cisoidd001.corporate.ge.com:5843/orabpel/default/SyncHelloWorld/v2006_06_19__40924" />
</port>
</service>
- <plnk:partnerLinkType name="SyncHelloWorld">
- <plnk:role name="SyncHelloWorldProvider">
<plnk:portType name="tns:SyncHelloWorld" />
</plnk:role>
</plnk:partnerLinkType>
</definitions>
Also, while running the BPEL process from console, we can give the input as html or string. Can anyone give the me xml format of the input.
Any help would be highly appreciated.
Thanks,
Debojyoty
Your last question shows that you might have solved this by now.
The xml document you are composing in java might not exactly be the xml input bpel excepts. The way to compare is first initiate a process by posting an html message, using the initiate tab for your process in the BPEL console. Check the box "Save as default input" before you send the html request.
Then again do an initiate from the BPEL console and select "XML Source" instead of "HTML Form". You will see the xml message you just have sent as html.
You might also want to test your java program with one of the many free soap clients available on the internet.
HTH,
Ruerd
http://www.numericalexample.com
Similar Messages
-
Error while calling bpel process from jsp page
Hi,
I am trying to access bpel process from a jsp page..i could successfully deploy bpel and run it from bpel console.however accessing the bpel from a jsp gives an error. I have attached the code and error. I am using jdev10.3.1 with SOA suite.Any help is greatly appreciated.
Thanks,
p
Hashtable env = null;
env = new Hashtable();
env.put("java.naming.factory.initial", "oracle.j2ee.naming.ApplicationClientInitialContextFactory");
env.put("java.naming.provider.url", "opmn:ormi://fs-sys-414:6005:home/orabpel");
env.put("java.naming.security.principal", "oc4jadmin");
env.put("java.naming.security.credentials", "xxxxx");
try{
String xml = "<input xmlns=\"http://xmlns.oracle.com/Pr_Bpel_Process\">" + "HELLO" + "</input>";
Locator locator = new Locator("default","bpel",env);
System.out.println("locator object" +locator);
IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
// construct the normalized message and send to Oracle BPEL Process Manager
System.out.println("delivery service name="+IDeliveryService.SERVICE_NAME);
NormalizedMessage nm = new NormalizedMessage( );
nm.addPart("payload",xml);
System.out.println("adding payload to nm");
deliveryService.post("Pr_Bpel_Process", "initiate", nm);
oracle.classloader.util.AnnotatedNoClassDefFoundError:
Missing class: com.collaxa.common.util.NonSyncStringWriter
Dependent class: com.oracle.bpel.client.ClientResources
Loader: current-workspace-app.web.pra_appln-pra_proj-webapp:0.0.0
Code-Source: /C:/product/10.1.3.1/OracleAS_1/bpel/lib/orabpel.jar
Configuration: <classpath> in C:\jdev10131SOA\jdev\mywork\pra_appln\pra_proj\public_html
The missing class is not available from any code-source or loader in the system.
06/11/23 14:33:29 at oracle.classloader.PolicyClassLoader.handleClassNotFound (PolicyClassLoader.java:2068) [C:/jdev10131SOA/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@14916158]
at oracle.classloader.PolicyClassLoader.internalLoadClass (PolicyClassLoader.java:1679) [C:/jdev10131SOA/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@14916158]
at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.java:1635) [C:/jdev10131SOA/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@14916158]
at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.java:1620) [C:/jdev10131SOA/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@14916158]
at java.lang.ClassLoader.loadClassInternal (ClassLoader.java:319) [jre bootstrap, by jre.bootstrap:1.5.0_06]
at com.oracle.bpel.client.ClientResources.sanitizeArgs (ClientResources.java:123) [C:/product/10.1.3.1/OracleAS_1/bpel/lib/orabpel.jar (from <classpath> in C:\jdev10131SOA\jdev\mywork\prashant_appln\pra_proj\public_html), by current-workspace-app.web.prashant_appln-pra_proj-webapp:0.0.0]
at com.oracle.bpel.client.ClientResources.getString (ClientResources.java:93) [C:/product/10.1.3.1/OracleAS_1/bpel/lib/orabpel.jar (from <classpath> in C:\jdev10131SOA\jdev\mywork\prashant_appln\pra_proj\public_html), by current-workspace-app.web.prashant_appln-pra_proj-webapp:0.0.0]
at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean (BeanRegistry.java:293) [C:/product/10.1.3.1/OracleAS_1/bpel/lib/orabpel.jar (from <classpath> in C:\jdev10131SOA\jdev\mywork\prashant_appln\pra_proj\public_html), by current-workspace-app.web.prashant_appln-pra_proj-webapp:0.0.0]
at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean (DeliveryService.java:250) [C:/product/10.1.3.1/OracleAS_1/bpel/lib/orabpel.jar (from <classpath> in C:\jdev10131SOA\jdev\mywork\prashant_appln\pra_proj\public_html), by current-workspace-app.web.prashant_appln-pra_proj-webapp:0.0.0]
at com.oracle.bpel.client.delivery.DeliveryService.post (DeliveryService.java:174) [C:/product/10.1.3.1/OracleAS_1/bpel/lib/orabpel.jar (from <classpath> in C:\jdev10131SOA\jdev\mywork\prashant_appln\pra_proj\public_html), by current-workspace-app.web.prashant_appln-pra_proj-webapp:0.0.0]
at com.oracle.bpel.client.delivery.DeliveryService.post (DeliveryService.java:149) [C:/product/10.1.3.1/OracleAS_1/bpel/lib/orabpel.jar (from <classpath> in C:\jdev10131SOA\jdev\mywork\prashant_appln\pra_proj\public_html), by current-workspace-app.web.prashant_appln-pra_proj-webapp:0.0.0]
at testbpel.jspService (_testbpel.java:79) [C:/jdev10131SOA/jdev/mywork/prashant_appln/pra_proj/classes/.jsps/ (from *.jsp in C:\jdev10131SOA\jdev\mywork\prashant_appln\pra_proj\classes\.jsps), by current-workspace-app.web.prashant_appln-pra_proj-webapp.jsp27809090:0.0.0]
at com.orionserver.http.OrionHttpJspPage.service (OrionHttpJspPage.java:59) [C:/jdev10131SOA/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\jdev10131SOA\j2ee\home\oc4j.jar), by oc4j:10.1.3]
at oracle.jsp.runtimev2.JspPageTable.service (JspPageTable.java:453) [C:/jdev10131SOA/j2ee/home/lib/ojsp.jar (from <code-source> in META-INF/boot.xml in C:\jdev10131SOA\j2ee\home\oc4j.jar), by oc4j:10.1.3]
at oracle.jsp.runtimev2.JspServlet.internalService (JspServlet.java:591) [C:/jdev10131SOA/j2ee/home/lib/ojsp.jar (from <code-source> in META-INF/boot.xml in C:\jdev10131SOA\j2ee\home\oc4j.jar), by oc4j:10.1.3]
at oracle.jsp.runtimev2.JspServlet.service (JspServlet.java:515) [C:/jdev10131SOA/j2ee/home/lib/ojsp.jar (from <code-source> in META-INF/boot.xml in C:\jdev10131SOA\j2ee\home\oc4j.jar), by oc4j:10.1.3]
at javax.servlet.http.HttpServlet.service (HttpServlet.java:856) [C:/jdev10131SOA/j2ee/home/lib/servlet.jar (from <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in C:\jdev10131SOA\j2ee\home\oc4j.jar), by api:1.4.0]
at com.evermind.server.http.ServletRequestDispatcher.invoke (ServletRequestDispatcher.java:711) [C:/jdev10131SOA/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\jdev10131SOA\j2ee\home\oc4j.jar), by oc4j:10.1.3]
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal (ServletRequestDispatcher.java:368) [C:/jdev10131SOA/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\jdev10131SOA\j2ee\home\oc4j.jar), by oc4j:10.1.3]
at com.evermind.server.http.HttpRequestHandler.doProcessRequest (HttpRequestHandler.java:866) [C:/jdev10131SOA/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\jdev10131SOA\j2ee\home\oc4j.jar), by oc4j:10.1.3]
at com.evermind.server.http.HttpRequestHandler.processRequest (HttpRequestHandler.java:448) [C:/jdev10131SOA/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\jdev10131SOA\j2ee\home\oc4j.jar), by oc4j:10.1.3]
at com.evermind.server.http.HttpRequestHandler.serveOneRequest (HttpRequestHandler.java:216) [C:/jdev10131SOA/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\jdev10131SOA\j2ee\home\oc4j.jar), by oc4j:10.1.3]
at com.evermind.server.http.HttpRequestHandler.run (HttpRequestHandler.java:117) [C:/jdev10131SOA/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\jdev10131SOA\j2ee\home\oc4j.jar), by oc4j:10.1.3]
at com.evermind.server.http.HttpRequestHandler.run (HttpRequestHandler.java:110) [C:/jdev10131SOA/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\jdev10131SOA\j2ee\home\oc4j.jar), by oc4j:10.1.3]
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run (ServerSocketReadHandler.java:260) [C:/jdev10131SOA/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\jdev10131SOA\j2ee\home\oc4j.jar), by oc4j:10.1.3]
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket (ServerSocketAcceptHandler.java:239) [C:/jdev10131SOA/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\jdev10131SOA\j2ee\home\oc4j.jar), by oc4j:10.1.3]
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700 (ServerSocketAcceptHandler.java:34) [C:/jdev10131SOA/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\jdev10131SOA\j2ee\home\oc4j.jar), by oc4j:10.1.3]
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run (ServerSocketAcceptHandler.java:880) [C:/jdev10131SOA/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\jdev10131SOA\j2ee\home\oc4j.jar), by oc4j:10.1.3]
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run (ReleasableResourcePooledExecutor.java:298) [C:/jdev10131SOA/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in C:\jdev10131SOA\j2ee\home\oc4j.jar), by oc4j:10.1.3]
at java.lang.Thread.run (Thread.java:595) [jre bootstrap, by jre.bootstrap:1.5.0_06]Hi,
Now i am getting different kind of exception::
06/11/24 08:11:06 java.lang.Exception: Failed to create "ejb/collaxa/system/DeliveryBean" bean; exception reported is: "javax.naming.NamingException: META-INF/application-client.xml not found (see J2EE spec, application-client chapter for requirements and format of the file)
at oracle.j2ee.naming.ApplicationClientInitialContextFactory.getRequiredClasspathResource(ApplicationClientInitialContextFactory.java:239)
at oracle.j2ee.naming.ApplicationClientInitialContextFactory.getArchive(ApplicationClientInitialContextFactory.java:161)
at oracle.j2ee.naming.ApplicationClientInitialContextFactory.getInitialContext(ApplicationClientInitialContextFactory.java:111)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:277)
at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:250)
at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:174)
at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:149)
at _testbpel._jspService(_testbpel.java:79)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:453)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:591)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:515)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
at java.lang.Thread.run(Thread.java:595)
06/11/24 08:11:06 at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:293)
06/11/24 08:11:06 at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:250)
06/11/24 08:11:06 at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:174)
06/11/24 08:11:06 at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:149)
06/11/24 08:11:06 at testbpel.jspService(_testbpel.java:79)
06/11/24 08:11:06 at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
06/11/24 08:11:06 at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:453)
06/11/24 08:11:06 at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:591)
06/11/24 08:11:06 at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:515)
06/11/24 08:11:06 at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
06/11/24 08:11:06 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711)
06/11/24 08:11:06 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
06/11/24 08:11:06 at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
06/11/24 08:11:06 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
06/11/24 08:11:06 at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
06/11/24 08:11:06 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
06/11/24 08:11:06 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
06/11/24 08:11:06 at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
06/11/24 08:11:06 at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
06/11/24 08:11:06 at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
06/11/24 08:11:06 at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
06/11/24 08:11:06 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
06/11/24 08:11:06 at java.lang.Thread.run(Thread.java:595) -
Problem while invoking Bpel Process from Browser
server WSDL
<definitions
name="getOpenInvoicesService"
targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/getOpenInvoicesService/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/db/getOpenInvoicesService/"
xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/getOpenInvoicesService"
xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
>
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" >
<import namespace="http://xmlns.oracle.com/pcbpel/adapter/db/getOpenInvoicesService" schemaLocation="getOpenInvoicesService.xsd" />
</schema>
</types>
<message name="getOpenInvoicesServiceInput_msg">
<part name="getOpenInvoicesServiceInput_msg" element="db:getOpenInvoicesServiceInput"/>
</message>
<message name="getOpenInvoicesServiceOutputCollection_msg">
<part name="getOpenInvoicesServiceOutputCollection" element="db:getOpenInvoicesServiceOutputCollection"/>
</message>
<portType name="getOpenInvoicesService_ptt">
<operation name="getOpenInvoicesService">
<input message="tns:getOpenInvoicesServiceInput_msg"/>
<output message="tns:getOpenInvoicesServiceOutputCollection_msg"/>
</operation>
</portType>
<binding name="getOpenInvoicesService_binding" type="tns:getOpenInvoicesService_ptt">
<jca:binding />
<operation name="getOpenInvoicesService">
<jca:operation
SqlString=" SELECT distinct aps.trx_number TrxNumber, ra.purchase_order PurchaseOrder, rl.sales_order OrderNumber, ra.interface_header_attribute2 OrderType, hc.account_number CustomerNumber, rt.name TrxType, aps.acctd_amount_due_remaining AmmountDue, aps.trx_date TrxDate, aps.due_date TrxDueDate FROM ra_customer_trx_all ra , ra_customer_trx_lines_all rl , ar_payment_schedules_all aps , ra_cust_trx_types_all rt , hz_cust_accounts hc , hz_parties hp , hz_cust_acct_sites_all hcasa_bill, hz_cust_site_uses_all hcsua_bill , hz_party_sites hps_bill , ra_cust_trx_line_gl_dist_all rct WHERE 1 = 1 AND ra.customer_trx_id = rl.customer_trx_id AND ra.customer_trx_id = aps.customer_trx_id AND ra.org_id = aps.org_id AND rct.customer_trx_id = aps.customer_trx_id AND rct.customer_trx_id = ra.customer_trx_id AND rct.customer_trx_id = rl.customer_trx_id AND rct.customer_trx_line_id = rl.customer_trx_line_id AND ra.complete_flag = 'Y' AND rl.line_type IN ('FREIGHT', 'LINE') AND ra.cust_trx_type_id = rt.cust_trx_type_id AND ra.bill_to_customer_id = hc.cust_account_id AND hc.status = 'A' AND hp.party_id = hc.party_id AND hcasa_bill.cust_account_id = ra.bill_to_customer_id AND hcasa_bill.cust_acct_site_id = hcsua_bill.cust_acct_site_id AND hcsua_bill.site_use_code = 'BILL_TO' AND hcsua_bill.site_use_id = ra.bill_to_site_use_id AND hps_bill.party_site_id = hcasa_bill.party_site_id AND hcasa_bill.status = 'A' AND hcsua_bill.status = 'A' AND aps.amount_due_remaining <> 0 AND aps.status = 'OP' AND hc.account_number= ?"
InteractionSpec="oracle.tip.adapter.db.DBPureSQLInteractionSpec" >
</jca:operation>
<input/>
<output/>
</operation>
</binding>
<service name="getOpenInvoicesService">
<port name="getOpenInvoicesService_pt" binding="tns:getOpenInvoicesService_binding">
<!--Your runtime connection is declared in
J2EE_HOME/application-deployments/default/DbAdapter/oc4j-ra.xml
These mcf properties here are from your design time connection and
save you from having to edit that file and restart the application server
if eis/DB/sfh is missing.
These mcf properties are safe to remove.-->
<jca:address location="eis/DB/sfh" UIConnectionName="sfh"
ManagedConnectionFactory="oracle.tip.adapter.db.DBManagedConnectionFactory"
mcf.DriverClassName="oracle.jdbc.OracleDriver"
mcf.PlatformClassName="oracle.toplink.internal.databaseaccess.Oracle9Platform"
mcf.ConnectionString="jdbc:oracle:thin:@localhost:1526:xxxx"
mcf.UserName="apps"
mcf.Password="53CB0F044A0D3DD2C063679F18F89870" />
</port>
</service>
<plt:partnerLinkType name="getOpenInvoicesService_plt" >
<plt:role name="getOpenInvoicesService_role" >
<plt:portType name="tns:getOpenInvoicesService_ptt" />
</plt:role>
</plt:partnerLinkType>
</definitions>
client.wsdl
<?xml version="1.0" encoding="UTF-8"?>
<definitions
name="getOpenInvoices"
targetNamespace="http://xmlns.oracle.com/getOpenInvoices"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:client="http://xmlns.oracle.com/getOpenInvoices"
xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
>
<types>
<schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://xmlns.oracle.com/getOpenInvoices" xmlns="http://www.w3.org/2001/XMLSchema">
<element name="getOpenInvoicesProcessResponse">
<complexType>
<sequence>
<element name="result" type="string"/>
</sequence>
</complexType>
</element>
<element name="getOpenInvoicesProcessRequest">
<complexType>
<sequence>
<element name="accountNumber" type="string"/>
</sequence>
</complexType>
</element>
</schema>
</types>
<message name="getOpenInvoicesRequestMessage">
<part name="payload" element="client:getOpenInvoicesProcessRequest"/>
</message>
<message name="getOpenInvoicesResponseMessage">
<part name="payload" element="client:getOpenInvoicesProcessResponse"/>
</message>
<portType name="getOpenInvoices">
<operation name="OpenInvoices">
<input message="client:getOpenInvoicesRequestMessage"/>
<output message="client:getOpenInvoicesResponseMessage"/>
</operation>
</portType>
<binding name="OpenInvoicebindings" type="client:getOpenInvoices">
<http:binding verb="GET"/>
<operation name="OpenInvoices">
<http:operation location="/OpenInvoices"/>
<input>
<http:urlEncoded/>
</input>
<output>
<mime:mimeXml part="Body"/>
</output>
</operation>
</binding>
<service name="OpenInvoiceService">
<port binding="client:OpenInvoicebindings" name="OpenInvoicesport">
<http:address location="http://sys0004:8889/httpbinding/default/getOpenInvoices"/>
</port>
</service>
<plnk:partnerLinkType name="getOpenInvoices">
<plnk:role name="getOpenInvoicesProvider">
<plnk:portType name="client:getOpenInvoices"/>
</plnk:role>
</plnk:partnerLinkType>
</definitions>
bpel process
<?xml version = "1.0" encoding = "UTF-8" ?>
<!--
Oracle JDeveloper BPEL Designer
Created: Tue Jul 13 11:05:51 IST 2010
Author:
Purpose: Synchronous BPEL Process
-->
<process name="getOpenInvoices"
targetNamespace="http://xmlns.oracle.com/getOpenInvoices"
xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/db/getOpenInvoicesService/"
xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
xmlns:ns2="http://xmlns.oracle.com/pcbpel/adapter/db/getOpenInvoicesService"
xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
xmlns:client="http://xmlns.oracle.com/getOpenInvoices"
xmlns:ora="http://schemas.oracle.com/xpath/extension"
xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc">
<!--
PARTNERLINKS
List of services participating in this BPEL process
-->
<partnerLinks>
<!--
The 'client' role represents the requester of this service. It is
used for callback. The location and correlation information associated
with the client role are automatically set using WS-Addressing.
-->
<partnerLink name="client" partnerLinkType="client:getOpenInvoices"
myRole="getOpenInvoicesProvider"/>
<partnerLink name="getOpenInvoicesService"
partnerRole="getOpenInvoicesService_role"
partnerLinkType="ns1:getOpenInvoicesService_plt"/>
</partnerLinks>
<!--
VARIABLES
List of messages and XML documents used within this BPEL process
-->
<variables>
<!-- Reference to the message passed as input during initiation -->
<variable name="inputVariable"
messageType="client:getOpenInvoicesRequestMessage"/>
<!-- Reference to the message that will be returned to the requester-->
<variable name="outputVariable"
messageType="client:getOpenInvoicesResponseMessage"/>
<variable name="Invoke_1_getOpenInvoicesService_InputVariable"
messageType="ns1:getOpenInvoicesServiceInput_msg"/>
<variable name="Invoke_1_getOpenInvoicesService_OutputVariable"
messageType="ns1:getOpenInvoicesServiceOutputCollection_msg"/>
</variables>
<!--
ORCHESTRATION LOGIC
Set of activities coordinating the flow of messages across the
services integrated within this business process
-->
<sequence name="main">
<!-- Receive input from requestor. (Note: This maps to operation defined in getOpenInvoices.wsdl) -->
<receive name="receiveInput" partnerLink="client"
portType="client:getOpenInvoices" operation="OpenInvoices"
variable="inputVariable" createInstance="yes"/>
<!-- Generate reply to synchronous request -->
<assign name="Assign_1">
<copy>
<from variable="inputVariable" part="payload"/>
<to variable="Invoke_1_getOpenInvoicesService_InputVariable"
part="getOpenInvoicesServiceInput_msg"/>
</copy>
</assign>
<invoke name="Invoke_1" partnerLink="getOpenInvoicesService"
portType="ns1:getOpenInvoicesService_ptt"
operation="getOpenInvoicesService"
inputVariable="Invoke_1_getOpenInvoicesService_InputVariable"
outputVariable="Invoke_1_getOpenInvoicesService_OutputVariable"/>
<assign name="Assign_2">
<copy>
<from variable="Invoke_1_getOpenInvoicesService_OutputVariable"
part="getOpenInvoicesServiceOutputCollection"/>
<to variable="outputVariable" part="payload"/>
</copy>
</assign>
<reply name="replyOutput" partnerLink="client"
portType="client:getOpenInvoices" operation="OpenInvoices"
variable="outputVariable"/>
</sequence>
</process>the above is the server and client wsdls and Bpel process. i have created the wsdl so as to call from HTTP calling, means process is been called from Browser .... but i can't see the result ...
http://sys0004:8889/httpbinding/default/getOpenInvoices/OpenInvoices?accountNumber=1608
above is the link called from browser
output in the browser ::: <getOpenInvoicesProcessResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/getOpenInvoices" />
actually it has to fetch data from DB and show in xml format can anyone assist me where i am going wrongHi Rajesh,
Please refer \bpel\samples\tutorials\102.InvokingProcesses\jsp.
BPEL Tutorial 7: Invoking BPEL Processes through SOAP and Java : Reference: 2004/06/14/orabpel/d5/1.0
Hope this helps!
Regards
Anirudh Pucha -
Error Occured while Invoking a BPEL Process from JAVA
Hi.....
When initiating a BPEL process from JAVA the code is working fine and the Process is getting initiated.But while using that code in J2EE project as a java code and while calling that method Error is occuring.....
Here by i am attaching my JAVA Code which runs as an applicateion and package which runs in Server....
JSP and Java Method Used:
JSP Code:
===============
<%@ page import=" bo.callbpel" %>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>FEATT - I30</title>
</head>
<body>
<%
String input=request.getParameter("dnvalue");
callbpel p=new callbpel();
String Output=p.Initiate(input);
out.print("The Input Given to the BPEL Process is : "+input);
%>
<BR><BR><BR><BR><BR><BR>
<%
out.print("The Reply from BPEL Process is : "+Output);
%>
</body>
</html>
Java Code:
package bo;
import com.oracle.bpel.client.Locator;
import com.oracle.bpel.client.NormalizedMessage;
import com.oracle.bpel.client.delivery.IDeliveryService;
import java.util.Map;
import java.util.Properties;
import oracle.xml.parser.v2.XMLElement;
/*import javax.servlet.RequestDispatcher;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest ;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession; */
//import java.util.*;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class callbpel {
public String Initiate(String value){
String replyText=null;
String input = value;
System.out.println(input);
String xmlInput= "<ns1:AccessDBBPELProcessRequest xmlns:ns1=\"http://xmlns.oracle.com/AccessDBBPEL\"><ns1:input>"+input+"</ns1:input></ns1:AccessDBBPELProcessRequest>";
String xml="<ns1:BPELProcess1ProcessRequest xmlns:ns1=\"http://xmlns.oracle.com/BPELProcess1\">";
xml=xml+"<ns1:input>"+input+"</ns1:input>";
xml=xml+"</ns1:BPELProcess1ProcessRequest>";
try{
Properties props=new Properties();
props.setProperty("orabpel.platform","ias_10g");
props.setProperty("java.naming.factory.initial","com.evermind.server.rmi.RMIInitialContextFactory");
props.setProperty("java.naming.provider.url","opmn:ormi://157.227.132.226:6003:home/orabpel");
props.setProperty("java.naming.security.principal","oc4jadmin");
props.setProperty("java.naming.security.credentials","oc4jadmin");
props.setProperty("dedicated.rmicontext", "true");
Locator locator = new Locator("default", "bpel", props);
String uniqueBpelId = com.collaxa.cube.util.GUIDGenerator.generateGUID();
//System.out.println(uniqueBpelId);
//java.util.Map msgProps = new HashMap();
System.out.println("After creating the locator object......");
IDeliveryService deliveryService =(IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME);
System.out.println("Before creating the NormalizedMessage object......");
NormalizedMessage nm = new NormalizedMessage();
System.out.println("After creating the NormalizedMessage object.*.*.*...");
//msgProps.put("conversationId",uniqueBpelId);
//nm.setProperty("conversationId",uniqueBpelId);
nm.addPart("payload", xml);
System.out.println("Before creating response object......");
NormalizedMessage res = deliveryService.request("BPELProcess1", "process", nm);
System.out.println("After calling the BPELProcess1 .*.*.*...");
Map payload = res.getPayload();
System.out.println("BPEL called");
XMLElement xmlEl=(oracle.xml.parser.v2.XMLElement)payload.get("payload");
replyText=xmlEl.getText();
System.out.println("Reply from BPEL Process>>>>>>>>>>>>> "+replyText);
catch (Exception e) {
System.out.println("Exception : "+e);
e.printStackTrace();
return replyText;
While Creating and Object for the Class callbpel and Whilw Calling that Method
callbpel p=new callbpel();
String Output=p.Initiate(input);
Its throwing an Error:
Error Occured is:
After creating the locator object......
Before creating the NormalizedMessage object......
After creating the NormalizedMessage object.*.*.*...
Before creating response object......
Apr 24, 2008 9:12:00 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.NoClassDefFoundError: javax/ejb/EJBException
at com.oracle.bpel.client.util.ExceptionUtils.handleServerException(ExceptionUtils.java:76)
at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:254)
at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:83)
at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:53)
at bo.callbpel.Initiate(callbpel.java:55)
at org.apache.jsp.output_jsp._jspService(output_jsp.java:55)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Unknown Source)
For Running JSP i am Using Eclipse 3.2.0 and apache-tomcat-5.5.25
Please Provide me a Solution......
Thanks in Advance.....
Regards,
Suresh KHave got the same problem. Scenario at my end is little different though.
I am trying to invoke a BPEL process from an ESB Service.
I am trying to look into it..
However, would be grateful, if someone can give some insight into this since many are running into this issue without being able to fix.
Ashish. -
Question: How to call a BPEL process from a PL/SQL procedure
Hi All,
Greetings to all BPEL people. I have a question on how can we call a BPEL process from a PLSQL procedure. It might be a stupid question but i wanted to know whether this fetaure is available in BPEL as our scenario requires us to explore if this functionality is available in BPEL.
Please let me know and also if possible please send me the links for the tutorials if it is available.
Thanks In Advance,
DibyaYes u can do it. there are two ways.
1) First one is using utl_http package of PL/SQL
In this case u can create SOAP request message & send it as Http request to your deployed BPEL process.
This package provides some methods like
set_header,write_text,get_response,read_text etc..
Following is part of code which may be helpful to you.
create or replace package body test_book_order_sub_pkg
is
FUNCTION test_book_order_sub(p_subscription_guid IN RAW,
p_event IN OUT WF_EVENT_T
Return VARCHAR2 IS
soap_request varchar2(30000);
soap_respond varchar2(30000);
http_req utl_http.req;
http_resp utl_http.resp;
launch_url varchar2(240) ;
begin
DBMS_OUTPUT.Put_Line('Subscription : Order has been booked');
soap_request:='<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header/>
<soap:Body xmlns:ns1="http://xmlns.oracle.com/BES_BookOrder">
<ns1:BES_BookOrderProcessRequest>
<ns1:input>725</ns1:input>
</ns1:BES_BookOrderProcessRequest>
</soap:Body>
</soap:Envelope>';
http_req:= utl_http.begin_request
('http://172.28.5.191:8888/orabpel/default/BES_BookOrder/1.0',
'POST',
'HTTP/1.1'
utl_http.set_header(http_req, 'Content-Type', 'text/xml') ;
utl_http.set_header(http_req, 'Content-Length', length(soap_request)) ;
utl_http.set_header(http_req, 'SOAPAction', 'initiate');
utl_http.write_text(http_req, soap_request) ;
http_resp:= utl_http.get_response(http_req) ;
utl_http.read_text(http_resp, soap_respond) ;
utl_http.end_response(http_resp) ;
DBMS_OUTPUT.Put_Line(soap_respond);
return('SUCCESS');
end test_book_order_sub;
end test_book_order_sub_pkg;
2) Second way is make your BPEL process listening to some database Queue(use AQ Adapter). & then put some message in tht queue from ur Pl/SQL code . This will also initiate BPEL instance. Check out AQAdapter tutorials.
/mishit -
TNS:Operation Timed Out error while trying to invoke BPEL Process from sql
Hi,
I am trying to invoke a BPEL Process from PL/sql code. When i try to invoke the process, I am getting the following error message
ORA-29273 HTTP Request Failed
ORA:06512: at SYS.UTH_HTTP at line 1029
ORA:12535: TNS:Operation Timed Out
ORA:06512: at line 18
I have the SOA suite installed on my local machine...and the BPEL process that i am trying to invoke is deployed their.
Any idea what could be wrong..following is the code piece
soap_request:='<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header/>
<soap:Body xmlns:ns1="http://xmlns.oracle.com/Test">
<ns1:TesProcessRequest><ns1:input>is1_1land</ns1:input></ns1:TesProcessRequest>
</soap:Body>
</soap:Envelope>';
dbms_output.put_line('soap_request: '||soap_request);
utl_http.set_proxy('3.209.30.25:80', '3.209.32.149:8888');
http_req:= utl_http.begin_request('http://3.209.32.149:8888/orabpel/default/Tes/1.0 '
,'POST'
,'HTTP/1.1');
dbms_output.put_line('after Begin Request' );
utl_http.set_header(http_req, 'Content-Type', 'text/xml') ;
Please adviseyou are right the file adapter doesnt invoke any bpel
process, instead it is polling the file from
directory location?If it is polling for new files, shouldn't it create a new instance of the BPEL process automatically the moment it finds a new file? In other words, should a new file trigger an instance of the BPEL process rather than being started from PL/SQL?
Can this file adapter not be invoked as bpel process
in that case?The file adapter is part of a BPEL process. The BPEL process can be invoked from e.g. PL/SQL.
In this case this file adapeter return to an RECEIVE
activity...I think this receive cannot be invoked as
a BPEL process rite?Can you explain what you mean with this?
Also , will all synchronous request return "TIMEOUT"
error, if tried to invoke from pl/sql?Only if the synchronous process instance takes more time to complete (and thus to return) than the value specified for a time-out to occur. If the instance completes in for example 10 ms and the time-out time is specified as 30 seconds, no time-out will occur.
Regards, Ronald -
Invoking a BPEL process from a diffrent server.
Hello
I am trying to invoke a Bpel process from a diffrent server than the one where Soa Suite is installed and I am getting the folowing error:
java.lang.Exception: Failed to create "ejb/collaxa/system/DeliveryBean" bean; exception reported is: "javax.naming.NameNotFoundException: ejb/collaxa/system/DeliveryBean not found
at com.evermind.server.rmi.RMIClientContext.lookup(RMIClientContext.java:52)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:279)
at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:250)
at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:83)
at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:53)
at Invoke.main(Invoke.java:35)
at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:293)
at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:250)
at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:83)
at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:53)
at Invoke.main(Invoke.java:35)
The same client works fine when running it from the same machine where the Soa Suite is installed.
Does anyone know what can be the problem?
Regards Corneliuhi....
the same error is coming for me when i am in local server itself.
I am using Eclipse and BPEL server....
hereby i am attaching my code:
import com.oracle.bpel.client.Locator;
import com.oracle.bpel.client.NormalizedMessage;
import com.oracle.bpel.client.dispatch.IDeliveryService;
import java.util.Map;
import java.util.*;
import javax.naming.*;
public class initiate {
* @param args
public static void main(String[] args)
String xml="<ns1:BPELProcess1ProcessRequest xmlns:ns1=\"http://xmlns.oracle.com/BPELProcess1\">";
xml=xml+"<ns1:input>natraj</ns1:input>";
xml=xml+"</ns1:BPELProcess1ProcessRequest>";
try{
Locator loc = null;
Hashtable jndi = new Hashtable();
jndi.put(Context.PROVIDER_URL, "http://localhost:8888/BPELConsole");
jndi.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
jndi.put(Context.SECURITY_PRINCIPAL, "oc4jadmin");
jndi.put(Context.SECURITY_CREDENTIALS, "oc4jadmin");
jndi.put("dedicated.connection", "true");
loc = new Locator("default", "bpel", jndi);
IDeliveryService deliveryService = (IDeliveryService)loc.lookupService(IDeliveryService.SERVICE_NAME );
NormalizedMessage nm = new NormalizedMessage();
nm.addPart("payload", xml);
//deliveryService.post("BPELProcess1", "initiate", nm);
NormalizedMessage res = deliveryService.request("BPELProcess1", "process", nm);
Map payload = res.getPayload();
System.out.println( "BPELProcess CreditRatingService executed!<br>" );
System.out.println( "Credit Rating is " + payload.get("payload") );
catch (Exception e)
System.out.println("Exception"+e);
//System.out.println( "BPELProcess initiated!" );
ERROR:
Exceptionjava.lang.Exception: Failed to create "ejb/collaxa/system/DeliveryBean" bean; exception reported is: "javax.naming.NamingException: Invalid provider URL
at com.evermind.server.rmi.RMIInitialContextFactory.getInitialContext(RMIInitialContextFactory.java:172)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:277)
at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:250)
at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:83)
at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:53)
at initiate.main(initiate.java:54)
Please provide me a solution...
thanks in advance -
Invoking BPEL process from a jsp
Hi,
I am invoking a synchronous BPEL process from a jsp.
The jsp I am using is pasted below for your reference.
createWorkOrderFFA.jsp invokes another jsp invokeWorkOrderFFA.jsp which inturn calls the BPEL process.
The code is given below.
-----------------createWorkOrderFFA.jsp starts-----------
<%@page import="com.oracle.bpel.client.Locator" %>
<%@page import="com.oracle.bpel.client.NormalizedMessage" %>
<%@page import="com.oracle.bpel.client.dispatch.IDeliveryService" %>
<html>
<head>
<title>Work Order Creation </title>
<meta http-equiv="PRAGMA" content="NO-CACHE" />
<meta http-equiv="EXPIRES" content="-1" />
<SCRIPT LANGUAGE="JavaScript">
function setfocus(){
document.generatePO.technicianName.focus();
function mypopup()
mywindow = window.open ("totalWODetails.jsp","mywindow","scrollbars=1,width=600,height=500");
mywindow.moveTo(50,50);
function DoTheCheck()
if((document.generatePO.repair.checked != true) && (document.generatePO.replacement.checked != true) &&(document.generatePO.emergency.checked != true))
alert('Please select atleast one task type for Work Order');
return false;
document.generatePO.submit();
return true;
function chkvalues(){
if( document.generatePO.additionalInfo.value == "")
alert(" Please provide additional information for tasks assigned");
document.generatePO.additionalInfo.focus();
return false;
return true;
</SCRIPT>
</head>
<body bgcolor = "#E9C2A6">
<br>
<tr cellspacing="0" cellpadding="0">
<td width="30%" align=left ><b><h2><font color="#3333CC"> </font></b></h2> </td>
</tr>
<!-- <h1 align='center'> Work Order Creation </h1> -->
<table border="1" cellspacing="0" cellpadding="0" width="80%" align=center>
<tr bgcolor=#A68064 valign=center > </tr>
<tr bgcolor=#A68064 valign==center><td valign=center > <h2 align='center'> <font COLOR="#CDCDCD" SIZE=5 FACE="sans-serif"> Field Force Automation - Work Order Creation </font></h2></td></tr>
<tr><td align=center>
<table border="0" cellspacing="0" cellpadding="0" width="100%" >
<form name="generatePO" action="./invokeWorkOrderFFA.jsp" onSubmit="return DoTheCheck()">
</tr>
<tr >
<br>
<td width="40%" align="right" > <b> <font color="black" SIZE=2 FACE="sans-serif" align="right"> Interface Type: </font> </b> </td>
<!-- <td width="2%">:</td><td><input type="text" name="SSN" maxlength=10 size=10></td> -->
<td width="60%" colspan = "2">
<SELECT NAME="interfaceType">
<OPTION VALUE="Batch"> Batch </OPTION>
<OPTION VALUE="Near Real Time"> Near Real Time </OPTION>
<OPTION VALUE="Automatic"> Automatic </OPTION>
</SELECT >
</td>
</tr>
<tr>
<td width="40%" align=left>
</td>
<td width="20%" align=left>
</td>
<td width="20%" align=left>
</td>
<td width="20%" align=left>
</td>
</tr>
<tr>
<td width="40%" align=middle><b><font color="black" SIZE=2 FACE="sans-serif" align="right"> Work Order Tasks * : </font> </b></td>
<td width="20%"><b>Maintenance</b><br>
<INPUT TYPE=CHECKBOX NAME="repair" value="repair" >repair<P>
<INPUT TYPE=CHECKBOX NAME="replacement" value="replacement">replacement<P>
</td>
<td width="20%" align=left></td></td>
</tr>
</tr>
<tr> <td width="20%">
<td width="40%" align=left> <b>Emergency</b><br><INPUT TYPE=CHECKBOX NAME="gasEmergency" value="gasEmergency">Gas Emergency<P>
</td>
<td width="20%" align=left>
</td>
<td width="20%" align=left>
</td>
<td width="20%" align=left>
</td>
</tr>
<tr>
<td width="40%" align=middle><b><font color="black" SIZE=2 FACE="sans-serif" align="right"> Additional Information: </font> </b></td>
<td width="20%"><TEXTAREA NAME="additionalInfo" COLS=40 ROWS=6></TEXTAREA>
</td>
<td width="20%" align=left>
</td>
<td width="20%" align=left>
</td>
</tr>
</tr>
<tr bgcolor=#A68064>
<td width="40%" align=left bgcolor=#A68064>
</td>
<td width="20%" align=left bgcolor=#A68064>
</td>
<td width="20%" align=left bgcolor=#A68064>
</td>
<td width="20%" align=left bgcolor=#A68064>
</td>
</tr>
<tr bgcolor=#A68064 ><td width="100%" colspan=4 align=center bgcolor=#A68064>
<input type="submit" name="submit" value="Submit Order" style="background-color: #E9C2A6;">
<input type="reset" name="reset" value="Reset Values" style="background-color: #E9C2A6;" >
<input type="button" name="btn" value=" WO Error Report" onClick="javascript: mypopup()" style="background-color:#E9C2A6;" >
</td>
</tr>
<tr bgcolor=#A68064>
<td width="40%" align=left bgcolor=#A68064>
</td>
<td width="20%" align=left bgcolor=#A68064>
</td>
<td width="20%" align=left bgcolor=#A68064>
</td>
<td width="20%" align=left bgcolor=#A68064>
</td>
</tr>
<tr bgcolor=#A68064>
<td width="50%" colspan = "4" align=left bgcolor="#A68064"> <font color="#CDCDCD"> * Indicates Mandatory fields </font>
</td>
</tr>
<tr bgcolor=#A68064> </tr>
</form>
</table>
</td></tr></table>
</table>
<br>
<!-- <marquee> <b>Wipro Technologies</b>, <br> Disclaimer : This is only a prototype model and used only for testing. </marquee> -->
<script language="JavaScript">
</Script>
</body>
</html>
-----------------createWorkOrderFFA.jsp ends-------------
-----------------invokeWorkOrderFFA.jsp starts-----------
<%@page import="com.oracle.bpel.client.Locator" %>
<%@page import="com.oracle.bpel.client.NormalizedMessage" %>
<%@page import="com.oracle.bpel.client.delivery.IDeliveryService" %>
<html>
<head>
<title>Invoke WorkOrderService </title>
</head>
<body>
<%
String interfaceType = request.getParameter("interfaceType");
String repair = request.getParameter("repair");
System.out.println("repair repair---------------------->");
String replacement = request.getParameter("replacement");
String gasEmergency = request.getParameter("gasEmergency");
String additionalInfo = request.getParameter("additionalInfo");
String woType1="Maintenance";
String woType2="Emergency";
System.out.println("before xml---------------------->");
String xml = "<hostWOApplication xmlns=\"http://services.otn.com\">"
+"<interfaceType>" + interfaceType + "</interfaceType>"
+"<Maintenance>"
+"<repair>" + repair + "</repair>"
+"<replacement>" + replacement + "</replacement>"
+"</Maintenance>"
+"<Emergency>"
+ "<gasEmergency>" + gasEmergency + "</gasEmergency>"
+"</Emergency>"
+ "<additionalInfo>" + additionalInfo + "</additionalInfo>"
+ "</hostWOApplication>";
System.out.println("Payload data ----------------------------------------->"+xml);
Locator locator = new Locator("default","bpel");
System.out.println("Before Idelivery service--------------->");
IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
System.out.println("After IDeliveryService data----------------------->");
// construct the normalized message and send to Oracle BPEL Process Manager
NormalizedMessage nm = new NormalizedMessage( );
nm.addPart("payload", xml );
System.out.println("Before process service--------------->");
deliveryService.request("A2", "process", nm);
System.out.println("After process service--------------->");
out.println( "<b><Font Face=Arial color=red>Work Order has been initiated!</font></b>" );
%>
<table bgColor="#E9C2A6" border="1" cellpadding="0">
<tr ><td width="100%" colspan=4 align=center >
<b>The Work Order Details could be found at this link:
<Font Face=Arial color=red><italic>Work Order Creation Details<italic></Font><b>
</tr>
</table>
</body>
</html>
-----------------invokeWorkOrderFFA.jsp ends-----------
I am getting the following error:
----------------error desc starts----------------------
Oracle BPEL Process Manager Full Cycle
An unexpected error has occurred while executing your request. This is most likely related to a defect in the Oracle BPEL Process Manager product. We apologize for the inconvenience. Please open a TAR in http://metalink.oracle.com if you are our customers. Otherwise, you can post the error to the OTN forum and we will get back to you as soon as possible.
Attachments:
Build Information:
Oracle BPEL Server version 2.2
Build: 1361
Build time: Thu Mar 17 15:51:23 PST 2005
Build type: release
Source tag: BPELPM_10_1_2_beta3_branch
Exception Message:
[java.lang.Exception]
Invalid Login. Domain not specified.
Exception Trace:
java.lang.Exception: Invalid Login. Domain not specified.
at com.collaxa.cube.fe.util.ServletUtils.getLocator(ServletUtils.java:80)
at displayInstance.jspService(_displayInstance.java:71)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:347)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at com.collaxa.cube.fe.DomainFilter.doFilter(DomainFilter.java:89)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:649)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:534)
----------------error desc ends----------------------hey mgrovr..
how to ensure that my jsps are under orabpel. i m getting a javax.naming.NameNotFoundException: ejb/collaxa/system/DomainManagerBean not found exception wile invoking bpel process from jsp. I have created the jsps in Jdeveloper and i'm running it from there only.
Can u tell me a way to keep me application under orabpel -
Invoke a bpel process from Java API
All,
I got an error when I tried to invoke a bpel process from java api. Can anyone help?
I got the following errors:
<2007-08-14 10:10:11,986> <ERROR> <default.collaxa.cube.xml> com.oracle.bpel.client.BPELFault: faultName: {{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure}
messageType: {null}
parts: {{summary=oracle.xml.parser.v2.XMLElement@da5c23}}
<2007-08-14 10:10:12,158> <ERROR> <default.collaxa.cube.xml> <XMLElement__CXPM::save> ORABPEL-09219
Cannot save element.
An attempt to save the element "EssayScoringDetailsCollection" has failed. Because this element is not a root element and for some reason the scope has reference to this element, scope should have references ONLY to root elements.
at com.collaxa.cube.xml.dom.XMLElement__CXPM.save(XMLElement__CXPM.java:82)
at com.collaxa.cube.engine.core.PersistenceService.save(PersistenceService.java:259)
at com.collaxa.cube.engine.types.bpel.CXMessageVariable__CXPM.save(CXMessageVariable__CXPM.java:182)
at com.collaxa.cube.engine.core.PersistenceService.save(PersistenceService.java:259)
at com.collaxa.cube.engine.persist.BaseScope__CXPM.save(BaseScope__CXPM.java:170)
at com.collaxa.cube.engine.persist.Scope__CXPM.save(Scope__CXPM.java:97)
at com.collaxa.cube.engine.core.PersistenceService.save(PersistenceService.java:259)
at com.collaxa.cube.engine.enc.ScopeContextSerializer.serializeContext(ScopeContextSerializer.java:587)
at com.collaxa.cube.engine.enc.ScopeContextSerializer.toBin(ScopeContextSerializer.java:99)
at com.collaxa.cube.engine.adaptors.common.BaseCubeInstancePersistenceAdaptor.store(BaseCubeInstancePersistenceAdaptor.java:543)
at com.collaxa.cube.engine.adaptors.olite.CubeInstancePersistenceAdaptor.store(CubeInstancePersistenceAdaptor.java:387)
at com.collaxa.cube.engine.data.CubeInstancePersistenceMgr.store(CubeInstancePersistenceMgr.java:367)
at com.collaxa.cube.engine.CubeEngine.store(CubeEngine.java:5008)
at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:5266)
at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:1083)
at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.createAndInvoke(CubeEngineBean.java:132)
at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.syncCreateAndInvoke(CubeEngineBean.java:161)
at sun.reflect.GeneratedMethodAccessor158.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.JAASInterceptor$1.run(JAASInterceptor.java:31)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at com.evermind.server.ThreadState.runAs(ThreadState.java:622)
at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:34)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.TxRequiresNewInterceptor.invoke(TxRequiresNewInterceptor.java:52)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
at CubeEngineBean_LocalProxy_4bin6i8.syncCreateAndInvoke(Unknown Source)
at com.collaxa.cube.engine.delivery.DeliveryHandler.initialRequestAnyType(DeliveryHandler.java:499)
at com.collaxa.cube.engine.delivery.DeliveryHandler.initialRequest(DeliveryHandler.java:451)
at com.collaxa.cube.engine.delivery.DeliveryHandler.request(DeliveryHandler.java:125)
at com.collaxa.cube.ejb.impl.DeliveryBean.request(DeliveryBean.java:95)
at sun.reflect.GeneratedMethodAccessor157.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.JAASInterceptor$1.run(JAASInterceptor.java:31)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at com.evermind.server.ThreadState.runAs(ThreadState.java:622)
at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:34)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
at DeliveryBean_RemoteProxy_4bin6i8.request(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595)
<2007-08-14 10:10:12,158> <ERROR> <default.collaxa.cube> <BaseCubeSessionBean::logError> Error while invoking bean "cube engine": Cannot serialize DOM element.
Failed to serialize the DOM element "EssayScoringDetailsCollection" to binary format. The exception reported is Cannot save element.
An attempt to save the element "EssayScoringDetailsCollection" has failed. Because this element is not a root element and for some reason the scope has reference to this element, scope should have references ONLY to root elements.
ORABPEL-09221
Cannot serialize DOM element.
I did the following in my java application:
//create the BPEL locator object to find the BPEL process
Locator locator = new Locator("default", "welcome1", jndi);
//just for fun, display all the available BPEL processes
/*for(IBPELProcessHandle ibph : locator.listProcesses()) {
System.out.println(ibph.getProcessModel());
IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME);
//construct the normalized message
NormalizedMessage nm = new NormalizedMessage();
String xml = "<ns1:PromptsCollection xmlns:ns1='http://xmlns.oracle.com/pcbpel/adapter/db/top/DBSelectPrompt'>" +
"<ns1:Prompts>" +
"<ns1:promptId>" pr.getPromptId()"</ns1:promptId>" +
"<ns1:calibrated>"+pr.getCalibrated().toString()+"</ns1:calibrated>" +
"<ns1:ibn>"+pr.getIbn()+"</ns1:ibn>" +
"<ns1:promptType>"+pr.getPromptType()+"</ns1:promptType>" +
"<ns1:promptsetId>"+pr.getPromptset().getPromptsetId()+"</ns1:promptsetId>" +
"<ns1:vantagePromptId>"+pr.getVantagePromptId()+"</ns1:vantagePromptId>" +
"<ns1:promptKey>"+pr.getPromptKey()+"</ns1:promptKey>" +
"<ns1:holdStatusCode>"+pr.getHoldStatus()+"</ns1:holdStatusCode>" +
"<ns1:holdEssayTotalCount>"+pr.getHoldEssayTotalCount()+"</ns1:holdEssayTotalCount>" +
"<ns1:holdEssayCurrentCount>"+pr.getHoldEssayCurrentCount()+"</ns1:holdEssayCurrentCount>" +
"<ns1:approvedStatus>"+pr.getApprovedStatus()+"</ns1:approvedStatus>" +
"<ns1:rowChangeDate>"+pr.getRowChangeDate()+"</ns1:rowChangeDate>" + "<ns1:programId>1001</ns1:programId>" +
"<ns1:programId></ns1:programId>" +
"<ns1:characterCountMin>"+pr.getCharacterCountMin()+"</ns1:characterCountMin>" +
"<ns1:durationMin>"+pr.getDurationMin()+"</ns1:durationMin>" +
"<ns1:rangeFindingFlag>"+pr.getRangeFindingFlag()+"</ns1:rangeFindingFlag>" +
"<ns1:durationFlag></ns1:durationFlag>" +
"<ns1:characterCountMax>"+pr.getCharacterCountMax().intValue()+"</ns1:characterCountMax>" +
"<ns1:durationMax>"+pr.getDurationMax().intValue()+"</ns1:durationMax>" +
"<ns1:rangeCount>"+ rangeCount+"</ns1:rangeCount>" +
"</ns1:Prompts>" +
"</ns1:PromptsCollection>" ;
/*String xml = "<ns1:PromptsCollection xmlns:ns1='http://xmlns.oracle.com/pcbpel/adapter/db/top/DBSelectPrompt'>" +
"<ns1:Prompts>" +
"<ns1:promptId>" pr.getPromptId().toString()"</ns1:promptId>" +
"<ns1:calibrated>"+pr.getCalibrated().toString()+"</ns1:calibrated>" +
"<ns1:ibn>"+pr.getIbn()+"</ns1:ibn>" +
"<ns1:promptType>"+pr.getPromptType()+"</ns1:promptType>" +
"<ns1:promptsetId>"+pr.getPromptset().getPromptsetId().toString()+"</ns1:promptsetId>" +
"<ns1:vantagePromptId>"+pr.getVantagePromptId()+"</ns1:vantagePromptId>" +
"<ns1:promptKey>"+pr.getPromptKey()+"</ns1:promptKey>" +
"<ns1:holdStatusCode>"+pr.getHoldStatus()+"</ns1:holdStatusCode>" +
"<ns1:holdEssayTotalCount>"+pr.getHoldEssayTotalCount()+"</ns1:holdEssayTotalCount>" +
"<ns1:holdEssayCurrentCount>"+pr.getHoldEssayCurrentCount()+"</ns1:holdEssayCurrentCount>" +
"<ns1:approvedStatus>"+pr.getApprovedStatus()+"</ns1:approvedStatus>" +
"<ns1:rowChangeDate>"+pr.getRowChangeDate()+"</ns1:rowChangeDate>" +
"<ns1:programId></ns1:programId>" +
"<ns1:characterCountMin>"+pr.getCharacterCountMin()+"</ns1:characterCountMin>" +
"<ns1:durationMin>"+pr.getDurationMin()+"</ns1:durationMin>" +
"<ns1:rangeFindingFlag>"+pr.getRangeFindingFlag()+"</ns1:rangeFindingFlag>" +
"<ns1:durationFlag></ns1:durationFlag>" +
"<ns1:characterCountMax>"+pr.getCharacterCountMax()+"</ns1:characterCountMax>" +
"<ns1:durationMax>"+pr.getDurationMax()+"</ns1:durationMax>" +
"<ns1:rangeCount>"+pr.getRangeCount()+"</ns1:rangeCount>" +
"</ns1:Prompts>" +
"</ns1:PromptsCollection>" ; */
//add the payload part to the message with the xml variable
nm.addPart("payload", xml.trim());
//make the call to the BPEL process
NormalizedMessage response = deliveryService.request("UpdatePromptStatus", "process",nm);
Map payload = response.getPayload();I'm getting all of the same errors, but in a slightly different situation.
<2007-08-23 09:11:46,086> <ERROR> <default.collaxa.cube.xml> com.oracle.bpel.client.BPELFault: faultName: {{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure}
messageType: {null}
parts: {{summary=oracle.xml.parser.v2.XMLElement@d454cf}}
<2007-08-23 09:11:46,633> <ERROR> <default.collaxa.cube.xml> <XMLElement__CXPM::save> ORABPEL-09219
Cannot save element.
An attempt to save the element "SfCaseCollection" has failed. Because this element is not a root element and for some reason the scope has reference to this element, scope should have references ONLY to root elements.
at com.collaxa.cube.xml.dom.XMLElement__CXPM.save(XMLElement__CXPM.java:82)
at com.collaxa.cube.engine.core.PersistenceService.save(PersistenceService.java:259)
at com.collaxa.cube.engine.types.bpel.CXMessageVariable__CXPM.save(CXMessageVariable__CXPM.java:182)
at com.collaxa.cube.engine.core.PersistenceService.save(PersistenceService.java:259)
at com.collaxa.cube.engine.persist.BaseScope__CXPM.save(BaseScope__CXPM.java:170)
at com.collaxa.cube.engine.persist.Scope__CXPM.save(Scope__CXPM.java:97)
at com.collaxa.cube.engine.core.PersistenceService.save(PersistenceService.java:259)
at com.collaxa.cube.engine.enc.ScopeContextSerializer.serializeContext(ScopeContextSerializer.java:587)
at com.collaxa.cube.engine.enc.ScopeContextSerializer.toBin(ScopeContextSerializer.java:99)
at com.collaxa.cube.engine.adaptors.common.BaseCubeInstancePersistenceAdaptor.store(BaseCubeInstancePersistenceAdaptor.java:543)
at com.collaxa.cube.engine.adaptors.oracle.CubeInstancePersistenceAdaptor.store(CubeInstancePersistenceAdaptor.java:83)
at com.collaxa.cube.engine.data.CubeInstancePersistenceMgr.store(CubeInstancePersistenceMgr.java:367)
at com.collaxa.cube.engine.CubeEngine.store(CubeEngine.java:5008)
at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:5266)
at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1771)
at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.handleWorkItem(CubeEngineBean.java:306)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.JAASInterceptor$1.run(JAASInterceptor.java:31)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at com.evermind.server.ThreadState.runAs(ThreadState.java:622)
at com.evermind.server.ejb.interceptor.system.JAASInterceptor.invoke(JAASInterceptor.java:34)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
at CubeEngineBean_LocalProxy_4bin6i8.handleWorkItem(Unknown Source)
at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handle(PerformMessageHandler.java:45)
at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:138)
at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.interceptor.system.SetContextActionInterceptor.invoke(SetContextActionInterceptor.java:44)
at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
at oracle.j2ee.connector.messageinflow.MessageEndpointImpl.OC4J_invokeMethod(MessageEndpointImpl.java:297)
at WorkerBean_EndPointProxy_4bin6i8.onMessage(Unknown Source)
at oracle.j2ee.ra.jms.generic.WorkConsumer.run(WorkConsumer.java:266)
at oracle.j2ee.connector.work.WorkWrapper.runTargetWork(WorkWrapper.java:242)
at oracle.j2ee.connector.work.WorkWrapper.doWork(WorkWrapper.java:215)
at oracle.j2ee.connector.work.WorkWrapper.run(WorkWrapper.java:190)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:814)
at java.lang.Thread.run(Thread.java:595)
Did you ever find a solution to your problem?
My situation is that I'm running a process that grabs data from a salesforce.com web service and dumps some of the data back into my local database. The process croaks after processing 850 or so records. I have also increased my PermSize memory to 512M.
Any ideas why all of a sudden after processing that many records it would stop working?
Thanks,
Adam -
Issue in invoking the BPEL process from Oracle using a SOAP Request
Hi,
We are facing an issue while invoking a deployed Bpel Process from Oracle Applications 11.5.10..
Using a concurrent program( Unix / Host program ) we are passing the input variables required for the Bpel process in the ProcessRequest tags and forming this as a SOAP message payload.
Then trying to invoke the deployed bpel process using the end point location using HTTP POST..but nothing is happening..
The bpel process is not getting invoked when i look at the Console and also checked for the Manual Recovery queue..it's not stuck there as well..
Have set the Transfer Time Out to 25 minutes using UTL_HTTP.SET_TRANSFER_TIMEOUT(1500);
Could someone please help us as soon as possible with this ..as this is critical and we are stuck at the moment.
The logic is mentioned below :
UTL_HTTP.SET_TRANSFER_TIMEOUT(1500);
UTL_HTTP.SET_DETAILED_EXCP_SUPPORT(ENABLE=>TRUE);
soap_request:='<?xml version="1.0" encoding="UTF-8"?>'||
'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'||
'<soap:Header/>'||
'<soap:Body xmlns:ns1="http://xmlns.oracle.com/bpelprocessname">'||
'<ns1:bpelprocessnameProcessRequest>'||
'<ns1:CSONum>'||order_number||'</ns1:CSONum>'||
'<ns1:CreationDate>'||c_chr_cso_last_run_dte||'</ns1:CreationDate>'||
'</ns1:bpelprocessnameProcessRequest>'||
'</soap:Body>'||
'</soap:Envelope>';
http_req:= utl_http.begin_request
('http://bpel_server ip:port/orabpel/domain_name/bpelprocessname/1.0' , 'POST', 'HTTP/1.1'
utl_http.set_header(http_req, 'Content-Type', 'text/xml') ;
utl_http.set_header(http_req, 'Content-Length', length(soap_request)) ;
utl_http.set_header(http_req, 'SOAPAction', 'process');
utl_http.write_text(http_req, soap_request) ;
http_resp:= utl_http.get_response(http_req) ;
utl_http.read_text(http_resp, soap_respond) ;
utl_http.end_response(http_resp) ;
dbms_output.put_line(soap_respond);
Thankscheck if your soap envelope is correct,check my below procedure which is working fine for me
procedure xxxxx_BPEL_SCHEDULER
IS
soap_request varchar2(30000);
soap_respond varchar2(30000);
http_req utl_http.req;
http_resp utl_http.resp;
launch_url varchar2(240) ;
begin
soap_request:='<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:add="http://schemas.xmlsoap.org/ws/2003/03/addressing" xmlns:star="http://xmlns.oracle.com/xxxxx_BPEL_SCHEDULER">
<soapenv:Header>
<add:MessageID>?</add:MessageID>
<add:ReplyTo>
<add:Address>?</add:Address>
<!--Optional:-->
<add:ReferenceProperties>
<!--You may enter ANY elements at this point-->
</add:ReferenceProperties>
<!--Optional:-->
<add:PortType>?</add:PortType>
<!--Optional:-->
<add:ServiceName PortName="?">?</add:ServiceName>
<!--You may enter ANY elements at this point-->
</add:ReplyTo>
</soapenv:Header>
<soapenv:Body>
<star:STARS_BPEL_SCHEDULERProcessRequest>
<star:SCHEDULER_PARAM1>?</star:SCHEDULER_PARAM1>
<star:SCHEDULER_PARAM2>?</star:SCHEDULER_PARAM2>
<star:SCHEDULER_PARAM3>?</star:SCHEDULER_PARAM3>
<star:SCHEDULER_PARAM4>?</star:SCHEDULER_PARAM4>
<star:SCHEDULER_PARAM5>?</star:SCHEDULER_PARAM5>
</star:STARS_BPEL_SCHEDULERProcessRequest>
</soapenv:Body>
</soapenv:Envelope>';
http_req:= utl_http.begin_request('http://xxxxxx.com:16000/orabpel/default/xxxx_BPEL_SCHEDULER/1.0 '
,'POST',
'HTTP/1.1'
utl_http.set_header(http_req, 'Content-Type', 'text/xml') ;
utl_http.set_header(http_req, 'Content-Length', length(soap_request)) ;
utl_http.set_header(http_req, 'SOAPAction', 'initiate');
utl_http.write_text(http_req, soap_request) ;
http_resp:= utl_http.get_response(http_req) ;
utl_http.read_text(http_resp, soap_respond) ;
utl_http.end_response(http_resp) ;
dbms_output.put_line(soap_respond);
END; -
Simple invoking BPEL process from JSP not working
Hello Everybody,
I'm trying to invoke a BPEL process from a client JSP. I'm following the tutorial 7 Invoking the BPEL processes.
I'm trying to use the same tutorial for a different application.
Here is my WSDL snippet.
<types>
<schema attributeFormDefault="qualified"
elementFormDefault="qualified"
targetNamespace="http://www.arcwebservices.com/v2006"
xmlns="http://www.w3.org/2001/XMLSchema">
<element name="SpatialQueryRequest" type="s1:SpatialQueryRequestType"/>
<element name="SpatialQueryResponse" type="s1:SpatialQueryResponseType"/>
<complexType name="SpatialQueryRequestType">
<sequence>
<element name="username" type="string"/>
<element name="password" type="string"/>
</sequence>
</complexType>
<complexType name="SpatialQueryResponseType">
<sequence>
<element name="token" type="string"/>
</sequence>
</complexType>
</schema>
</types>
<message name="SpatialQueryRequestMessage">
<part name="payload" element="s1:SpatialQueryRequest"/>
</message>
<message name="SpatialQueryResponseMessage">
<part name="payload" element="s1:SpatialQueryResponse"/>
</message>
<portType name="SpatialQuery">
<operation name="initiate">
<input message="tns:SpatialQueryRequestMessage"/>
</operation>
</portType>
<!-- portType implemented by the requester of SpatialQuery BPEL process
for asynchronous callback purposes
-->
<portType name="SpatialQueryCallback">
<operation name="onResult">
<input message="tns:SpatialQueryResponseMessage"/>
</operation>
</portType>
The JSP code is:
<%
String ssn = request.getParameter("ssn");
//if(ssn == null)
// ssn = "123-12-1234";
String username = "jaweed";
String password = "ibrahim";
//String xml = "<ssn xmlns=\"http://services.otn.com\">" + ssn + "</ssn>";
//String xml = "<UserName xmlns="http://www.arcwebservices.com/v2006">" + username + "</UserName><Password xmlns="http://www.arcwebservices.com/v2006">" + password + "</Password>";
String xml = "<UserName xmlns=\"http://www.arcwebservices.com/v2006\">" + username + "</UserName><Password xmlns=\"http://www.arcwebservices.com/v2006\">" + password + "</Password>";
Locator locator = new Locator("default","bpel");
IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
// construct the normalized message and send to Oracle BPEL Process Manager
NormalizedMessage nm = new NormalizedMessage( );
nm.addPart("payload", xml );
NormalizedMessage res = deliveryService.request("SpatialQuery", "initiate", nm);
Map payload = res.getPayload();
//out.println( "BPELProcess CreditRatingService executed!<br>" );
out.println( "Token is " + payload.get("payload") );
%>
com.oracle.bpel.client.ServerException: IDeliveryService.request() invoked for one-way operation 'initiate'. This method can only be used to invoke two-way operations which return an output message. Please check the WSDL which defines this operation and use the method IDeliveryService.post() to invoke a one-way operation
But I'm getting an exception. I'm in deep trouble please help me. UrgentYeah ..This is my final project for my masters degree.
I'm integrating BPEL with GIS(Geographic Information System) webservices provided by ESRI(Arcweb services). My main BPEL process that I built follows this sample example. The problem is that I need to show a working client application within 2 days or else my project is termed as incomplete and my graduation will be postponed to next semester. :(
I tried your advice, as soon as I add a Java code to my BPEL process, the application is taking longer time to execute in the BPEL console itself.
<bpelx:exec xmlns:bpelx="http://schemas.oracle.com/bpel/extension" language="java" version="1.4" name="exec-1">
<![CDATA[setConversationId("output");]]>
</bpelx:exec>
So after the thread sleep the webservice is not ready to give its output.
Just a quick thought, I assumed that if I attach the output of the my Invoke(Client) to a Reply activity,which will make it a two way operation.
Then I could use,
NormalizedMessage res = deliveryService.request("SpatialQuery", "initiate", nm);
will work.
I assigned the ouput of the Invoke(Client) to the variable in Reply activity.
But my reply activity is throwing a NULL pointer exception.
This is my BPEL code:
<sequence name="main">
<receive name="receiveInput" partnerLink="client" portType="tns:InvokeTest" operation="initiate" variable="input" createInstance="yes"/>
<assign name="assign-1">
<copy>
<from variable="input" part="payload" query="/nsxml0:InvokeTestRequest/nsxml0:username"></from>
<to variable="IsaInput" part="parameters" query="/nsxml0:getToken/nsxml0:username"/>
</copy>
<copy>
<from variable="input" part="payload" query="/nsxml0:InvokeTestRequest/nsxml0:password"></from>
<to variable="IsaInput" part="parameters" query="/nsxml0:getToken/nsxml0:password"/>
</copy>
</assign>
<invoke name="invoke-1" partnerLink="Authentication" portType="nsxml0:IAuthentication" operation="getToken" inputVariable="IsaInput" outputVariable="IsaOutput"/>
<assign name="assign-2">
<copy>
<from variable="IsaOutput" part="parameters" query="/nsxml0:getTokenResponse/nsxml0:Result"></from>
<to variable="output" part="payload" query="/nsxml0:InvokeTestResponse/nsxml0:token"/>
</copy>
</assign>
<reply name="reply-2" partnerLink="client" portType="tns:InvokeTest" operation="initiate" variable="output"/> </sequence>
I really appreciate your patience and help. -
Calling OWSM Secured BPEL Process from JAVA
HI,
I have created OWSM gateway and registered BPEL process under that.
Now i want to call that BPEL process from java class. Can anybody please tell me how can i pass the security SOAP header.
Here is the class i am using ...
package com.javarpc;
import java.rmi.RemoteException;
import javax.xml.namespace.QName;
import javax.xml.rpc.JAXRPCException;
import javax.xml.rpc.Service;
import javax.xml.rpc.ServiceException;
import javax.xml.rpc.ServiceFactory;
import javax.xml.rpc.ParameterMode;
import javax.xml.rpc.encoding.XMLType;
import javax.xml.rpc.soap.SOAPFaultException;
import org.apache.axis.client.Call;
import org.apache.axis.message.SOAPBodyElement;
import java.io.InputStream;
import java.io.ByteArrayInputStream;
public class CallHelloWorld
private static QName SERVICE_NAME;
private static QName PORT_TYPE;
private static QName OPERATION_NAME_IN;
private static String SOAP_ACTION;
private static String STYLE;
private static String THIS_NAMESPACE = "http://xmlns.oracle.com/HelloWorld";
private static String PARAMETER_NAMESPACE = "http://xmlns.oracle.com/HelloWorld";
private String location;
static
SERVICE_NAME = new QName(THIS_NAMESPACE,"HelloWorld");
PORT_TYPE = new QName(THIS_NAMESPACE,"HelloWorld") ;
SOAP_ACTION = "process";
/*Setting for Wraped style of calling*/
//STYLE = "wraped";
//OPERATION_NAME_IN = new QName(THIS_NAMESPACE,"HelloWorldProcessRequest");
/*Setting for Message style of calling*/
STYLE = "message";
OPERATION_NAME_IN = new QName(THIS_NAMESPACE,"process");
public void setLocation(String location)
this.location = location;
public void initiate(String symbol)
try
/* Create Service and Call object */
ServiceFactory serviceFactory = ServiceFactory.newInstance();
Service service = serviceFactory.createService( SERVICE_NAME );
Call call = (Call)service.createCall( PORT_TYPE );
/* Set all of the stuff that would normally come from WSDL */
call.setTargetEndpointAddress( location );
call.setProperty(Call.SOAPACTION_USE_PROPERTY, Boolean.TRUE);
call.setProperty(Call.SOAPACTION_URI_PROPERTY, SOAP_ACTION);
call.setProperty( Call.OPERATION_STYLE_PROPERTY , STYLE );
call.setOperationName(OPERATION_NAME_IN);
/*Setting Input for message type and invoke web service through message style*/
String strXMLInput="<HelloWorldProcessRequest xmlns=\"http://xmlns.oracle.com/HelloWorld\">";
strXMLInput+="<enovia>test</enovia>";
strXMLInput+="</HelloWorldProcessRequest>";
SOAPBodyElement[] requestSBElts = new SOAPBodyElement[1];
InputStream resultInputStream = new ByteArrayInputStream(strXMLInput.getBytes());
requestSBElts[0] = new SOAPBodyElement(resultInputStream);
System.out.println(requestSBElts[0]);
java.util.Vector output = (java.util.Vector) call.invoke(requestSBElts);
System.out.println( "HelloWorld BPEL process initiated by message " +output);
/*Setting Input for message type and invoke web service through wraped style
call.addParameter(new QName(PARAMETER_NAMESPACE,"input"), XMLType.XSD_STRING, ParameterMode.IN);
//call.setReturnType(new QName("XMLType.XSD_STRING"));
// call.setReturnType(new QName("String"));
Object[] params = new Object[1];
String outPut = new String();
params[0] = symbol;
call.invokeOneWay(params);
//Object ret;
//ret = (String) call.invoke( params );
System.out.println( "HelloWorld BPEL process initiated" );*/
catch (SOAPFaultException e)
System.err.println("Generated fault: ");
System.out.println (" Fault Code = " + e.getFaultCode());
System.out.println (" Fault String = " + e.getFaultString());
catch (JAXRPCException e)
System.err.println("JAXRPC Exception: " + e.getMessage());
catch (ServiceException e)
System.err.println("Service Exception: " + e.getMessage());
catch (RemoteException e)
System.err.println("RemoteException: " + e.getMessage());
public static void main(String[] args)
String symbol = "Kevin";
// String location = "http://valizprd208.val.cummins.com:7777/orabpel/tst/HelloWorld/1.0";
String location = "http://integrationvaldlv.cummins.com:7777/gateway/services/SID0003002?wsdl";
CallHelloWorld client = new CallHelloWorld();
client.setLocation( location );
client.initiate( symbol );
}You can get sample input by intercepting the request to check what exactly you need to put in SOAP header and what in body.
To manipulate soap header you can look at : http://www.oracle.com/technology/sample_code/tech/java/codesnippet/webservices/soapheader/index.html
HTH
Chintan -
Calling a bpel process from other Bpel process
hi,
my req is
i have created BPEL process where getting the list of customers by giving the partial name using DBAdapter...... getting the output from the Invoker and the output is assinged to a assing activity(thru copy operations) from assign to replyoutput.
for example from partial output (eg: input---name=Wor%)
output:
World of Business
World of Concrete
Worldwide Communications
Worldwide Communications-Vision Corporation-2090
here if i click the 'Worldwide Communications-Vision Corporation-2090' it should show the sub-details of the name sucha as name,address..............
how to call subdetail process to show the subdetails by cliicking on the name
the above process done on the front-endHi
API's are available to call a BPEL process from the front-end.
you can invoke a BPEL with the required SOAP msg.
Thanks -
Invoking BPEL Process from a JSP Page 500 Internal Server Error
Hi,
I try to invoke a BPEL Process from a JSP Page and receive the following error. I just pasted the example from the Oracle PM Developer's Guide tutorial. Previously I deployed the CreditRatingService BPEL Process.
Can anyone help me, please?
D.
Here is a sequence from my JSP / and the error I get:
String ssn = request.getParameter("ssn");
if(ssn == null)
ssn = "123-12-1234";
String xml = "<ssn xmlns=\"http://services.otn.com\">"
+ ssn + "</ssn>";
Locator locator = new Locator("default","welcome1");
IDeliveryService deliveryService =
(IDeliveryService)locator.lookupService
(IDeliveryService.SERVICE_NAME );
// construct the normalized message and send to oracle bpel process manager
NormalizedMessage nm = new NormalizedMessage( );
nm.addPart("payload", xml );
NormalizedMessage res =
deliveryService.request("CreditRatingService", "process", nm);
Map payload = res.getPayload();
out.println( "BPELProcess CreditRatingService executed!<br>" );
out.println( "Credit Rating is " + payload.get("payload") );
500 Internal Server Error
java.lang.Exception: Erstellen von "ejb/collaxa/system/DeliveryBean"-Bean nicht erfolgreich. Es wurde folgende Exception gemeldet: "javax.naming.NameNotFoundException: ejb/collaxa/system/DeliveryBean not found
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.rmi.RMIServerContext.lookup(RMIServerContext.java:207)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.ApplicationContext.unprivileged_lookup(ApplicationContext.java:257)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.ApplicationContext.lookup(ApplicationContext.java:197)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:279)
at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:250)
at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:83)
at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:53)
at _InvokeBP._jspService(_InvokeBP.java:65)
[InvokeBP.jsp]
at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.3.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
Message was edited by:
user603180
Message was edited by:
user603180
Message was edited by:
user603180
Message was edited by:
user603180
Message was edited by:
user603180
Message was edited by:
user603180
Message was edited by:
user603180
Message was edited by:
user603180
Message was edited by:
user603180Here is the solution:
Properties props = new Properties();
props.setProperty("orabpel.platform", "oc4j_10g");
props.setProperty("java.naming.factory.initial",
"com.evermind.server.rmi.RMIInitialContextFactory");
props.setProperty("java.naming.provider.url", "ormi://localhost/orabpel");
props.setProperty("java.naming.security.principal", "oc4jadmin");
props.setProperty("java.naming.security.credentials", "welcome1");
and several jars have to be added to the project:
Orabpel.jar , Orabpel-common.jar, oc4j*.jar,
%ANT_HOME%\lib\ant.jar;
%ANT_HOME%\lib\xercesImpl.jar;
%ANT_HOME%\lib\xml-apis.jar;
%AXIS_HOME%\lib\axis.jar;
%AXIS_HOME%\lib\axis-ant.jar;
%AXIS_HOME%\lib\commons-discovery.jar;
%AXIS_HOME%\lib\commons-logging.jar;
%AXIS_HOME%\lib\jaxrpc.jar;
%AXIS_HOME%\lib\log4j-1.2.8.jar;
%AXIS_HOME%\lib\saaj.jar;
%AXIS_HOME%\lib\wsdl4j.jar; -
Invoking a BPEL process from a WS
Errors occurred when I tried to invoke a BPEL process from a WS. The BPEL process was deployed in Local PM server and the WS was deployed in local OC4J server of JDeveloper 10g.
在Java class 发布成WS,部署在JDeveloper 10g中的oc4j服务器里,调用本机的BPEL流程出错,
WS coding as below:
WS代码如下:
package zbht.com;
import com.oracle.bpel.client.Locator;
import com.oracle.bpel.client.NormalizedMessage ;
import com.oracle.bpel.client.dispatch.IDeliveryService ;
import java.util.Date;
import com.oracle.services.bpel.task.IWorklistService;
import com.oracle.services.bpel.task.ITask;
public class test
public test()
* @webmethod
public void getBPEL(String str1,String str2)
try{
String xml = "<BPELProcess xmlns=\"http://xmlns.oracle.com/BPELProcess\">"
+ "<input>"+str1+"</input>"
+ "<input1>"+str2+"</input1>"
+ "</BPELProcess>";
System.out.println(xml);
// String xml="<OrgName xmlns=\"http://sse.org.cn/poc\">"+OrgName+"</OrgName>";
Locator locator = new Locator("default","bpel");
System.out.println("123");
IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME);
System.out.println("1234");
// construct the normalized message and send to Oracle BPEL Process Manager
NormalizedMessage nm = new NormalizedMessage( );
System.out.println("12345");
nm.addPart("payload" , xml );
deliveryService.post("BPELProcess", "initiate", nm);
}catch(Exception e)
e.printStackTrace();
Process source coding as below:
流程代码:
<process name="BPELProcess" targetNamespace="http://xmlns.oracle.com/BPELProcess" xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20" xmlns:ns1="http://zbht/com/test.wsdl" xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap" xmlns:bpelx="http://schemas.oracle.com/bpel/extension" xmlns:client="http://xmlns.oracle.com/BPELProcess" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc">
<partnerLinks>
<partnerLink name="client" partnerLinkType="client:BPELProcess" myRole="BPELProcessProvider"/>
<partnerLink myRole="testPortType_Role" name="PartnerLink_1" partnerRole="testPortType_Role" partnerLinkType="ns1:testPortType_PL"/>
</partnerLinks>
<variables>
<variable name="inputVariable" messageType="client:BPELProcessRequestMessage"/>
<variable name="outputVariable" messageType="client:BPELProcessResponseMessage"/>
<variable name="Invoke_1_test_InputVariable" messageType="ns1:test0Request"/>
<variable name="Invoke_1_test_OutputVariable" messageType="ns1:test0Response"/>
</variables>
<sequence name="main">
<receive name="receiveInput" partnerLink="client" portType="client:BPELProcess" operation="process" variable="inputVariable" createInstance="yes"/>
<assign name="Assign_1">
<copy>
<from variable="inputVariable" part="payload" query="/client:BPELProcessProcessRequest/client:input"/>
<to variable="Invoke_1_test_InputVariable" part="str1"/>
</copy>
<copy>
<from variable="inputVariable" part="payload" query="/client:BPELProcessProcessRequest/client:input1"/>
<to variable="Invoke_1_test_InputVariable" part="str2"/>
</copy>
</assign>
<invoke name="Invoke_1" partnerLink="PartnerLink_1" portType="ns1:testPortType" operation="test" inputVariable="Invoke_1_test_InputVariable" outputVariable="Invoke_1_test_OutputVariable"/>
<assign name="Assign_2">
<copy>
<from variable="Invoke_1_test_OutputVariable" part="return"/>
<to variable="outputVariable" part="payload" query="/client:BPELProcessProcessResponse/client:result"/>
</copy>
</assign>
<reply name="replyOutput" partnerLink="client" portType="client:BPELProcess" operation="process" variable="outputVariable"/>
</sequence>
</process>
Error messages:
错误信息:
05/10/08 17:06:06 java.lang.Exception: Failed to create "ejb/collaxa/system/DomainManagerBean" bean; exception reported is: "javax.naming.NameNotFoundException: ejb/collaxa/system/DomainManagerBean not found at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:164) at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:333) at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:120) at javax.naming.InitialContext.lookup(InitialContext.java:347) at com.oracle.bpel.client.util.BeanRegistry.lookupDomainManagerBean(BeanRegistry.java:218) at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:83) at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:47) at com.oracle.bpel.client.Locator.<init>(Locator.java:65) at zbht.com.test.getBPEL(test.java:29) at zbht.com.__testStatelessWrapper.invokeMethod(__testStatelessWrapper.java:101) at oracle.j2ee.ws.InvocationWrapper.invoke(InvocationWrapper.java:380) at oracle.j2ee.ws.RpcWebService.doGetRequest(RpcWebService.java:642) at oracle.j2ee.ws.BaseWebService.doGet(BaseWebService.java:1173) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65) at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:649) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) at java.lang.Thread.run(Thread.java:534)".05/10/08 17:06:06 at com.oracle.bpel.client.util.BeanRegistry.lookupDomainManagerBean(BeanRegistry.java:232)05/10/08 17:06:06 at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:83)05/10/08 17:06:06 at com.oracle.bpel.client.auth.DomainAuthFactory.authenticate(DomainAuthFactory.java:47)05/10/08 17:06:06 at com.oracle.bpel.client.Locator.<init>(Locator.java:65)05/10/08 17:06:06 at zbht.com.test.getBPEL(test.java:29)05/10/08 17:06:06 at zbht.com.__testStatelessWrapper.invokeMethod(__testStatelessWrapper.java:101)05/10/08 17:06:06 at oracle.j2ee.ws.InvocationWrapper.invoke(InvocationWrapper.java:380)05/10/08 17:06:06 at oracle.j2ee.ws.RpcWebService.doGetRequest(RpcWebService.java:642)05/10/08 17:06:06 at oracle.j2ee.ws.BaseWebService.doGet(BaseWebService.java:1173)05/10/08 17:06:06 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)05/10/08 17:06:06 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)05/10/08 17:06:06 at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)05/10/08 17:06:06 at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)05/10/08 17:06:06 at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:649)05/10/08 17:06:06 at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)05/10/08 17:06:06 at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)05/10/08 17:06:06 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)05/10/08 17:06:06 at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)05/10/08 17:06:06 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)05/10/08 17:06:06 at java.lang.Thread.run(Thread.java:534)
ThanksHey,
no big deal, this is because the Locator you use, runs in, say local mode,
use the other API constructor in locator, which gets a hashtable.
Tutorial is available in samples\tutorials\102.InvokingProcesses\rmi
Locator locator = new Locator("default","bpel",props);
The reason why you get that "notFoundEx" is because you are not in the same rmi.context bel runs in.
Maybe you are looking for
-
Putting a CS4 Bridge gallery INTO an exsisting web page
Is it possible to put a web gallery created in CS4 Bridge into an exsisting web page created in Dreamweaver? I have a site with several pages and would like to have one of my pages display the gallery so that it all looks the same. I am sure it would
-
Pdf seems slow to redraw on ipad
Hi, I've developed a portfolio pdf that's portrait and for ipad viewing – approx 60 pages. I want to keep the res high so there's some zooming capability for when clients want to see the finer detail. Problem I am having is once saved out of Indesign
-
Hi, I have SAP BO 8.82 PL 08 and I cannot upload on BI Ondemand from Quey manager. What do I have to do to get an user and password to do this on https://bi.ondemand.com/session.
-
I have a document that is created by Pages in my mac. I want to send a copy by email as a PDF file. the problem is that only the first page of my document sends by email. But with my Ipad I dont have such a problem with that document.
-
Hi, i�ve got a JComboBox rendered into a JTable. This works fine but the ComboBox is much to big. I played around with setMaximumSize in several LayoutManagers. The problem is that at a certain size it cuts the JComboBox. What to do? thanks uri