This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.


javax.xml.ws
interface WebServiceContext


public interface WebServiceContext

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 Summary
 EndpointReference
getEndpointReference(Class clazz, Element[] referenceParameters)

          Returns the EndpointReference associated with this endpoint.
 EndpointReference
getEndpointReference(Element[] referenceParameters)

          Returns the EndpointReference for this endpoint.
 MessageContext

          Returns the MessageContext for the request being served at the time this method is called.
 Principal

          Returns the Principal that identifies the sender of the request currently being serviced.
 boolean

          Returns a boolean indicating whether the authenticated user is included in the specified logical role.
 

Method Detail

getEndpointReference

public EndpointReference getEndpointReference(Class clazz,
                                              Element[] referenceParameters)
Returns the EndpointReference associated with this endpoint.

Parameters:
clazz - The type of EndpointReference that MUST be returned.
referenceParameters - Reference parameters to be associated with the returned EndpointReference instance.
Returns:
EndpointReference of type clazz of the endpoint associated with this WebServiceContext instance. If the returned EndpointReference is of type W3CEndpointReference then it MUST contain the the specified referenceParameters.

getEndpointReference

public EndpointReference getEndpointReference(Element[] referenceParameters)
Returns the EndpointReference for this endpoint.

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

Parameters:
referenceParameters - Reference parameters to be associated with the returned EndpointReference instance.
Returns:
EndpointReference of the endpoint associated with this WebServiceContext. If the returned EndpointReference is of type W3CEndpointReference then it MUST contain the the specified referenceParameters.

getMessageContext

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.

Returns:
MessageContext The message context.

getUserPrincipal

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.

Returns:
Principal The principal object.

isUserInRole

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.

Parameters:
role - A String specifying the name of the role
Returns:
a boolean indicating whether the sender of the request belongs to a given role


This documentation differs from the official API. Jadeite adds extra features to the API including: variable font sizes, constructions examples, placeholders for classes and methods, and auto-generated “See Also” links. Additionally it is missing some items found in standard Javadoc documentation, including: generics type information, “Deprecated” tags and comments, “See Also” links, along with other minor differences. Please send any questions or feedback to bam@cs.cmu.edu.
This page displays the Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
Copyright 2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
The official Sun™ documentation can be found here at http://java.sun.com/javase/6/docs/api/.