Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calling BPEL from Java program

I have created a BPEL process that takes as input three integer variables. I need to test it with different parameters passed from a Java program. I am using openESB for all this.

My question is how to call BPEL from java code and how to pass the arguments and get the result back from the BPEL process?

like image 789
abbas Avatar asked Dec 04 '12 11:12

abbas


1 Answers

A BPEL process is normally deployed as a web service (generally SOAP) with an endpoint defined. Do you know the endpoint where it is accessible?

Once you have this endpoint, you can call it in java as a normal web service. (I would suggest starting by calling it from soapUI it will be easier if you just want to test the BPEL process)

As for the specificities related to openESB, I don't know. you should look on the documentation for the deployment specificities.

Edit after the answer.

So, you have an endpoint with a wsdl.

First thing, to test the process itself:

  1. install soapUI
  2. look at its doc
  3. you basically have to create a new project, it will ask for a wsdl,
  4. give yours it will create a sample request, fill it with data and
  5. execute. Until it returns with some data, you have a problem. try playing or ask some more questions

Now, if you need to build a java client.

  1. Google a bit "SOAP web service client"
  2. there are a few library around: axis2, Apache CXF...
  3. for example, with CXF, look here: http://cxf.apache.org/docs/how-do-i-develop-a-client.html it basically consists in generating some java code based on your wsdl using some tool and then writing a bit more code to actually call the service with the data you want

Since you were able to write a bpel process you should be able to deal with that. Again: google or ask question :)

again, I hope this helps.

like image 172
florent Avatar answered Sep 28 '22 03:09

florent