Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Support both SOAP 1.1 and 1.2 by same JAX-WS service

I have a JAX-WS @WebServiceProvider and would like to support both SOAP 1.1 and 1.2 protocols. I handle creation of response SOAPMessage of proper version manually. I have WSDL describing bindings for both, 1.1 and 1.2 protocol. But the service endpoint is only able to support either version at a time.

I would appreciate either a solution or a pointer to a piece of doc where it's stated that it's impossible.

P.S. i'm using WebSphere 7 app server, which is bundled with JAX-WS 2.0 (which is Axis2 based)

like image 872
scorpp Avatar asked Nov 27 '12 18:11

scorpp


People also ask

What is JAX-WS how it is useful for describing SOAP Web services?

JAX-WS is a technology for building web services and clients that communicate using XML. JAX-WS allows developers to write message-oriented as well as RPC-oriented web services. In JAX-WS, a web service operation invocation is represented by an XML-based protocol such as SOAP.

How does JAX-WS work?

JAX-WS represents remote procedure calls or messages using XML-based protocols such as SOAP, but hides SOAP's innate complexity behind a Java-based API. Developers use this API to define methods, then code one or more classes to implement those methods and leave the communication details to the underlying JAX-WS API.


1 Answers

I experienced the same problem. The main issue for me is that it is not possible to compile the class with both @BindingType(value = SOAPBinding.SOAP12HTTP_BINDING) and @BindingType(value = SOAPBinding.SOAP11HTTP_BINDING). Have a look to this http://www-01.ibm.com/support/docview.wss?uid=swg1PK96819, and this http://www-01.ibm.com/support/docview.wss?uid=swg1PK83482, it should be possible to set @BindingType(SOAPBinding.SOAP_HTTP_BINDING) to have the both SOAP version to be delivered. Unfortunaltely, i did not compile also with the Websphere runtime environment, what i don't understand.

like image 135
bruno777 Avatar answered Oct 23 '22 13:10

bruno777