You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Lorenzo Bolzani <l....@gmail.com> on 2012/12/04 16:54:31 UTC
How to use QuartzEndpoint to invoke endpoints with result value
Hi,
I'm using the QuartzEndpoint to invoke a SU (cxf-se) that returns a value
(with servicemix 3.4.0).
The QuartzEndpoint always create an InOnly exchange and I keep getting this
exception
javax.jbi.messaging.MessagingException: Out not supported
at
org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setMessage(MessageExchangeImpl.java:361)
at
org.apache.cxf.transport.jbi.JBIDestinationOutputStream.commitOutputMessage(JBIDestinationOutputStream.java:131)
at
org.apache.cxf.transport.jbi.JBIDestinationOutputStream.doClose(JBIDestinationOutputStream.java:70)
at
org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:191)
at
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
at
org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:77)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at
org.apache.cxf.transport.jbi.JBIDispatcherUtil.dispatch(JBIDispatcherUtil.java:156)
at
org.apache.servicemix.cxfse.CxfSeEndpoint.process(CxfSeEndpoint.java:474)
Everything works fine but it's quite annoying to have all those "false"
exceptions in the log. Is there any simple way to avoid this exception?
I think adding an intermediate component could be an option or subclassing
the QuartzEndpoint to change the exchange creation or adding another void
method on the cxf SU, but all of these look like hacks.
I'm not interested in the return value so it's ok for it to be lost.
Thanks, bye
Lorenzo
Re: How to use QuartzEndpoint to invoke endpoints with result value
Posted by Freeman Fang <fr...@gmail.com>.
Hi,
IMO that's not ugly, to communicate between JBI endpoint, you must ensure the peer endpoints use same MEP(message exchange pattern), and IIRC servicemix-quartz only support InOnly MEP.
Moreover, JBI components is kinda deprecated, so I don't think the community will put much effort to enhance JBI features.
We suggest users to use camel component instead, it's more powerful and flexible.
Freeman
-------------
Freeman(Yue) Fang
Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: http://weibo.com/u/1473905042
On 2012-12-5, at 下午6:14, Lorenzo Bolzani wrote:
> 2012/12/5 Freeman Fang <fr...@gmail.com>
>
>> Hi,
>>
>> As you don't care about the return value, then add a oneway method in
>> cxf-se is the right way to go.
>>
>
> Hi,
> this is an option but is quite ugly: I have a few methods on a couple of
> webservices invoked through quartz. "Doubling" all those methods does not
> look like very nice, also considering that in this way the generated wsdl
> would be quite confusing.
>
> Do you think could be a good idea to file a RFE to have QuartzEndpoint to
> optionally create a InOut exchange?
>
>
> Thanks, bye
>
> Lorenzo
Re: How to use QuartzEndpoint to invoke endpoints with result value
Posted by Lorenzo Bolzani <l....@gmail.com>.
2012/12/5 Freeman Fang <fr...@gmail.com>
> Hi,
>
> As you don't care about the return value, then add a oneway method in
> cxf-se is the right way to go.
>
Hi,
this is an option but is quite ugly: I have a few methods on a couple of
webservices invoked through quartz. "Doubling" all those methods does not
look like very nice, also considering that in this way the generated wsdl
would be quite confusing.
Do you think could be a good idea to file a RFE to have QuartzEndpoint to
optionally create a InOut exchange?
Thanks, bye
Lorenzo
Re: How to use QuartzEndpoint to invoke endpoints with result value
Posted by Freeman Fang <fr...@gmail.com>.
Hi,
As you don't care about the return value, then add a oneway method in cxf-se is the right way to go.
Freeman
-------------
Freeman(Yue) Fang
Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://fusesource.com | http://www.redhat.com/
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: http://weibo.com/u/1473905042
On 2012-12-4, at 下午11:54, Lorenzo Bolzani wrote:
> Hi,
> I'm using the QuartzEndpoint to invoke a SU (cxf-se) that returns a value
> (with servicemix 3.4.0).
>
> The QuartzEndpoint always create an InOnly exchange and I keep getting this
> exception
>
> javax.jbi.messaging.MessagingException: Out not supported
> at
> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setMessage(MessageExchangeImpl.java:361)
> at
> org.apache.cxf.transport.jbi.JBIDestinationOutputStream.commitOutputMessage(JBIDestinationOutputStream.java:131)
> at
> org.apache.cxf.transport.jbi.JBIDestinationOutputStream.doClose(JBIDestinationOutputStream.java:70)
> at
> org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:191)
> at
> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
> at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
> at
> org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:77)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
> at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
> at
> org.apache.cxf.transport.jbi.JBIDispatcherUtil.dispatch(JBIDispatcherUtil.java:156)
> at
> org.apache.servicemix.cxfse.CxfSeEndpoint.process(CxfSeEndpoint.java:474)
>
>
> Everything works fine but it's quite annoying to have all those "false"
> exceptions in the log. Is there any simple way to avoid this exception?
>
> I think adding an intermediate component could be an option or subclassing
> the QuartzEndpoint to change the exchange creation or adding another void
> method on the cxf SU, but all of these look like hacks.
>
> I'm not interested in the return value so it's ok for it to be lost.
>
>
> Thanks, bye
>
>
> Lorenzo