Save This Page
Home » xml-commons-external-1.4.01-src » javax » xml » ws » [javadoc | source]
javax.xml.ws
public interface: WebServiceContext [javadoc | source]

All Known Implementing Classes:
    WebServiceContext21

A WebServiceContext makes it possible for a web service endpoint implementation class to access message context and security information relative to a request being served. Typically a WebServiceContext is injected into an endpoint implementation class using the Resource annotation.
Method from javax.xml.ws.WebServiceContext Summary:
getEndpointReference,   getEndpointReference,   getMessageContext,   getUserPrincipal,   isUserInRole
Method from javax.xml.ws.WebServiceContext Detail:
 public EndpointReference getEndpointReference(Element referenceParameters)
    Returns the EndpointReference for this endpoint.

    If the Binding for this bindingProvider is either SOAP1.1/HTTP or SOAP1.2/HTTP, then a W3CEndpointReference MUST be returned.

 public T getEndpointReference(Class<T> clazz,
    Element referenceParameters)
    Returns the EndpointReference associated with this endpoint.
 public MessageContext getMessageContext()
    Returns the MessageContext for the request being served at the time this method is called. Only properties with APPLICATION scope will be visible to the application.
 public Principal getUserPrincipal()
    Returns the Principal that identifies the sender of the request currently being serviced. If the sender has not been authenticated, the method returns null.
 public boolean isUserInRole(String role)
    Returns a boolean indicating whether the authenticated user is included in the specified logical role. If the user has not been authenticated, the method returns false.