tags:

views:

76

answers:

1

Hi All,

Can you Explain in brief how JAX-WS works with Spring. I Know JAX-WS is using JAXB for un/marshaling but when it comes in picture in terms of flow. For e.g. lets say there is a service called entityEmployeeService (WebService). 1) UI makes a HTTP request for service entityEmployeeService, then what will happen technically and flow.

Note - Majorly i want to know where marshaling and unmarshaling done in the flow of request to entityEmployeeService.

Thanks Vinay

A: 

Spring has some ready-to-use classes to:

  1. Expose your services as JAX-WS WebServices (SimpleJaxWsServiceExporter)
  2. Create JAX-WS WebServices stubs (JaxWsPortProxyFactoryBean) to communicate to remote WebServices.

In both cases you need to to generate JAXB beans before you start using JAX-WS WebServices (unless the cases they are passed and return simple basic types). JAX-WS javax.xml.ws.Service is a entry point for you to look for implementation details. In two words: it creates JDK proxy, and for each interface method invocation it marshals the arguments via JAXB.

Also Spring-WS project has a support for JAXB marshallers/unmarshallers (not JAX-WS, as it is an alternative to JAX-WS), so you can have a look at it's source code.

dma_k