MetaDesign Solutions Our Blogs

29Jul/100

JAX-WS Spring Integration

JAX-WS with Spring Tutorial :

JAX-WS web service can be easily integrated with spring and provide high interoperability. Spring provides remoting support for web services via JAX-WS .This Spring allows youconfigure various aspects such as the use of MTOM, handlers, custom transports, encoding.

Spring Context File :

<beans xmlns="http://www.springframework.org/schema/beans"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ws="http://jax-ws.dev.java.net/spring/core"

xmlns:wss="http://jax-ws.dev.java.net/spring/servlet"

xsi:schemaLocation="

http://www.springframework.org/schema/beans

http://www.springframework.org/schema/beans/spring-beans-2.5.xsd

http://jax-ws.dev.java.net/spring/core

http://jax-ws.dev.java.net/spring/core.xsd

http://jax-ws.dev.java.net/spring/servlet

http://jax-ws.dev.java.net/spring/servlet.xsd ">

<wss:binding url="/aa/xyz">

<wss:service>

<ws:service bean="beanName" />

</wss:service>

</wss:binding>

<bean id="beanName" class="com.prj.example.ServiceImpl" autowire="byName">

Web.xml Configration : Service class used for Spring integartion in web.

<servlet>

<servlet-name>service</servlet-name>

<servlet-class>com.sun.xml.ws.transport.http.servlet.WSSpringServlet</servlet-class>

<load-on-startup>1</load-on-startup>

</servlet>

 

Web Service Implementation Class :

 

@WebService(serviceName="service",targetNamespace="http://www.example.com/aa/xyz")

public class ServiceImpl implements IServiceImpl

{

@WebMethod

public Object myMethod(

{

}

}

 

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

No trackbacks yet.

Videos, Slideshows and Podcasts by Cincopa Wordpress Plugin