com.sun.xml.ws.developer
Interface WSBindingProvider

All Superinterfaces:
javax.xml.ws.BindingProvider, Closeable
All Known Implementing Classes:
DataSourceDispatch, DispatchImpl, JAXBDispatch, MessageDispatch, RESTSourceDispatch, SEIStub, SOAPMessageDispatch, SOAPSourceDispatch, Stub

public interface WSBindingProvider
extends javax.xml.ws.BindingProvider, Closeable

BindingProvider with JAX-WS RI's extension methods.

Since:
2.1EA3

Field Summary
 
Fields inherited from interface javax.xml.ws.BindingProvider
ENDPOINT_ADDRESS_PROPERTY, PASSWORD_PROPERTY, SESSION_MAINTAIN_PROPERTY, SOAPACTION_URI_PROPERTY, SOAPACTION_USE_PROPERTY, USERNAME_PROPERTY
 
Method Summary
 List<Header> getInboundHeaders()
           
 void setAddress(String address)
          Sets the endpoint address for all the invocations that happen from BindingProvider.
 void setOutboundHeaders(Header... headers)
          Sets the out-bound headers to be added to messages sent from this BindingProvider.
 void setOutboundHeaders(List<Header> headers)
          Sets the out-bound headers to be added to messages sent from this BindingProvider.
 void setOutboundHeaders(Object... headers)
          Sets the out-bound headers to be added to messages sent from this BindingProvider.
 
Methods inherited from interface javax.xml.ws.BindingProvider
getBinding, getEndpointReference, getEndpointReference, getRequestContext, getResponseContext
 
Methods inherited from interface java.io.Closeable
close
 

Method Detail

setOutboundHeaders

void setOutboundHeaders(List<Header> headers)
Sets the out-bound headers to be added to messages sent from this BindingProvider.

Calling this method would discard any out-bound headers that were previously set.

A new Header object can be created by using one of the methods on Headers.

Parameters:
headers - The headers to be added to the future request messages. To clear the outbound headers, pass in either null or empty list.
Throws:
IllegalArgumentException - if the list contains null item.

setOutboundHeaders

void setOutboundHeaders(Header... headers)
Sets the out-bound headers to be added to messages sent from this BindingProvider.

Works like setOutboundHeaders(List) except that it accepts a var arg array.

Parameters:
headers - Can be null or empty.

setOutboundHeaders

void setOutboundHeaders(Object... headers)
Sets the out-bound headers to be added to messages sent from this BindingProvider.

Each object must be a JAXB-bound object that is understood by the JAXBContext object known by this WSBindingProvider (that is, if this is a Dispatch with JAXB, then JAXBContext given to Service.createDispatch(QName,JAXBContext,Mode) and if this is a typed proxy, then JAXBContext implicitly created by the JAX-WS RI.)

Parameters:
headers - Can be null or empty.
Throws:
UnsupportedOperationException - If this is a Dispatch that does not use JAXB.

getInboundHeaders

List<Header> getInboundHeaders()

setAddress

void setAddress(String address)
Sets the endpoint address for all the invocations that happen from BindingProvider. Instead of doing the following

((BindingProvider)proxy).getRequestContext().put( BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "...")

you could do this:

((WSBindingProvider)proxy).setAddress("...");

Parameters:
address - Address of the service