scorpp
scorpp

Reputation: 668

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)

Upvotes: 6

Views: 6049

Answers (2)

bruno777
bruno777

Reputation: 1896

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.

Upvotes: 1

ZachOfAllTrades
ZachOfAllTrades

Reputation: 1103

I recently dealt with a service deployment issue related to trying to simultaneously enable both SOAP 1.1 and 1.2 for a service (on WebSphere v7.0). Unfortunately, I don't think that your question gives enough information to provide a specific solution.

It IS possible to support both bindings at the same time, but there are some considerations. I think the main thing is that the server has to be able to listen on separate endpoints (URLs) for each binding. As near as I can tell, this requires appropriate entries in your web.xml and/or your webservices.xml configuraiton files.

For an annotation based service, these configuration entries are theoretically optional; but when you try to enable multiple bindings for a given service without the "optional" configuration entries, the WAS Axis2 extension fails with various possible exceptions.

If you could provide more detail about your wsdl, and the relevant portions of web.xml and webservices.xml (if any), as well as any error messages reported in the WAS log(s) during deployment and application startup, then I could probably give a better answer.

Upvotes: 0

Related Questions