Represents the execution context of the web service. Methods in this
interface can be used to access out-of-band data for communication with
other web service architectures and to manage conversations.
Syntax
public interface JwsContext extends Control
Package
weblogic.jws.control.JwsContext
Remarks
A JwsContext instance named context is
included by default in each web service you create with WebLogic Workshop.
Members
Methods
public
void finishConversation()
Marks the current conversation instance to be destroyed
after the currently executing method or event handler returns.
public
String getCallbackPassword()
Gets the password used for callbacks to the client in
the current conversation. The password may have been specified by the
client as part of the callbackLocation conversation
start SOAP header, or it may have been set by a call to JwsContext.setCallbackPassword().
public
String getCallbackURL()
Gets the URL that will be used for callbacks to the client
during the current conversation. The callback URL is specified by the
client in the callbackLocation conversation
start SOAP header or may be set by a call to JwsContext.setCallbackURL().
public
String getCallbackUsername()
Gets the username used for callbacks to the client in
the current conversation. The username may have been specified by the
client as part of the callbackLocation conversation
start SOAP header, or it may have been set by a call to JwsContext.setCallbackUsername().
public
java.security.Principal getCallerPrincipal()
Returns the security principal associated with the current
method invocation if authentication was performed.
public
long getCurrentAge()
Gets the current age (in seconds) of the conversation.
public
long getCurrentIdleTime()
Gets the number of seconds since the last client request
or the last call to JwsContext.resetIdleTime()
for the current conversation.
public
org.w3c.dom.Element[] getInputHeaders()
Returns the SOAP headers that arrived with the current
method invocation message.
public
Logger getLogger(String name)
Gets an instance of a Logger
class, which you can use to send messages from your code to a log file.
public
long getMaxAge()
Gets the duration (in seconds) of the current maximum
age for the conversation.
public
long getMaxIdleTime()
Gets the current value of the maximum idle time for the
conversation.
public
ServiceHandle getService()
Returns the weblogic.jws.ServiceHandle for this instance
of this web service. See ServiceHandle
Interface.
public
boolean getUnderstoodInputHeaders()
Returns the value most recently set by a call to JwsContext.setUnderstoodInputHeaders().
public
boolean isCallerInRole(String rolename)
Returns true if the authenticated principal is within
the specified security role.
public
boolean isFinished()
Determines whether or not this conversation instance has
had finish() called on it.
public
void resetIdleTime()
Resets the current idle timer associated with the current
conversation.
public
void setCallbackLocation(URL url)
Sets callback location. The
callback location is typically provided by the client in the callbackLocation
conversation start SOAP header, but may be set explicitly using this method.
The callback location must be set before attempting to send a callback
to the client.
public
void setCallbackLocation(String url)
Sets callback location. The
callback location is typically provided by the client in the callbackLocation
conversation start SOAP header, but may be set explicitly using this method.
The callback location must be set before attempting to send a callback
to the client.
public
void setCallbackPassword(String password)
Sets the password used for callbacks to the client in
the current conversation. Overrides the current password if it was specified
by the client as part of the callbackLocation
conversation start SOAP header.
public
void setCallbackUsername(String username)
Sets the username used for callbacks to the client in
the current conversation. Overrides the current username if it was specified
by the client as part of the callbackLocation
conversation start SOAP header.
public
void setMaxAge(java.util.Date date)
Sets a new maximum age for the conversation to an absolute
date.
public
void setMaxAge(String duration)
Sets a new maximum age for the conversation using the
duration string format.
public
void setMaxIdleTime(long seconds)
Sets the maximum amount of time (in seconds) that the
current conversation will idle before it expires.
public
void setMaxIdleTime(String duration)
Sets the maximum amount of time (in Duration string format)
that the current conversation will idle before it expires.
public
void setOutputHeaders(org.w3c.dom.Element[] headers)
Set the SOAP headers to be sent with outgoing messages
to the client.
public
void setUnderstoodInputHeaders(boolean understood)
Call with true if all incoming
SOAP headers were understood.
If any SOAP headers with mustUnderstand
set are present and setUnderstoodInputHeaders()
is not called with true, a SOAP fault will
be returned to the client.
Fields
None.
Callbacks
public
onException(Exception e, String methodName, Object[] args)
Received when a method marked as an operation throws an
uncaught exception.
public
onFinish(boolean expired)
Received when the current conversation is about to end.
Related Topics
Maintaining
State with Conversations