My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members

I am using XFire Webservice Framework with Spring to create POJO based web services and clients. XFire provides a small Ant utility (http://xfire.codehaus.org/Client+and+Server+Stub+Generation+from+WSDL) to generate Stubs based on the WSDL file. XFire generates lot of classes during stub generation.

This project contains a single Factory Bean to eliminate direct usage of the additional classes generated by XFire during stub generation.

Spring Configuration to create Order Service Factory

<bean id="orderServiceFactory" class="com.dhaval.spring.xfire.XFireClientFactory">
    <property name="url" value="${order.service.url}"/>
    <property name="serviceClass" value="com.dhaval.test.order.OrderService"/>
    <property name="serviceClientClass" value="com.dhaval.test.order.OrderServiceClient"/>
     
    <!-- HTTP Basic Authentication -->
    <property name="userName" value="${order.service.username}"/>
    <property name="password" value="${order.service.password}"/>
</bean>

Using Order Service Factory

<bean id="orderServiceWrapper" class="com.dhaval.test.order.wrapper">
    <property name="orderSerivce" ref="orderServiceFactory"/>
</bean>
Powered by Google Project Hosting