cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Ma <...@iona.com>
Subject Re: JaxWsServiceFactoryBean / Aegis
Date Wed, 11 Jul 2007 05:13:47 GMT
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.
>
>   

Mime
View raw message