JAX-WS uses the SOAP 1.1 for the Web Services if the SOAP version is not explicitly defined (By Default). this is the default behavior. if you want to use SOAP 1.2 for your web service, then you may need to explicitly declare it in the web service. then following annotation can be used to explicitly define the SOAP version of the web service.
For SOAP 1.2
Sample Java Implementation
Thanks and Regards
Chathuranga Tennakoon
www.chathurangaonline.com
For SOAP 1.2
@BindingType(value = SOAPBinding.SOAP12HTTP_BINDING)
Sample Java Implementation
package com.chathurangaonline.sample.jaxws; import javax.jws.WebMethod; import javax.jws.WebService; import javax.xml.ws.BindingType; import javax.xml.ws.soap.SOAPBinding; /** * <p> * Service Implementation Bean (SIB) for CalculatorService endpoint interface * </p> */ @WebService @BindingType(value = SOAPBinding.SOAP12HTTP_BINDING) public class CalculatorServiceImpl implements CalculatorService{ @WebMethod public long add(long number1, long number2) { return number1+number2; } @WebMethod public long subtract(long number1, long number2) { return number1+number2; } @WebMethod public long multiply(long number1, long number2) { return number1*number2; } }Hope this will be helpful for you!
Thanks and Regards
Chathuranga Tennakoon
www.chathurangaonline.com
nice post
ReplyDeleteRPA Training in Bangalore
MEAN Stack Training in Bangalore
MERN StackTraining in Bangalore
Blue Prism Training in Bangalore
informatica Training in Bangalore
Azure DevOps training in Bangalore
Google Cloud Training in Bangalore
Android Training in Bangalore
Best Android Training Institute in Bangalore