BTW, I am in favor of #2 and to document that SEI must be an interface.
On Sat, Nov 15, 2008 at 12:06 AM, William Tam <[EMAIL PROTECTED]> wrote: > Hi all, > > Currently, users can insert jaxws handlers to endpoint by doing > something like this. > > <cxf:cxfEndpoint id="routerEndpoint" > address="http://localhost:8092/PersonService/" > serviceClass="org.apache.camel.wsdl_first.Person" > endpointName="person:soap" > serviceName="person:PersonService" > wsdlURL="person.wsdl" > xmlns:person="http://camel.apache.org/wsdl-first"> > > <cxf:handlers> > <ref bean="fromEndpointJaxwsHandler"/> > </cxf:handlers> > </cxf:cxfEndpoint> > > It only works on the CxfConsumer side but not on the CxfProducer side. > It is because CXF server and client factory bean are not exactly > "symmetrical". I can think of two approaches to fix it. > > 1) Mimic the Jaxws Handler stuff in CXF > (http://svn.apache.org/repos/asf/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/JaxWsProxyFactoryBean.java) > and add it to Camel's CxfClientFactoryBean > (https://svn.apache.org/repos/asf/activemq/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/invoker/CxfClientFactoryBean.java). > It could mean more maintenance work in Camel. > > 2) In CxfProducer, switching from using CXF's > ClientFactoryBean/JaxWsClientFactoryBean to > ClientProxyFactoryBean/JaxWsProxyFactoryBean. The latter seems to be > more frequently used inside CXF. The JaxWsProxyFactoryBean can build > the handler chain and does all the low level work. The only downside > that I see is, the SEI passed to the factory bean must be an interface > (cannot not be a class). > > Any thoughts? > > Thanks, > William >
