com.sun.xml.ws.security.impl
Class WebServiceContextSecurityDelegate

java.lang.Object
  extended by com.sun.xml.ws.security.impl.WebServiceContextSecurityDelegate
All Implemented Interfaces:
WebServiceContextDelegate

public class WebServiceContextSecurityDelegate
extends Object
implements WebServiceContextDelegate


Constructor Summary
WebServiceContextSecurityDelegate(WebServiceContextDelegate delegate)
           
 
Method Summary
 String getEPRAddress(Packet arg0, WSEndpoint arg1)
          Gets the address of the endpoint.
 Principal getUserPrincipal(Packet packet)
          Implements WebServiceContext.getUserPrincipal() for the given packet.
 String getWSDLAddress(Packet arg0, WSEndpoint arg1)
          Gets the address of the primary WSDL.
 boolean isUserInRole(Packet arg0, String role)
          Implements WebServiceContext.isUserInRole(String) for the given packet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebServiceContextSecurityDelegate

public WebServiceContextSecurityDelegate(WebServiceContextDelegate delegate)
Method Detail

getUserPrincipal

public Principal getUserPrincipal(Packet packet)
Description copied from interface: WebServiceContextDelegate
Implements WebServiceContext.getUserPrincipal() for the given packet.

Specified by:
getUserPrincipal in interface WebServiceContextDelegate
Parameters:
packet - Always non-null. See class javadoc.
See Also:
WebServiceContext.getUserPrincipal()

isUserInRole

public boolean isUserInRole(Packet arg0,
                            String role)
Description copied from interface: WebServiceContextDelegate
Implements WebServiceContext.isUserInRole(String) for the given packet.

Specified by:
isUserInRole in interface WebServiceContextDelegate
Parameters:
arg0 - Always non-null. See class javadoc.
See Also:
WebServiceContext.isUserInRole(String)

getEPRAddress

public String getEPRAddress(Packet arg0,
                            WSEndpoint arg1)
Description copied from interface: WebServiceContextDelegate
Gets the address of the endpoint.

The "address" of endpoints is always affected by a particular client being served, hence it's up to transport to provide this information.

Specified by:
getEPRAddress in interface WebServiceContextDelegate
Parameters:
arg0 - Always non-null. See class javadoc.
arg1 - The endpoint whose address will be returned.
Returns:
Absolute URL of the endpoint. This shold be an address that the client can use to talk back to this same service later.
See Also:
WebServiceContext.getEndpointReference(org.w3c.dom.Element...)

getWSDLAddress

public String getWSDLAddress(Packet arg0,
                             WSEndpoint arg1)
Description copied from interface: WebServiceContextDelegate
Gets the address of the primary WSDL.

If a transport supports publishing of WSDL by itself (instead/in addition to MEX), then it should implement this method so that the rest of the JAX-WS RI can use that information. For example, HTTP transports often use the convention getEPRAddress()+"?wsdl" for publishing WSDL on HTTP.

Some transports may not have such WSDL publishing mechanism on its own. Those transports may choose to return null, indicating that WSDL is not published. If such transports are always used in conjunction with other transports that support WSDL publishing (such as SOAP/TCP used with Servlet transport), then such transport may choose to find the corresponding servlet endpoint by Module.getBoundEndpoints() and try to obtain the address from there.

This information is used to put a metadata reference inside an EPR, among other things. Clients that do not support MEX rely on this WSDL URL to retrieve metadata, it is desirable for transports to support this, but not mandatory.

This method will be never invoked if the WSEndpoint does not have a corresponding WSDL to begin with (IOW returning null.

Specified by:
getWSDLAddress in interface WebServiceContextDelegate
Parameters:
arg0 - Always non-null. See class javadoc.
arg1 - The endpoint whose address will be returned.
Returns:
null if the implementation does not support the notion of WSDL publishing.


Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.