Calling BPEL from Java program
Asked Answered
I

1

7

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?

Icelandic answered 4/12, 2012 at 11:22 Comment(1)
Can't use the BPEL endpoint url and invoke it as a normal webservice?En
U
9

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.

Ungrateful answered 4/12, 2012 at 11:33 Comment(1)
If by endpoint you mean WSDL, yes I do have a corresponding .wsdl file to the BPEL. It would be great if you could point me to an article that would give me a start. While answering please keep in mind I am completely new to web services, and I am supposed to complete this task urgently. Thanks.Icelandic

© 2022 - 2024 — McMap. All rights reserved.