1 Reply Latest reply on Sep 17, 2009 8:08 AM by asoldano

    how to force jbossws-cxf to use aegis binding? and provide c

    bryanx

      In version of Jboss4xx, I deployed stand alone CXF/Spring framework other than jbossws, and developed series of web services using aegis binding and providing XFire client compatibility(the xfire client is there, no one want to rewrite it), following intructions from Apache CXF homepage at:
      http://cwiki.apache.org/CXF20DOC/aegis-databinding.html

      The reason I was using aegis binding is my webmethods have complex DTO class as being in and out parameters, as you know by using aegis binding I do not have to annotate my DTO classes, if necessary, I could just add a seperate file named DTOname.aegis.xml to the same folder to let aegis knowing what my class contains or how I want to handle it, check aegis binding for details.

      my Spring/CXF definition xml will be look like:


      <beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:cxf="http://cxf.apache.org/core"
       xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:soap="http://cxf.apache.org/bindings/soap"
       xsi:schemaLocation= "http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
       http://cxf.apache.org/core
       http://cxf.apache.org/schemas/core.xsd
       http://cxf.apache.org/jaxws
       http://cxf.apache.org/schemas/jaxws.xsd
       http://cxf.apache.org/bindings/soap
       http://cxf.apache.org/schemas/configuration/soap.xsd">
      
      <import resource="classpath:META-INF/cxf/cxf.xml"/>
      <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/>
      <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
      <cxf:bus>
       <cxf:features>
       <cxf:logging/>
       </cxf:features>
      </cxf:bus>
      
       <bean id="aegisBean" class="org.apache.cxf.aegis.databinding.AegisDatabinding" scope="prototype"/>
       <bean id="jaxws-and-aegis-service-factory"
       class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean"
       scope="prototype">
       <property name="dataBinding" ref="aegisBean"/>
       <!--Use this property only for XFire compatibility ,this version for 2.1 -->
       <property name="serviceConfigurations">
       <list>
       <bean class="org.apache.cxf.jaxws.support.JaxWsServiceConfiguration"/>
       <bean class="org.apache.cxf.aegis.databinding.XFireCompatibilityServiceConfiguration"/>
       <bean class="org.apache.cxf.service.factory.DefaultServiceConfiguration"/>
       </list>
       </property>
       </bean>
      
       <!-- mysample hello, it takes complex DTOs as parameters -->
       <jaxws:endpoint id="mysampleWS" implementor="mycompany.ws.samples.ServiceImpl"
       address="/mysample/hello">
       <jaxws:serviceFactory>
       <ref bean='jaxws-and-aegis-service-factory'/>
       </jaxws:serviceFactory>
       </jaxws:endpoint>




      But now I can not make it running when upgrading to Jboss510GA and trying to use its integrated jbossws-cxf, I follow the setup ant script to update to jbossws-cxf-3.2.0.GA, I knew I am suppose to migrate to use jbossws-cxf.xml for configuration or using annotations to my pojo to expose Webservices, but I do not know how I should translate my upper CXF/Spring definition to jbossws-cxf.xml, or how I could annotate my pojo by telling jbossws to use aegis binding?

      still now by default it is using JAXBDataBinding and my services can not be deployed.


      Any one trying aegis bindings with jbossws-cxf?