...
Code Block | ||||
---|---|---|---|---|
| ||||
<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.0.x ... <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> --> <!-- 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> <jaxws:endpoint id="my_service_endpoint" implementor="#my-service" address="/MyIndex"> <jaxws:serviceFactory> <ref bean='jaxws-and-aegis-service-factory' /> </jaxws:serviceFactory> </jaxws:endpoint> |
...
XFire had/has a different convention for generating namespace URI values from Java package names. It added an additional '/' character.
If you need to 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: XFireCompatibilityServiceConfiguration (in 2.0.x, 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 linethe service configuration to the service factory
as follows:
Code Block | ||||
---|---|---|---|---|
| ||||
import org.apache.cxf.aegis.databinding.AegisServiceConfiguration; // for 2.0.x sf.getServiceFactory().getServiceConfigurations().add(0, new AegisServiceConfiguration()); // for 2.1 sf.getServiceFactory().getServiceConfigurations().add(0, new XFireCompatibilityServiceConfiguration()); |
This will the change the namespaces that CXF generates by default so that they are the same as XFire would generate.
...