This content has been marked as final.
Show 4 replies
-
1. Re: How can I invoke web services using jBoss jBpm?
kukeltje Oct 12, 2005 3:25 PM (in response to bonfarj)Currently you can't do this directly from a jBPM actionhandler (work is going on in one) so you have to write an actionhandler yourself which invokes the webservice. You can make this configurable any way you want.
-
2. Re: How can I invoke web services using jBoss jBpm?
bonfarj Oct 16, 2005 4:50 PM (in response to bonfarj)Cool, I'm happy to know that jBpm will permit web services invoking in future!
But now, there's any example of an ActionHandler that invokes a web services? I don't know how to do this.
thanks my friends! -
3. Re: How can I invoke web services using jBoss jBpm?
brianmb99 Oct 16, 2005 5:23 PM (in response to bonfarj)"bonfarj" wrote:
But now, there's any example of an ActionHandler that invokes a web services? I don't know how to do this.
As Ronald pointed out, you'll have to write your own code to call a ws at this point. The eclipse WTP project provides tools for creating java webservice clients, and Apache's Axis project provides (among other things) a client framework for making ws calls. There are many other options available, too. Here's an Axis example:import org.apache.axis.client.Call; import org.apache.axis.client.Service; import javax.xml.namespace.QName; import org.jbpm.graph.def.ActionHandler; public class MyActionHandler extends ActionHandler { public void execute(ExecutionContext executionContext) throws Exception { try { String endpoint = "http://nagoya.apache.org:5049/axis/services/echo"; Service service = new Service(); Call call = (Call) service.createCall(); call.setTargetEndpointAddress( new java.net.URL(endpoint) ); call.setOperationName(new QName("http://soapinterop.org/", "echoString") ); // Call to addParameter/setReturnType as described in user-guide.html //call.addParameter("testParam", // org.apache.axis.Constants.XSD_STRING, // javax.xml.rpc.ParameterMode.IN); //call.setReturnType(org.apache.axis.Constants.XSD_STRING); String ret = (String) call.invoke( new Object[] { "Hello!" } ); System.out.println("Sent 'Hello!', got '" + ret + "'"); } catch (Exception e) { System.err.println(e.toString()); } } }
The axis code here is right from the axis user guide page at http://ws.apache.org/axis/java/user-guide.html.
Hope that helps.
Brian -
4. Re: How can I invoke web services using jBoss jBpm?
bonfarj Oct 20, 2005 4:18 PM (in response to bonfarj)I got it!, thank you Brian!
;- )