You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by cogitate <mo...@gmail.com> on 2012/03/04 04:13:30 UTC

Message Observer on Local destination

Thanks Sergei,Willem for your inputs
[ RE:
http://cxf.547215.n5.nabble.com/re-CXF-with-Sprint-Integration-td5501007.html
]

What i did is created a message handler in spring-integration that receives
the message and tries to pass this to a cxf-jaxws endpoint in the
application context - like so: 
<jaxws:endpoint id="helloworld" 
                  implementor="#helloWorld" 
                  address="local://HelloWorld" />
where #helloworld refers to a bean implementing the SEI HelloWorld. 

i create my own namespace called "z2". this namespace allows me to create a
message handler for CXF type services. when i parse the text ( before
SpringContexts are loaded ) i also create a ClientProxyFactoryBean that is
bound to a spring-integration service-activator. 
<z2:inbound-gateway service-interface="com.svc.HelloWorld"
service-type="CXF"/>

CXF service is available as a local service using local conduit and when i
start the SI context, the service starts listening on the local endpoint as
"promised" by CXF. however, since the ClientProxyFactoryBean was created
before spring contexts loaded, i get the famous issue : 
"Local destination does not have a message observer on
address=local://HelloWorld" which means the LocalDestination and the
clientproxyfactorybean don't use the same CXF Bus. however, at the time of
creating the dynamic service-activator ( parsing the spring-context file ) i
don't have an applicationContext....and so catching the tiger by it's
tail... 

i also tried using SpringContextClientProxyFactoryBean which is an inner
static class of ClientProxyFactoryBeanDefinitionParser that itself is
ApplicationContextAware....( of course, the inner class extends
ClientProxyFactoryBean ..) and still get the same exception. 

any ideas of would be helpful here. 

thanks and regards, 
-cogitate 

--
View this message in context: http://cxf.547215.n5.nabble.com/Message-Observer-on-Local-destination-tp5534750p5534750.html
Sent from the cxf-user mailing list archive at Nabble.com.