XFire + Spring make webservices very easy. You basically expose selected methods as a webservice. Here is the example for the xfire servlet:
Code:
<beans>
<bean id="handlerMapping"
class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="urlMap">
<map>
<entry key="/InvoicePrintNotificationService">
<ref bean="invoicePrintNotificationServiceExporter"/>
</entry>
</map>
</property>
</bean>
<bean name="invoicePrintNotificationServiceExporter"
class="org.codehaus.xfire.spring.XFireExporter">
<property name="service">
<ref bean="invoicePrintNotificationService"/>
</property>
<property name="serviceInterface">
<value>com.bop.aeos.services.InvoicePrintNotificationService</value>
</property>
<property name="serviceFactory">
<ref bean="xfire.serviceFactory"/>
</property>
<property name="xfire">
<ref bean="xfire"/>
</property>
</bean>
<bean id="invoicePrintNotificationService"
class="com.bop.aeos.services.InvoicePrintNotificationServiceImpl">
<property name="invoiceDao">
<ref bean="invoiceDao"/>
</property>
</bean>
</beans>