-
1. Re: Invoking webservice from action
salaboy21 May 8, 2008 11:20 AM (in response to jagr)I think this is a very easy task..
you only need to use/call your generated clients inside the action code...
for example:public class MyActionHandler implements ActionHandler{ public void execute(){ WebServiceCliente.webServiceMethod(); } }
Sounds to me that i don't understand your question.. let me know.. -
2. Re: Invoking webservice from action
kukeltje May 8, 2008 4:07 PM (in response to jagr)Salaboy is correct. That would have been my answer to.
-
3. Re: Invoking webservice from action
jagr May 9, 2008 2:45 AM (in response to jagr)Ok. That it's correct, but how can I call this webservice client if my websercive client it's on another project out of jbpm project.
Should I import entire webserviceclient project into jbpm project?
I'm using eclipse 3.0.3, jbpm 3.2.2 and webservice client it's generated with axis2 and it's project standalone.
Maybe there are easy way to create webservice client into jbpm project?
I'm confused
Thanks -
4. Re: Invoking webservice from action
kukeltje May 9, 2008 4:54 AM (in response to jagr)but how can I call this webservice client if my websercive client it's on another project out of jbpm project.
how would you normally invoke remote services? via ejb's? webservices? rest? Again, nothing different than normal java -
5. Re: Invoking webservice from action
salaboy21 May 9, 2008 7:02 AM (in response to jagr)Yeah! get your hands dirty! I suggest to 3 steps
If you have 2 projects then do this...
Generate the client and test it ..
then copy the client class into the jbpm project (add all needed libraries and refactor the packages names if needed)
Then call the web services inside an ActionHandler exactly in the same way that you do it on the test..
Hope it helps -
6. Re: Invoking webservice from action
jagr May 13, 2008 3:46 AM (in response to jagr)Ok.
My problem was solved.
I generated .class webservice client with jax-ws and I tested it in a simple java project.
I've included .class into .class folder in jbpm project and I use clases into action.
Works fine.
thanks salaboy and kukeltje -
7. Re: Invoking webservice from action
salaboy21 May 13, 2008 8:58 AM (in response to jagr)thats sounds good .. but you must include the source code in your second project.. or make a jar with all .class files that you need and the include it in the bpm project...!
-
8. Re: Invoking webservice from action
jagr May 19, 2008 10:53 AM (in response to jagr)Why sometimes when I execute process and enter in node that invoke webservice Exception is thrown because don't find the class?
ava.lang.NoClassDefFoundError: com/aixtelecom/portbooker/UpdatePrice_Service at com.aixtelecom.portbooker.bpm.actions.Node1Action.execute(Node1Action.java:32) at org.jbpm.graph.def.Action.execute(Action.java:122) at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:264) at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:220) at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:190) at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:174) at org.jbpm.graph.def.Node.enter(Node.java:303) at org.jbpm.graph.def.Node$$FastClassByCGLIB$$d187eeda.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:163) at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$ef5f66fa.enter(<generated>) at org.jbpm.graph.def.Transition.take(Transition.java:151) at org.jbpm.graph.def.Node.leave(Node.java:394) at org.jbpm.graph.node.StartState.leave(StartState.java:70)
Jax-ws only generate .class from webservice.
I add these .class into folder and in eclipse I specify in build path project, Add class folder and I select folder that contains .class generated.
Into action of jbpm, I can use this generated classes and invoke web service, but now, when I execute the process and enter into node that invoke ws, exception java.lang.NoClassDefFoundError is thrown but I don't know why. -
9. Re: Invoking webservice from action
salaboy21 May 19, 2008 11:54 AM (in response to jagr)like i said before..
add the source classes and then compile it all together...
make sure that you can import the classes in your action handler...
Hope it helps -
10. Re: Invoking webservice from action
jagr May 19, 2008 1:55 PM (in response to jagr)The problem is that jax-ws only generate .class :/ but if I create a simple java project with main class and execute as java aplication runs ok but in jbpm thrown the exception NoClassDefFoundError