Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Clarify XFire compatibility

...

Code Block
xml
xml
 <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 
                 <property name="serviceConfigurations">
                     <list>
                       <bean class="org.apache.cxf.jaxws.support.JaxWsServiceConfiguration"/>
                       <bean class="org.apache.cxf.aegis.databinding.AegisServiceConfiguration"/>
                       <bean class="org.apache.cxf.service.factory.DefaultServiceConfiguration"/> 
                    </list>
                </property>
-->
 </bean>

 <jaxws:endpoint id="my_service_endpoint" implementor="#my-service" address="/MyIndex">
  <jaxws:serviceFactory>
   <ref bean='jaxws-and-aegis-service-factory' />
  </jaxws:serviceFactory>
 </jaxws:endpoint>
 

...

Code Block
java
java
import org.apache.cxf.aegis.databinding.AegisDatabinding;
import org.apache.cxf.frontend.ClientProxyFactoryBean;

ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
factory.setServiceClass(serviceClass);
factory.setAddress("http://myhost/service");
factory.getServiceFactory().setDataBinding(new AegisDatabinding());
MyService client = (MyService) factory.create();

XFire Compatibility

XFire had/has a different convention for generating namespace URI values from Java package names. It added an additional '/' character.
If you need to ensure that your service is backward compatibile with XFire, you'll want interoperate with XFire, you need to enable compatibility with this behavior. You enable this compatibility by adding
an additional service configuration class to your service configuration: AegisServiceConfiguration. (We plan to rename this for
clarity.) The spring example above shows the necessary configuration in a comment. For the client side in Java, you need to add one other line:

Code Block
java
java
import org.apache.cxf.aegis.databinding.AegisServiceConfiguration;

sf.getServiceFactory().getServiceConfigurations().add(0, new AegisServiceConfiguration());

...