Hi Jan,

Did you test  ReflectionServiceFactoryBean  with Aegis ? Is it working ?

<bean id="serviceFactory" 
class="org.apache.cxf.service.factory.ReflectionServiceFactoryBean">
    <property name="dataBinding" ref="aegisDatabinding"/>
</bean>

I think you can use ClientProxyFactoryBean to invoke service used AegisDatabinding :

       ClientProxyFactoryBean proxyFactory = new ClientProxyFactoryBean();
       ClientFactoryBean clientBean = proxyFactory.getClientFactoryBean();
       clientBean.setAddress("http://localhost:8088/Hello";);
       clientBean.setBus(CXFBusFactory.getDefaultBus());
       clientBean.setTransportId("http://schemas.xmlsoap.org/wsdl/http/";);
       clientBean.setServiceClass(BookService.class);
proxyFactory.getServiceFactory().setDataBinding(new AegisDatabinding());
       BookService client = (BookService) proxyFactory.create();
       client.getBook("isbn")

Cheers

Jim


Jan Kriesten wrote:
Hi Jim,

did some tests again.

There really seems to be an issue with JaxWsServiceFactoryBean and Aegis.

Based on your suggestion, I tried the following (CXFServlet):

---8<---
  <bean id="serviceClass" 
class="de.footprint.www.services.auth.AcegiAuthService"/>
  <bean id="aegisDatabinding"
class="org.apache.cxf.aegis.databinding.AegisDatabinding"/>
  <bean id="serviceFactory"
class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
  <property name="dataBinding" ref="aegisDatabinding"/>
  </bean>
  <bean id="serverBeanFactory" class="org.apache.cxf.frontend.ServerFactoryBean"
init-method="create">
          <property name="address" value="/AuthService"/>
          <property name="bindingId" value="http://schemas.xmlsoap.org/soap/"/>
          <property name="serviceBean" ref="serviceClass"/>
          <property name="serviceFactory" ref="serviceFactory"/>
  </bean>
---8<---

This did _not_ work. The services-log tells me, that the WebService-Parameters
are blank (btw, only Strings are used). Commenting out the dataBinding-property
in the serviceFactory-bean solves it again - all parameters are ok!

My client looks like this:

---8<---
Bus bus = new SpringBusFactory().createBus();
AegisDatabinding aegisBinding = new AegisDatabinding();
JaxWsProxyFactoryBean proxyBean = new JaxWsProxyFactoryBean();
proxyBean.setBus( bus );
proxyBean.getServiceFactory().setDataBinding( aegisBinding );
proxyBean.setAddress( "http://wicket.silberlicht.de/service/AuthService"; );
proxyBean.setServiceClass( IAuthService.class );
service = (IAuthService) proxyBean.create();
---8<---


Best regards, --- Jan.

Reply via email to