You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by mymacin <my...@yahoo.com> on 2011/08/23 14:28:41 UTC
Local Transport MessageObserver error
Hi,
When I try to use Local Transport instead of Http I am getting the below
exception.I have also included the endpoint configuration below.
My configurations:
Endpoint:
<jaxws:endpoint id="GreeterJmsWS" address="local://GreeterJms"
implementor="#GreeterJMS" />
Client:
<jaxws:client id="greeterJMSImplService" address="local://GreeterJms"
serviceClass="foo.service.GreeterJMS" />
Also included
<bean class="org.apache.cxf.transport.local.LocalTransportFactory"
lazy-init="false">
<property name="transportIds">
<list>
<value>http://cxf.apache.org/transports/local</value>
<value>http://schemas.xmlsoap.org/soap/http</value>
<value>http://schemas.xmlsoap.org/wsdl/soap/http</value>
</list>
</property>
</bean>
and included bus extension
<import resource="classpath:META-INF/cxf/cxf-extension-local.xml" />
Exception :
java.lang.IllegalStateException: Local destination does not have a
MessageObserver on address local://GreeterJms/
at
org.apache.cxf.transport.local.LocalConduit.dispatchViaPipe(LocalConduit.java:114)
at
org.apache.cxf.transport.local.LocalConduit.prepare(LocalConduit.java:59)
at
org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)
Thanks in advance.
Mymacin
--
View this message in context: http://cxf.547215.n5.nabble.com/Local-Transport-MessageObserver-error-tp4726603p4726603.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Local Transport MessageObserver error
Posted by mymacin <my...@yahoo.com>.
Thank you Daniel Kulp for your suggestion I will try these methods.
--
View this message in context: http://cxf.547215.n5.nabble.com/Local-Transport-MessageObserver-error-tp4726603p4730885.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Local Transport MessageObserver error
Posted by Daniel Kulp <dk...@apache.org>.
On Tuesday, August 23, 2011 8:13:40 AM mymacin wrote:
> Could you please tell me , Is there any other transport which supports in
> different spring contexts?
Not at this time, no. On option COULD be the coloc feature and some custom
code. I described much of it at:
http://cxf.547215.n5.nabble.com/Coloc-Tomcat-webapps-td3873140.html
The stuff about the classloaders probably doesn't apply in this case, but it
may work for you.
Another option, if you would like to work on it and submit a patch, would be
to update the LocalTransportFactory to allow the destinations Map to be
configured in and then you could somehow manage the map in a common place in
your code.
Another option that might be interesting is to add a field to
LocalTransportFactory like:
private static ConcurrentMap<String, Destination> staticDestinations
and if the address looks like "local://MyGreeter?static=true" or similar, the
destination would be added to the static map. The lookup of the conduit
would need to look in both places. The default would be to just put it in
the non-static map, but the uri param could be a good enhancement.
Dan
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/Local-Transport-MessageObserver-error-tp472
> 6603p4727129.html Sent from the cxf-user mailing list archive at Nabble.com.
--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com
Re: Local Transport MessageObserver error
Posted by mymacin <my...@yahoo.com>.
Could you please tell me , Is there any other transport which supports in
different spring contexts?
--
View this message in context: http://cxf.547215.n5.nabble.com/Local-Transport-MessageObserver-error-tp4726603p4727129.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Local Transport MessageObserver error
Posted by Willem Jiang <wi...@gmail.com>.
You should put the endpoint and client in the same application context.
The LocalTransport is attached to the bus, now your endpoint and client
are using different bus.
On 8/23/11 8:28 PM, mymacin wrote:
> Hi,
>
> When I try to use Local Transport instead of Http I am getting the below
> exception.I have also included the endpoint configuration below.
>
> My configurations:
>
> Endpoint:
>
> <jaxws:endpoint id="GreeterJmsWS" address="local://GreeterJms"
> implementor="#GreeterJMS" />
>
>
> Client:
>
> <jaxws:client id="greeterJMSImplService" address="local://GreeterJms"
> serviceClass="foo.service.GreeterJMS" />
>
>
> Also included
>
>
> <bean class="org.apache.cxf.transport.local.LocalTransportFactory"
> lazy-init="false">
> <property name="transportIds">
> <list>
> <value>http://cxf.apache.org/transports/local</value>
> <value>http://schemas.xmlsoap.org/soap/http</value>
> <value>http://schemas.xmlsoap.org/wsdl/soap/http</value>
> </list>
> </property>
> </bean>
>
> and included bus extension
>
> <import resource="classpath:META-INF/cxf/cxf-extension-local.xml" />
>
> Exception :
>
> java.lang.IllegalStateException: Local destination does not have a
> MessageObserver on address local://GreeterJms/
> at
> org.apache.cxf.transport.local.LocalConduit.dispatchViaPipe(LocalConduit.java:114)
> at
> org.apache.cxf.transport.local.LocalConduit.prepare(LocalConduit.java:59)
> at
> org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)
>
> Thanks in advance.
> Mymacin
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Local-Transport-MessageObserver-error-tp4726603p4726603.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang