Implementing extensions to JAX-WS Web services clients
WAS provides extensions to Web services clients using the Java API for XML-based Web Services (JAX-WS) model.
We can customize Web services by using the following extensions to the JAX-WS client model.
- Set the JAXWS_OUTBOUND_SOAP_HEADERS and JAXWS_INBOUND_SOAP_HEADERS properties on the request context of the Dispatch or Proxy object to enable a JAX-WS Web services client to send or retrieve implicit SOAP headers. An implicit SOAP header is a SOAP header not explicitly defined in the WSDL file. An implicit SOAP header file fits one of the following descriptions:
- A message part that is declared as a SOAP header in the binding in the WSDL file, but the message definition is not referenced by a portType within a WSDL file.
- An element not contained in the WSDL file.
Handlers and service endpoints can manipulate implicit or explicit SOAP headers using the SOAP with Attachments API for Java (SAAJ) data model.
See Sending implicit SOAP headers with JAX-WS or Receiving implicit SOAP headers with JAX-WS to learn how to modify the client code to send or retrieve transport headers.
- Set the REQUEST_TRANSPORT_PROPERTIES and RESPONSE_TRANSPORT_PROPERTIES properties to enable a Web services client to send or retrieve transport headers.
Set the properties on the BindingProvider instance.
By modifying your client code to send or retrieve transport headers, we can send or receive specific information within the transport headers of outgoing requests or incoming responses from the server. For requests or responses that use the HTTP transport, the information is sent or retrieved in an HTTP header. Similarly, for a request or response that uses the JMS transport, the information is sent or retrieved in a JMS message property.
See Sending transport headers with JAX-WS or Retrieving transport headers with JAX-WS to learn how to modify the client code to send or retrieve transport headers. See Transport header properties best practices to learn how to enable a Web services client to send or retrieve transport headers.
Example: Using JAX-WS properties to send and receive SOAP headers
Sending implicit SOAP headers with JAX-WS
Receiving implicit SOAP headers with JAX-WS
Transport header properties best practices
Sending transport headers with JAX-WS
Retrieving transport headers with JAX-WS
Related tasks
Implementing JAX-WS Web services clients
Related
Additional Application Programming Interfaces (APIs)
Web services specifications and APIs 
Related information
SOAP with Attachments API for Java interface