camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William Tam" <email.w...@gmail.com>
Subject camel-cxf jaxws handler support
Date Sat, 15 Nov 2008 05:06:07 GMT
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

Mime
View raw message