Oracle9i Supplied Java Packages Reference Release 2 (9.2) Part Number A96609-01 |
|
This chapter documents package oracle.soap.server. This package contains the classes that provide support for Oracle SOAP in the XDK for Java.
Oracle SOAP is an implementation of the Simple Object Access Protocol. Oracle SOAP is based on the SOAP open source implementation developed by the Apache Software Foundation.
This chapter contains these sections:
The Simple Object Access Protocol (SOAP) is a transport protocol for sending and receiving requests and responses across the Internet. It is based on XML and HTTP.
SOAP is transport protocol-independent and operating system-independent. It provides the standard XML message format for all applications. SOAP uses the XML Schema standard of the World Wide Web Consortium (W3C).
Package oracle.soap.server contains the interfaces and classes that implement the API for SOAP administrative clients and the provider implementation for Java classes. These include the Service Manager and the Provider Manager. These administrative clients are services that support dynamic deployment of new services and new providers.
See Also:
For background information about SOAP, refer to these Web sites. For information about developing applications with Oracle SOAP, refer to Oracle9i XML Developer's Kits Guide - XDK |
Interface oracle.soap.server.Handler
public interface Handler
Handler
defines the interface for a pluggable handler in the SOAP server. This class does not imply any policies about when the handler in invoked.
A handler implementation must:
public static final int REQUEST_TYPE
Handler invocation is part of request chain.
public static final int RESPONSE_TYPE
Handler invocation is part of response chain.
public static final int ERROR_TYPE
Handler invocation is part of error chain.
public abstract void init(SOAPServerContext ssc) throws SOAPException
One-time handler initialization. This method will be invoked by the SOAP server exactly once before the server makes any invocations on the handler, allowing the handler to set up any global state. It uses any options that were set previously via setOptions.
ssc
- The SOAP server context, which contains the logger for informational messages.
SOAPException
if unable to initialize the handler.
public abstract void setOptions(Properties options)
Set the options for the handler for subsequent use by init. This method must be called before init.
options - Options that are specific to the handler implementation.
public abstract Properties getOptions()
Get this handler's options.
Options that are specific to the handler implementation.
public abstract void setName(String name)
Set the name of the handler. This method must be called before init.
name - The name of the handler instance.
public abstract String getName()
Get this handler's name.
The name of the handler instance.
public abstract void destroy() throws SOAPException
One-time handler cleanup. This method will be invoked by the SOAP server exactly once before the server shuts down. This gives the handler the opportunity to do cleanup of global state.
SOAPException if unable to destroy.
public abstract void invoke(int chainType, RequestContext requestContext) throws SOAPException
Invoke the requested handler as part of the specified chain type. Note that execution of a chain of request handlers or response handlers will terminate immediately if any handler throws a SOAPException
. In contrast, all handlers in an error chain will be invoked, regardless of whether or not any handler throws an exception. In the case of an exception in an error handler, the exception is logged and discarded.
chainType
- as follows:
Handler.REQUEST_TYPE
if the handler is being invoked as part of a request chain (i.e., before the service is invoked);Handler.RESPONSE_TYPE
if the handler is being invoked as part of a response chain (i.e., after the service has been invoked);Handler.ERROR_TYPE
if the handler is being invoked as part of an error chain (i.e., in case of an error during any one of request chain, service invocation, or response chain).requestContext
- The relevant request context.
SOAPException
if handler invocation failed.
Interface oracle.soap.server.Provider
public interface Provider
Provider defines the capabilities that must be supported for each type of service provider, such as Java class or stored procedure. Providers are responsible for service authorization, and parameter unmarshalling/marshalling.
Providers, aka provider instances, must be deployed to the SOAP handler. Each provider deployment must define the provider name, Java classname that implements the provider (which must be an implementation of this interface), and any number of provider-specific key-value pairs. Given the provider deployment information, the SOAP handler will interact with the providers solely through this interface.
The SOAP handler will create one instance for each deployed provider instance. It is possible to have one or more instances of each provider implementation (which is not to say that is necessarily recommended). In any event, each instance of a provider must be able to handle requests concurrently.
A provider implementation must:
public abstract void init(ProviderDeploymentDescriptor pd, SOAPServerContext ssc) throws SOAPException
One-time provider instance initialization. This method will be invoked by the SOAP handler exactly once before the handler makes any requests to services supported by the provider, allowing the provider to set up any provider-global context.
pd
- The provider descriptor which contains the provider deployment information.
ssc
- The SOAP server context, which contains the logger for informational messages.
SOAPException
if unable to initialize and therefore unable to provide services.
public abstract void destroy() throws SOAPException
One-time provider instance cleanup. This method will be invoked by the SOAP handler exactly once before the handler shuts down. This gives the provider the opportunity to do cleanup of provider-global state.
SOAPException if unable to destroy.
init
public abstract String getId()
Get this provider's unique name.
This providers name, which is unique within the SOAP handler.
public abstract void invoke(RequestContext requestContext) throws SOAPException
Invoke the requested method in the specified service, where the SOAP request is completely described in the request context.
requestContext
- The RequestContext that contains everything the provider needs to process the request.
SOAPException
if error during method invocation for any number of reasons, including user does not have permission, method does not exist.
Interface oracle.soap.server.ProviderManager public interface ProviderManager
Provider Manager defines the interface to manage providers. The provider manager is used by the SOAP engine to deploy providers, undeploy providers, and access provider deployment information. The provider manager may cache deployment information and is responsible to maintain the cache.
The HTTP server provides security for the provider manager. The provider manager can be configured with a URL that requests must be made to in order for the request to be accepted. If a SOAP request for the provider manager is made to any other URL, the request will be rejected. This URL should be an alias to the SOAP servlet, and HTTP security can be set to control which users can post to the URL.
public abstract void init(Properties options) throws SOAPException
Initialize the provider manager.
options
- The options required to setup access to the deployment information.
SOAPException if unable to access the deployment information.
public abstract void destroy() throws SOAPException
Cleanup the provider manager.
SOAPException if unable to cleanup the provider manager.
public abstract void setServiceManager(ServiceManager serviceManager)
Make the service manager that is being used to manage service deployment information available to the provider manager. The provider manager may use the service manager to ensure that a provider is not undeployed as long as any services are deployed under that provider.
providerManager
- The provider manager that is managing provider deployment information for the SOAP server.
public abstract String getRequiredRequestURI()
Get the URI that provider manager requests must be made to in order to be accepted. Requests made to any other URI must be rejected.
The request URI for provider manager requests, or null if any URI can be used.
public abstract ProviderDeploymentDescriptor undeploy(String providerId) throws SOAPException
Undeploy the given provider, and return its descriptor.
providerId
- The id of the provider to undeploy.
The descriptor containing the deployment information for the provider that has been undeployed.
SOAPException
if the provider is not found or failed to undeploy.
public abstract void deploy(ProviderDeploymentDescriptor pd) throws SOAPException
Deploy the given provider.
pd
- The provider descriptor for the provider to deploy.
SOAPException if unable to deploy.
public abstract ProviderDeploymentDescriptor query(String providerId) throws SOAPException
Get the deployment descriptor for the given provider.
providerId
- The id of the provider.
The descriptor containing the deployment information for the given provider.
SOAPException
if the provider is not found.
public abstract String[] list() throws SOAPException
Get a list of provider ids for all providers that have been deployed.
An array of deployed provider ids.
SOAPException
if unable to list provider ids.
Interface oracle.soap.server.ServiceManager public interface ServiceManager
Service Manager defines the interface to manage services. The Service Manager is used by the SOAP engine to deploy services, undeploy services, and to access service deployment information. The Service Manager may cache deployment information and is responsible for maintaining the cache.
The HTTP server provides security for the service manager. The service manager can be configured with a URL that requests must be made to in order for the request to be accepted. If a SOAP request for the service manager is made to any other URL, the request will be rejected. This URL should be an alias to the SOAP servlet, and HTTP security can be set to control which users can post to the specified URL.
public abstract void init(Properties options, ProviderManager providerManager) throws SOAPException
Initialize the service manager. The implementation should be able to handle a null value for the provider manager.
options
- The options required to setup access to the service deployment information.
providerManager
- The provider manager that is managing provider deployment information for the SOAP server, or null if the provider manager is not supplied. The service manager may want to use the provider manager to confirm the existence of the provider when a new service is deployed.
SOAPException if unable to access the service deployment information.
public abstract void destroy() throws SOAPException
Cleanup the service manager.
SOAPException if unable to cleanup the service manager.
public abstract String getRequiredRequestURI()
Get the URI that service manager requests must be made to in order to be accepted. Requests made to any other URI must be rejected.
The request URI for service manager requests, or null if any URI can be used.
public abstract ServiceDeploymentDescriptor undeploy(String serviceId) throws SOAPException
Undeploy the given service, and return its descriptor.
serviceId
- The URI of the service to undeploy.
The descriptor containing the deployment information for the service that has been undeployed.
SOAPException
if the service is not found or failed to undeploy.
deploy
public abstract void deploy(ServiceDeploymentDescriptor sd) throws SOAPException
Deploy the given service.
sd
- The service descriptor for the service to deploy.
SOAPException
if unable to deploy.
public abstract ServiceDeploymentDescriptor query(String serviceId) throws SOAPException
Get the deployment descriptor for the given service.
serviceId
- The unique URI of the service.
The descriptor containing the deployment information for the given service.
SOAPException
if the service is not found.
public abstract String[] list() throws SOAPException
Get a list of service ids for all services that have been deployed, regardless of the provider.
An array of deployed service ids.
SOAPException
if unable to list service ids.
Class oracle.soap.server.ContainerContext
java.lang.Object | +----oracle.soap.server.ContainerContext public class ContainerContext extends Object
ContainerContext defines the context of the container in which the SOAP server is running. The actual content depends on the environment in which the server is running, such as in a servlet engine. This class should contain only container-specific content.
public static final String SERVLET_CONTAINER
The value for a servlet container type.
public ContainerContext()
public void setContainerType(String containerType)
Set the container type.
containerType
- The type of container in which the SOAP server is running.
public String getContainerType()
Returns the container type.
The type of container in which the SOAP server is running.
public HttpServlet getHttpServlet()
Returns the HTTP servlet if the container type is SERVLET_CONTAINER.
The HttpServlet that is processing the SOAP request, or null if the servlet attribute is not set.
public void setHttpServlet(HttpServlet servlet)
Set the HTTP servlet for a SOAP server running in a SERVLET_CONTAINER type of container.
servlet
- The HttpServlet that is processing the SOAP request.
public Object getAttribute(String name)
Returns the attribute with the given name, or null if there is no attribute by that name.
name
- A String specifying the name of the attribute.
An Object containing the value of the attribute, or null if no attribute exists matching the given name.
getAttributeNames
public Enumeration getAttributeNames()
Returns an Enumeration containing the attribute names available within this SOAP context.
An Enumeration of attribute names.
getAttribute
public void setAttribute(String name, Object object)
Binds an object to a given attribute name in this SOAP context. If the name specified is already used for an attribute, this method will remove the old attribute and bind the name to the new attribute. Neither the name nor the object may be null.
Parameters
name
- A non-null String specifying the name of the attribute.
object
- An non-null Object representing the attribute to be bound.
public void removeAttribute(String name)
Removes the attribute with the given name from the context. After removal, subsequent calls to getAttribute(java.lang.String) to retrieve the attribute's value will return null.
name
- A String specifying the name of the attribute to be removed.
object
- An Object representing the attribute to be bound.
Class oracle.soap.server.Logger
java.lang.Object | +----oracle.soap.server.Logger public abstract class Logger extends Object
Logger defines the capabilities that must be supported by a logger implementation. The logger is used to persistently record error and informational messages.
Each log request specifies the severity, and the information should be logged iff the severity is at least as high as the specified severity.
The order of severity in increasing order is:
For example, if the severity is set to SEVERITY_STATUS
, any log request with severity of either SEVERITY_STATUS
or SEVERITY_ERROR
will be logged.
public static final int SEVERITY_ERROR
public static final int SEVERITY_STATUS
public static final int SEVERITY_DEBUG
protected static final int SEVERITY_INVALID
public static String SEVERITY_NAMES[]
public static final int DEFAULT_SEVERITY
public static final String OPTION_SEVERITY
Configuration option that specifies the severity for the logger.
protected int m_severity
The logger's severity setting.
public Logger()
protected final int getSeverityValue(String severityName)
Get the severity value associated with the given severity name.
severityName
- The name of the serverity level (e.g., error).
The severity (SEVERITY_xxx
).
protected final String getSeverityName(int severity)
Get the severity name associated with the given severity.
severity
- The severity level (SEVERITY_xxx
).
The severity name.
public abstract void init(Properties options, ContainerContext context) throws SOAPException
One-time initialization of the logger with its configuration parameters.
options
- The configuration options for the logger.
context
- The context of the container in which the SOAP server is running, which includes information that may be used by the logger.
SOAPException
if unable to initialize the logger.
public int getSeverity()
Get the current severity.
The current severity setting for the logger.
public void setSeverity(int severity)
Set the current severity.
severity
- The new severity setting for the logger.
public boolean isLoggable(int severity)
Determine if a message would be logged at the given severity level.
severity
- The severity level to check.
True
if a message would be logged at the given severity level, else false.
public abstract void log(String msg, int severity)
Log the given message at the given severity.
msg
- The message to log.
severity
- The severity at which to log the information.
public abstract void log(String msg, Throwable t, int severity)
Log the given message and exception at the given severity.
msg
- The message to log.
t
- The throwable exception to log.
severity
- The severity at which to log the information.
public abstract void log(Throwable t, int severity)
Log the given exception at the given severity.
t
- The throwable exception to log.
severity
- The severity at which to log the information.
Class oracle.soap.server.ProviderDeploymentDescriptor
java.lang.Object | +----oracle.soap.server.ProviderDeploymentDescriptor public final class ProviderDeploymentDescriptor extends Object implements Serializable
ProviderDeploymentDescriptor
defines the deployment information for a specific provider. Different providers may be deployed using the same implementation and be distinguished only by their provider descriptor.
public ProviderDeploymentDescriptor()
Construct a new instance of a provider descriptor.
public void setId(String id)
Set the provider id.
id
- The unique provider id.
public String getId()
Returns the unique id for this provider.
This provider's unique id.
public void setClassname(String classname)
Set the name of the class that implements this provider.
classname
- The name of the implementing class.
public String getClassname()
Returns the name of the class that implements this provider.
The classname.
public void setProviderType(String providerType)
Set the provider type.
providerType
- The provider type.
public String getProviderType()
Returns the provider type.
This provider's type.
public void setOptions(Hashtable options)
Set the options.
options - The name-value pairs that represent the provider implementation-specific options for this service.
public Hashtable getOptions()
Get the provider-specific options.
The name -value pairs that represent the provider-specific options for this service.
public static ProviderDeploymentDescriptor fromXML(Element root)
Build a provider descriptor from the given document.
root
- The root of the document that represents the XML provider descriptor.
The ProviderDeploymentDescriptor for the given XML.
public void toXML(Writer pr)
Write out the service deployment descriptor as XML.
pr
- The writer for the XML output.
public String toString()
toString
in class Object
Class oracle.soap.server.RequestContext
java.lang.Object | +----oracle.soap.server.RequestContext public class RequestContext extends Object
RequestContext defines all of the context for a SOAP request, including information that is passed to the provider and information that the provider must set before returning. Note that the provider is given the request Envelope and is therefore responsible to unmarshall the request parameters. Similarly, the provider is required to marshall the response, although the response envelope must also be set by the provider, as it may be needed by a pluggable handler.
The following information is provided by the SOAP engine to the Provider, meaning that the provider can utilize this information in Provider.invoke
:
getEnvelope
- the envelope containing the requestgetServiceDeploymentDescriptor
- the service deployment descriptor for the service in which the method is being invokedgetServiceId
- the URI of the servicegetUserContext
- the security context describing the user invoking the method in the servicegetMethodName
- the name of the method being invoked in the service.The following information must be given by the Provider to the SOAP engine:
setResponseBytes
- this is the marshalled response. Given a Response, it can be created by building the response envelope and then marshalling the envelope.setResponseEnvelope
- this is the response envelope, which is logically equivalent to the response bytes.getRequestEncodingStyle
- the encoding style to use for the response in case of an error (if not set, defaults to Constants.NS_URI_SOAP_ENC, which is SOAP encoding). If the provider cares about this, it should set this value as soon as it can in case of an exception. The provider might use the same encoding as the request or as one of the parameters.
public RequestContext()
Default constructor for this class.
public void setRequestEnvelope(Envelope envelope)
Set the envelope that represents the actual SOAP request.
Parameters
envelope
- The SOAP envelope.
public Envelope getRequestEnvelope()
Get the envelope that represents the actual SOAP request.
The SOAP envelope.
public void setResponseEnvelope(Envelope envelope)
Set the envelope that represents the SOAP response.
envelope
- The SOAP response envelope.
public Envelope getResponseEnvelope()
Get the envelope that represents the SOAP response.
The SOAP response envelope.
public void setResponseMap(SOAPMappingRegistry smr)
Set the mapping registry that must be used to serialize the SOAP response envelope.
smr
- The mapping registry for the SOAP response envelope.
public SOAPMappingRegistry getResponseMap()
Get the mapping registry that must be used to serialize the SOAP response.
The mapping registry for the SOAP response envelope.
public void setResponseBytes(ByteArrayOutputStream bytes)
Set the response stream for this SOAP request.
bytes
- The ByteArrayOutputStream that contains the response.
public ByteArrayOutputStream getResponseBytes()
Get the response stream for this SOAP request.
The ByteArrayOutputStream that contains the response.
public void setRequestEncodingStyle(String requestEncodingStyle)
Set the encoding style that was used on the request.
requestEncodingStyle
- The request encoding style.
public String getRequestEncodingStyle()
Get the encoding style that was used on the request.
The request encoding style.
public void setServiceDeploymentDescriptor(ServiceDeploymentDescriptor serviceDeploymentDescriptor)
Set the service deployment descriptor for the requested service.
serviceDeploymentDescriptor
- The service deployment descriptor for this request.
public ServiceDeploymentDescriptor getServiceDeploymentDescriptor()
Get the service deployment descriptor for the requested service.
The service deployment descriptor for this request, or null if the provider is an AutonomousProvider.
public void setMethodName(String methodName)
Set the method name for this SOAP request. The method name is in the envelope, but it can be "cached" here by the server as a convenience.
methodName
- The method name that is being invoked in the service.
public String getMethodName()
Get the method name for this SOAP request.
The the method name being invoked.
public void setServiceId(String serviceId)
Set the service id (URI) for this SOAP request.
serviceId
- The URI for the service to which this request is directed.
public String getServiceId()
Get the service id (URI) for this SOAP request.
The URI for the service to which this request is directed.
public void setUserContext(UserContext userContext)
Set the user context for this SOAP request.
userContext
- The user context.
public UserContext getUserContext()
Get the user context for this SOAP request.
The user context
Class oracle.soap.server.SOAPServerContext
java.lang.Object | +----oracle.soap.server.SOAPServerContext public class SOAPServerContext extends Object
SOAPServerContext defines the context of the SOAP server that is independent of the type of container in which the server is running.
public SOAPServerContext()
Default constructor.
public Hashtable getGlobalContext()
Returns the global context.
The global context that contains SOAP server-wide objects, or null if the attribute is not set.
public void setGlobalContext(Hashtable globalContext)
Set the global context, which contains SOAP server-wide objects.
globalContext
- The global context.
public void setLogger(Logger logger)
Set the logger, which is used for text-based logging of informational and debug messages.
logger
- The SOAP logger.
public Logger getLogger()
Returns the SOAP logger.
The SOAP logger, which is used to log informational and debug messages.
public Object getAttribute(String name)
Returns the attribute with the given name, or null if there is no attribute by that name.
name
- A String specifying the name of the attribute.
An Object containing the value of the attribute, or null if no attribute exists matching the given name.
public Enumeration getAttributeNames()
Returns an Enumeration containing the attribute names available within this SOAP context.
An Enumeration of attribute names.
setAttribute public void setAttribute(String name, Object object)
Binds an object to a given attribute name in this SOAP context. If the name specified is already used for an attribute, this method will remove the old attribute and bind the name to the new attribute. Neither the name nor the object may be null.
name
- A non-null String specifying the name of the attribute.
object
- An non-null Object representing the attribute to be bound.
public void removeAttribute(String name)
Removes the attribute with the given name from the context. After removal, subsequent calls to getAttribute(java.lang.String) to retrieve the attribute's value will return null.
name
- A String specifying the name of the attribute to be removed.
object
- An Object representing the attribute to be bound.
public void setAttribute(String name, Object object)
Binds an object to a given attribute name in this SOAP context. If the name specified is already used for an attribute, this method will remove the old attribute and bind the name to the new attribute. Neither the name nor the object may be null.
name
- A non-null String specifying the name of the attribute.
object
- An non-null Object representing the attribute to be bound.
Class oracle.soap.server.ServiceDeploymentDescriptor
java.lang.Object | +----oracle.soap.server.ServiceDeploymentDescriptor public final class ServiceDeploymentDescriptor extends Object implements Serializable
ServiceDeploymentDescriptor
defines the deployment information for a SOAP service, independent of its provider type. The class supports any number of named provider options, which allows the descriptor to be easily extended (without code changes) for new types of providers.
public static final int SERVICE_TYPE_RPC
public static final int SERVICE_TYPE_MESSAGE
public static final int SCOPE_REQUEST
public static final int SCOPE_SESSION
public static final int SCOPE_APPLICATION
public ServiceDeploymentDescriptor()
Construct a new service descriptor.
public void setId(String id)
Set the service id, which must be a valid URI.
id
- The service URI.
public String getId()
Get the service id.
The service id, which is a URI.
public void setProviderId(String providerId)
Set the id of the provider for this service.
providerId
- The provider's id for this service.
public String getProviderId()
Get the provider id for this service.
The provider id.
public void setMethods(String methods[])
Set the list of methods that are provided by this service.
methods - The list of provided methods.
public String[] getMethods()
Get the list of methods that are provided by this service.
The list of provided methods.
public void setScope(int scope)
Set the execution scope.
scope
- The execution scope, which is one of the SCOPE_xxx constants.
public int getScope()
Get the scope.
The scope, which is one of the SCOPE_xxx constants.
public void setServiceType(int serviceType)
Set the service type. DLD: exlain RPC vs one-way message.
serviceType
- The service type, which is one of the SERVICE_TYPE_xxx constants.
public int getServiceType()
Get the service type.
The service type, which is one of the SERVICE_TYPE_xxx constants.
public void setProviderType(String providerType)
Set the provider type.
providerType - The provider type, which can be any string. The provider type is used to validate the XML service descriptor (for the provider-specific options).
public String getProviderType()
Get the provider type.
The provider type.
public void setProviderOptions(Hashtable providerOptions)
Set the provider-specific options.
providerOptions
- The name-value pairs that represent the provider-specific options for this service.
public Hashtable getProviderOptions()
Get the provider-specific options.
The name-value pairs that represent the provider-specific options for this service.
public void setFaultListener(String faultListener[])
Set the fault listener list.
faultListener
- The list of class names that are fault listeners for this service.
public String[] getFaultListener()
Get the fault listener list.
The list of class names that are fault listeners for this service.
public SOAPFaultRouter buildFaultRouter()
Get the fault router.
The fault router that is built from the service's fault listeners.
public void setTypeMappings(TypeMapping typeMappings[])
Set the XML-Java type mappings, which define how to deserialize XML into Java and serialize Java into XML.
typeMappings
- The type mappings.
public TypeMapping[] getTypeMappings()
Get the XML-Java type mappings, which define how to deserialize XML into Java and serialize Java into XML.
The type mappings.
public void setSqlMap(Hashtable sqlMap)
Set the map that maps from SQL type to Java type.
sqlMap
- The SQL type to Java class map.
public Hashtable getSqlMap()
Get the SQL type to Java type map.
The SQL type to Java class map.
public void setDefaultSMRClass(String defaultSMRClass)
Set the default SOAP mapping registry class.
defaultSMRClass
- The default SOAP mapping registry class.
public String getDefaultSMRClass()
Get the default SOAP mapping registry class.
The default SOAP mapping registry class.
public boolean isMethodValid(String methodName)
Determine if the given method is valid for this service.
true if the method is valid for this service, else false.
public static ServiceDeploymentDescriptor fromXML(Element root)
Populate the ServiceDeploymentDescriptor with information from the given document, which is the XML representation of the descriptor.
root
- The root of the XML document that represents the service descriptor.
The ServiceDeploymentDescriptor that contains the information from the document.
IllegalArgumentException if invalid document.
public void toXML(Writer pr)
Write out the service deployment descriptor as XML.
pr
- The writer for the XML output.
public String toString()
Get a printable representation of this descriptor.
toString in class Object
public static SOAPMappingRegistry buildSOAPMappingRegistry(ServiceDeploymentDescriptor sdd)
Utility to generate an XML serialization registry from all the type mappings registered into a deployment descriptor.
dd
- the deployment descriptor
the xml serialization registry
public static Hashtable buildSqlClassMap(ServiceDeploymentDescriptor sdd) throws SOAPException
Utility to generate a map from SQL type to Java Class using the type mapping information from the deployment descriptor.
sdd
- The service deployment descriptor to use.
The type to Class map.
SOAPException if failed to generate map.
Class oracle.soap.server.UserContext
java.lang.Object | +----oracle.soap.server.UserContext public class UserContext extends Object
UserContext defines the user context for a SOAP service request. Several attributes are pre-defined, and set and get methods are provided for those. In addition, the provider may define additional attributes using getAttribute and setAttribute.
Note that the HttpServlet
and HttpSession
do not really belong here, but they are required by the JavaProvider.
public UserContext()
Default constructor.
public String getRequestURI()
Returns the URI of the request.
The URI of the request.
public void setRequestURI(String uri)
Set the URI of the request.
uri
- Request URI
public Object getCertificate()
Returns the user certificate.
The user certificate for the user making SOAP request, or null if this attribute is not set.
public void setCertificate(Object certificate)
Set the user certificate.
certificate
- The user certificate for the user making the SOAP request.
public HttpServlet getHttpServlet()
Returns the HTTP servlet.
The HttpServlet that is processing the SOAP request, or null if the servlet attribute is not set.
public void setHttpServlet(HttpServlet servlet)
Set the HTTP servlet.
servlet
- The HttpServlet that is processing the SOAP request.
Returns the HTTP session.
The HttpSession
for the SOAP request, or null if the session attribute is not set.
public void setHttpSession(HttpSession session)
Set the HTTP session.
servlet
- The HttpSession for the SOAP request.
public String getRemoteAddress()
Returns the Internet Protocol (IP) address of the client that sent the request.
The remote client's IP address.
public void setRemoteAddress(String remoteAddress)
Set the remote IP address of the client.
remoteAddress
- The IP address of the client making the SOAP request.
public String getRemoteHost()
Returns the host name of the client that sent the request.
The remote client's host name.
public void setRemoteHost(String remoteHost)
Set the host name of the client making the SOAP request
remoteHost
- The host name of the client making the SOAP request.
public boolean getSecureChannel()
Returns an indication whether the channel is secure.
true
if the channel is secure, else false
.
public void setSecureChannel(boolean secureChannel)
Set the indicator of whether the channel is secure.
secureChannel
- true if the channel is secure, else false.
public String getUsername()
Returns the protocol-specific username.
The protocol-specific username for the SOAP request, or null if this attribute is not set.
public void setUsername(String username)
Set the protocol-specific username.
username
- The protocol-specific username for the SOAP request.
public Object getAttribute(String name)
Returns the attribute with the given name, or null if there is no attribute by that name.
name
- A String specifying the name of the attribute.
An Object containing the value of the attribute, or null if no attribute exists matching the given name.
getAttributeNames
public Enumeration getAttributeNames()
Returns an Enumeration containing the attribute names available within this SOAP context.
An Enumeration of attribute names.
getAttribute
public void setAttribute(String name, Object object)
Binds an object to a given attribute name in this SOAP context. If the name specified is already used for an attribute, this method will remove the old attribute and bind the name to the new attribute. Neither the name nor the object may be null.
name
- A non-null String specifying the name of the attribute.
object
- An non-null Object representing the attribute to be bound.
public void removeAttribute(String name)
Removes the attribute with the given name from the context. After removal, subsequent calls to getAttribute(java.lang.String) to retrieve the attribute's value will return null.
name
- A String specifying the name of the attribute to be removed.
object
- An Object representing the attribute to be bound.
|
Copyright © 1996, 2002 Oracle Corporation. All Rights Reserved. |
|