Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To configure your Server or Client to use the Aegis databinding, you'll need to configure your ServerFactoryBean and ClientFactoryBeans to use the Aegis databinding.

Spring Configuration

Code Block
xml
xml

 <bean id="aegisBean" class="org.apache.cxf.aegis.databinding.AegisDatabinding"/> 
 <bean id='jaxws-and-aegis-service-factory' class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean"> 
        <property name="dataBinding" ref="aegisBean"/>
                 <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>
 

Java configuration

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

ServerFactoryBean sf = new ServerFactoryBean();
sf.setServiceClass(serviceClass);
sf.setAddress("http://myhost/service");
sf.getServiceFactory().setDataBinding(new AegisDatabinding());
sf.create();

...