Disabling Web Services Addressing support

The Web Services Addressing (WS-Addressing) support provides mechanisms to address web services and provide addressing information in messages. WS-Addressing support is disabled by default on clients. The method for disabling WS-Addressing support on servers depends on whether your application is based on JAX-RPC or JAX-WS.

About this task

You do not have to disable WS-Addressing support even if your application does not require it, because in most cases WS-Addressing support does not have a negative impact on the running of applications. For JAX-RPC applications, disabling WS-Addressing support can be risky as this action also disables support for other specifications such as Web Services Atomic Transactions.

Procedure

  • Disable WS-Addressing support for JAX-WS service providers using one of the following ways:
    • Use both the Addressing and SubmissionAddressing annotations in the service code, with the enabled parameter set to false; for example:
      import javax.xml.ws.soap.Addressing; 
      
      @Addressing(enabled=false) 
      @SubmissionAddressing(enabled=false) 
      @WebService(...)
    • Use the <webservice-description>/<port-component>/<addressing> deployment descriptor element in the deployment descriptor for the service application; for example:
      <port-component>
         <port-component-name>MyPort1</port-component-name>
         <addressing>
            <enabled>false</enabled>
         </addressing>
         <service-impl-bean>
            <servlet-link>MyPort1ImplBean</servlet-link>
         </service-impl-bean>
      </port-component>
  • You do not have to take any action to disable WS-Addressing support for JAX-WS clients, because WS-Addressing support is disabled by default. However, you can programmatically specify that WS-Addressing is disabled by using one of the following ways:
    • Use both the AddressingFeature and SubmissionAddressingFeature classes in the client code, with the enabled parameter set to false; for example:
      AddressingFeature feat = new AddressingFeature(false);
      SubmissionAddressingFeature feat = new AddressingFeature(false);
    • Use the Addressing annotation for an injected web services proxy reference; for example:
      public class MyClientApplication {
         // Disable Addressing for a port-component-ref resource injection.
         @Addressing(enabled=false)
         @WebServiceRef(MyService.class)
         private MyPortType myPort;
         ...
       }
    • Use the <service>/<port-component>/<addressing> deployment descriptor; for example:
      <service-ref>
         <service-ref-name>service/MyPortComponentRef</service-ref-name>
         <service-interface>com.example.MyService</service-ref-interface>
         <port-component-ref>
            <service-endpoint-interface>com.example.MyPortType</service-endpoint-interface>
            <addressing>
               <enabled>false</enabled>
            </addressing>
         </port-component-ref>
      </service-ref>
  • To disable WS-Addressing support for JAX-RPC service providers or clients, set the com.ibm.ws.wsaddressingAndDependentsDisabled system property to true.
    For example:
    java -Dcom.ibm.ws.wsaddressingAndDependentsDisabled=true ... application_name
    Attention: Use this property with care because applications might require WS-Addressing message addressing properties to function correctly. Setting this property also disables support for the following specifications, which depend on the WS-Addressing support: Web Services Atomic Transactions, Web Services Business Agreement, Web Services Notification and Web Services Reliable Messaging.

Results

By completing this task, you disabled the WS-Addressing support. Disabling WS-Addressing on clients prevents WebSphere® Application Server sending WS-Addressing message addressing properties in the SOAP header of outbound web service messages. Disabling WS-Addressing on servers additionally prevents WebSphere Application Server processing WS-Addressing MAPs in incoming SOAP headers.