Invocation of flow services

Hi,

Currently, we invoke a flow service like this:

http request → perform something → call the flow service using
“Service.doInvoke(folder, service, flowMessage.getValue());”
This one works.

Now, we are trying to use activeMQ as JMS Provider, so the constellation would be like this:
JMS queue → perform something → call the flow service using
“Service.doInvoke(folder, service, flowMessage.getValue());”

However, the second one doesn’t work. I got a “java.lang.NullPointerException”. Please see my stack trace below.

Anybody have any idea what is going on? I suspect that the flow service needs some information from the HTTP session, and in my JMS case, i just bypass it (no http sessions at all).

Thanks,
Aries

java.lang.NullPointerException
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:
413)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:
369)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:246)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:113)
at com.wm.app.b2b.server.Service.doInvoke(Service.java:635)
at com.wm.app.b2b.server.Service.doInvoke(Service.java:560)
at com.bosch.eai.lego.connectors.ws.provider.xfire.XFireISFlowServiceInv
oker.invoke(XFireISFlowServiceInvoker.java:115)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.xfire.service.invoker.AbstractInvoker.invoke(AbstractInv
oker.java:59)
at org.codehaus.xfire.service.invoker.ObjectInvoker.invoke(ObjectInvoker
.java:45)
at org.codehaus.xfire.service.binding.ServiceInvocationHandler.sendMessa
ge(ServiceInvocationHandler.java:320)
at org.codehaus.xfire.service.binding.ServiceInvocationHandler$1.run(Ser
viceInvocationHandler.java:86)
at org.codehaus.xfire.service.binding.ServiceInvocationHandler.execute(S
erviceInvocationHandler.java:134)
at org.codehaus.xfire.service.binding.ServiceInvocationHandler.invoke(Se
rviceInvocationHandler.java:109)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.jav
a:131)
at org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoin
t.java:64)
at org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.
java:38)
at com.bosch.eai.lego.connectors.ws.provider.xfire.XFireWsProviderLego.h
andleSoapRequest(XFireWsProviderLego.java:492)
at com.bosch.eai.lego.connectors.ws.provider.xfire.XFireWsProviderLego.o
nMessage(XFireWsProviderLego.java:729)
at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageC
onsumer.java:967)
at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionE
xecutor.java:122)
at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionEx
ecutor.java:192)
at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.
java:122)
at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.ja
va:43)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:675)
at java.lang.Thread.run(Thread.java:595)

Can you check whether flow is reaching to the Flow service by putting something like savePipelineToFile in the flow sevice.

Hi ajaynaina,

Thanks for the reply…it is working now.
I can not use the Service.invoke just like that.
I need to craete a context first and then connect…then i can invoke it.

Thanks,
Aries