Bug 780432 (SOA-2865) - CXF: OneWay methods called through webservice producer throws exception when accessing to SOAPProcessor.getMessage()
Summary: CXF: OneWay methods called through webservice producer throws exception when ...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: SOA-2865
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: Documentation, JBossESB
Version: 5.1.0.ER8
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 5.2.0 GA
Assignee: Magesh Bojan
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-02 09:43 UTC by Jiri Pechanec
Modified: 2011-11-15 08:54 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-11-15 08:54:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBESB-3567 0 Major Closed Remove thread local use within SOAPProcessor 2015-12-14 12:36:42 UTC
Red Hat Issue Tracker SOA-2865 0 Blocker Closed CXF: OneWay methods called through webservice producer throws exception when accessing to SOAPProcessor.getMessage() 2015-12-14 12:36:42 UTC

Description Jiri Pechanec 2011-02-02 09:43:51 UTC
project_key: SOA

Try webservice_producer, message_02, and add a line to @OneWay method - System.out.println("ESB Message: " + SOAPProcessor.getMessage());

in server you will see the exception

10:37:05,422 WARNING [PhaseInterceptorChain] Application {http://webservice_producer/goodbyeworld}GoodbyeWorldWSService#{http://webservice_producer/goodbyeworld}sayGoodbyeWithoutResponse has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: ESB message not found!
	at org.jboss.wsf.stack.cxf.AbstractInvoker.createFault(AbstractInvoker.java:209)
	at org.jboss.wsf.stack.cxf.AbstractInvoker._invokeInternal(AbstractInvoker.java:174)
	at org.jboss.wsf.stack.cxf.AbstractInvoker.invoke(AbstractInvoker.java:104)
	at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
	at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
	at org.apache.cxf.phase.PhaseInterceptorChain.resume(PhaseInterceptorChain.java:218)
	at org.apache.cxf.interceptor.OneWayProcessorInterceptor$1.run(OneWayProcessorInterceptor.java:100)
	at org.apache.cxf.workqueue.AutomaticWorkQueueImpl$2.run(AutomaticWorkQueueImpl.java:253)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:636)
Caused by: java.lang.RuntimeException: ESB message not found!
	at org.jboss.soa.esb.actions.soap.SOAPProcessor.getMessage(SOAPProcessor.java:349)
	at org.jboss.soa.esb.samples.quickstart.webserviceproducer.webservice.GoodbyeWorldWS.sayGoodbyeWithoutResponse(GoodbyeWorldWS.java:41)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.jboss.wsf.container.jboss50.invocation.InvocationHandlerJSE.invoke(InvocationHandlerJSE.java:120)
	at org.jboss.wsf.stack.cxf.AbstractInvoker._invokeInternal(AbstractInvoker.java:154)
	... 14 more

the issue is not present with two way messages.

Comment 1 Kevin Conner 2011-02-02 14:09:34 UTC
The use of thread locals to pass ESB messages to invoked webservices is inherently broken and should be removed from the ESB codebase.

Any webservice stack is free to move one way invocations onto a separate thread, responding immediately on the original thread to the invoker.

This is what CXF has chosen to do in this instance.

Comment 2 Kevin Conner 2011-02-02 14:17:28 UTC
I have created JBESB-3567 to have this functionality removed but, for this release, I believe we should add something to the documentation to state that this is not supported as part of a one way invocation and that it will be removed in a future release.

Comment 3 Anne-Louise Tangring 2011-04-01 16:53:51 UTC
This needs to be marked Deprecated. Make sure it is properly documented. 

Comment 4 tcunning 2011-04-12 21:21:04 UTC
Link: Added: This issue relates to JBESB-3567


Comment 5 tcunning 2011-08-15 13:49:15 UTC
Magesh, if you've already made the changes here to documentation (I saw there were edits on the Programmer's Guide on the linked ESB issue) can you set this one to resolved?    Thanks.

Comment 6 Magesh Bojan 2011-08-23 12:48:12 UTC
Release Notes Text: Added: Documentation regarding the SOAPProcessor.getMessage has been removed as part of JBESB-3567.


Comment 7 David Le Sage 2011-09-02 05:46:05 UTC
Release Notes Docs Status: Added: Not Required
Writer: Added: dlesage


Comment 8 Martin Vecera 2011-11-15 08:54:14 UTC
Verified.


Note You need to log in before you can comment on or make changes to this bug.