Implementing SOAP 1.1 and 1.2 with JAX-WS web services

You can use Simple Object Access Protocol (SOAP) 1.1 and SOAP 1.2 with the JAX-WS (Java™ API for XML Web Services) endpoint handler to exchange messages in a WebSphere® Application Server Liberty environment.

About this task

In the Liberty environment, you can use one or both versions of SOAP as a transport protocol in the same web service instance.

Procedure

  1. In Liberty, in the servers.xml file, locate the <featureManager> element and ensure that its <feature> element is webProfile-8.0.
  2. In the file system, browse to install_home/maximo/applications/meaweb/webmodule/WEB-INF/web.xml and open the file with a text editor.
  3. Review the root element and ensure the version attribute that is used is 3.0 or later, but earlier than 4.x.
  4. Ensure that the servlet-class is psdi.iface.webservices.JAXWSWebServiceProvider and that the psdi.iface.webservices.WASJAXWSWebServiceProvider servlet class is commented out, because it is not used with Liberty. Save any changes.
  5. Ensure that all references to the WASJAXWSWebServiceProvider class are removed from files that are part of the meaweb WAR module.
  6. Browse to install_home/maximo/applications/meaweb/webmodule/WEB-INF/webservices.xml and open the file with a text editor. Take one of the following steps:
    Option Description
    To use SOAP 1.1

    In the <wsdl-file> element, specify wsprovider11.wsdl as the value and save the file.

    To use SOAP 1.2

    In the <wsdl-file> element, specify wsprovider12.wsdl as the value and save the file.

    To use both protocols in the same endpoint

    In the <wsdl-file> element, specify wsprovider12.wsdl as the value and save the file. Then, in the System Properties application, set the global value of the mxe.int.supportsbothsoapversion system property to 1.

  7. Rebuild and redeploy the .EAR and .WAR files.
  8. Add the endpoints for the web service handler.