Skip Headers

Oracle9i Supplied Java Packages Reference
Release 2 (9.2)

Part Number A96609-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to next page

18
Package oracle.soap.server

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:


Package oracle.soap.server Description

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


Package oracle.soap.server Summary

Table 18-1  Interfaces in package oracle.soap.server
Interface Description

Interface Handler

Defines the interface for a pluggable handler in the SOAP server.

Interface Provider

Defines the capabilities that must be supported for each type of service provider.

Interface ProviderManager

Defines the Provider Manager used by the SOAP engine to deploy providers, undeploy providers, and access provider deployment information.

Interface ServiceManager

Defines the Service Manager used by the SOAP engine to deploy services, undeploy services, and to access service deployment information.

Table 18-2  Classes in package oracle.soap.server
Class Description

Class ContainerContext

Defines the context of the container in which the SOAP server is running.

Class Logger

Defines the capabilities that must be supported by a logger implementation.

Class ProviderDeploymentDescriptor

Defines the deployment information for a specific provider.

Class 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.

Class SOAPServerContext

defines the context of the SOAP server that is independent of the type of container in which the server is running.

Class ServiceDeploymentDescriptor

Defines the deployment information for a SOAP service, independent of its provider type.

Class UserContext

Defines the user context for a SOAP service request.


Interface Handler

Interface oracle.soap.server.Handler

public interface Handler

Description

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:


Fields

REQUEST_TYPE

public static final int REQUEST_TYPE

Handler invocation is part of request chain.

RESPONSE_TYPE

public static final int RESPONSE_TYPE

Handler invocation is part of response chain.

ERROR_TYPE

public static final int ERROR_TYPE


Handler invocation is part of error chain.


Methods

init

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.

Parameters

ssc - The SOAP server context, which contains the logger for informational messages.

Throws

SOAPException if unable to initialize the handler.

setOptions

public abstract void setOptions(Properties options)

Set the options for the handler for subsequent use by init. This method must be called before init.

Parameters

options - Options that are specific to the handler implementation.

getOptions

public abstract Properties getOptions()

Get this handler's options.

Returns

Options that are specific to the handler implementation.

setName

public abstract void setName(String name)

Set the name of the handler. This method must be called before init.

Parameters

name - The name of the handler instance.

getName

public abstract String getName()

Get this handler's name.

Returns

The name of the handler instance.

destroy

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.

Throws

SOAPException if unable to destroy.

invoke

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.

Parameters

chainType - as follows:

requestContext - The relevant request context.

Throws

SOAPException if handler invocation failed.


Interface Provider

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:

init

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.

Parameters

pd - The provider descriptor which contains the provider deployment information.

ssc - The SOAP server context, which contains the logger for informational messages.

Throws

SOAPException if unable to initialize and therefore unable to provide services.

destroy

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.

Throws

SOAPException if unable to destroy.

See Also:

init

getId

public abstract String getId()

Get this provider's unique name.

Returns

This providers name, which is unique within the SOAP handler.

invoke

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.

Parameters

requestContext - The RequestContext that contains everything the provider needs to process the request.

Throws

SOAPException if error during method invocation for any number of reasons, including user does not have permission, method does not exist.


Interface ProviderManager

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.

Table 18-5  Methods in ProviderManager
Method Description

deploy

Deploy the given provider.

destroy

Cleanup the provider manager.

getRequiredRequestURI

Get the URI that provider manager requests must be made to in order to be accepted.

init

Initialize the provider manager.

list

Get a list of provider ids for all providers that have been deployed.

query

Get the deployment descriptor for the given provider.

setServiceManager

Make the service manager that is being used to manage service deployment information available to the provider manager.

undeploy

Undeploy the given provider, and return its descriptor.


Methods

init

public abstract void init(Properties options) throws SOAPException

Initialize the provider manager.

Parameters

options - The options required to setup access to the deployment information.

Throws

SOAPException if unable to access the deployment information.

destroy

public abstract void destroy() throws SOAPException

Cleanup the provider manager.

Throws

SOAPException if unable to cleanup the provider manager.

setServiceManager

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.

Parameters

providerManager - The provider manager that is managing provider deployment information for the SOAP server.

getRequiredRequestURI

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.

Returns

The request URI for provider manager requests, or null if any URI can be used.

undeploy

public abstract ProviderDeploymentDescriptor undeploy(String providerId)
                          throws SOAPException

Undeploy the given provider, and return its descriptor.

Parameters

providerId - The id of the provider to undeploy.

Returns

The descriptor containing the deployment information for the provider that has been undeployed.

Throws

SOAPException if the provider is not found or failed to undeploy.

deploy

public abstract void deploy(ProviderDeploymentDescriptor pd)
                       throws SOAPException

Deploy the given provider.

Parameters

pd - The provider descriptor for the provider to deploy.

Throws

SOAPException if unable to deploy.

query

public abstract ProviderDeploymentDescriptor query(String providerId) throws 
SOAPException

Get the deployment descriptor for the given provider.

Parameters

providerId - The id of the provider.

Returns

The descriptor containing the deployment information for the given provider.

Throws

SOAPException if the provider is not found.

list

public abstract String[] list() throws SOAPException

Get a list of provider ids for all providers that have been deployed.

Returns

An array of deployed provider ids.

Throws

SOAPException if unable to list provider ids.


Interface ServiceManager

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.


Methods

init

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.

Parameters

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.

Throws

SOAPException if unable to access the service deployment information.

destroy

public abstract void destroy() throws SOAPException

Cleanup the service manager.

Throws

SOAPException if unable to cleanup the service manager.

getRequiredRequestURI

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.

Returns

The request URI for service manager requests, or null if any URI can be used.

undeploy

public abstract ServiceDeploymentDescriptor undeploy(String serviceId)
                     throws SOAPException

Undeploy the given service, and return its descriptor.

Parameters

serviceId - The URI of the service to undeploy.

Returns

The descriptor containing the deployment information for the service that has been undeployed.

Throws

SOAPException if the service is not found or failed to undeploy.

deploy

public abstract void deploy(ServiceDeploymentDescriptor sd) throws SOAPException

Deploy the given service.

Parameters

sd - The service descriptor for the service to deploy.

Throws

SOAPException if unable to deploy.

query

public abstract ServiceDeploymentDescriptor query(String serviceId) throws 
SOAPException

Get the deployment descriptor for the given service.

Parameters

serviceId - The unique URI of the service.

Returns

The descriptor containing the deployment information for the given service.

Throws

SOAPException if the service is not found.

list

public abstract String[] list() throws SOAPException

Get a list of service ids for all services that have been deployed, regardless of the provider.

Returns

An array of deployed service ids.

Throws

SOAPException if unable to list service ids.


Class ContainerContext

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.


Fields

SERVLET_CONTAINER

public static final String SERVLET_CONTAINER

The value for a servlet container type.


Constructors

ContainerContext

public ContainerContext()

Methods

setContainerType

public void setContainerType(String containerType)

Set the container type.

Parameters

containerType - The type of container in which the SOAP server is running.

getContainerType

public String getContainerType()

Returns the container type.

Returns

The type of container in which the SOAP server is running.

getHttpServlet

public HttpServlet getHttpServlet()

Returns the HTTP servlet if the container type is SERVLET_CONTAINER.

Returns

The HttpServlet that is processing the SOAP request, or null if the servlet attribute is not set.

setHttpServlet

public void setHttpServlet(HttpServlet servlet)

Set the HTTP servlet for a SOAP server running in a SERVLET_CONTAINER type of container.

Parameters

servlet - The HttpServlet that is processing the SOAP request.

getAttribute

public Object getAttribute(String name)

Returns the attribute with the given name, or null if there is no attribute by that name.

Parameters

name - A String specifying the name of the attribute.

Returns

An Object containing the value of the attribute, or null if no attribute exists matching the given name.

See Also:

getAttributeNames

getAttributeNames

public Enumeration getAttributeNames()

Returns an Enumeration containing the attribute names available within this SOAP context.

Returns

An Enumeration of attribute names.

See Also:

getAttribute 

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.

Parameters

name - A non-null String specifying the name of the attribute.

object - An non-null Object representing the attribute to be bound.

removeAttribute

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.

Parameters

name - A String specifying the name of the attribute to be removed.

object - An Object representing the attribute to be bound.


Class Logger

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.


Fields

SEVERITY_ERROR

public static final int SEVERITY_ERROR

SEVERITY_STATUS

public static final int SEVERITY_STATUS

SEVERITY_DEBUG

public static final int SEVERITY_DEBUG

SEVERITY_INVALID

protected static final int SEVERITY_INVALID

SEVERITY_NAMES

public static String SEVERITY_NAMES[]

DEFAULT_SEVERITY

public static final int DEFAULT_SEVERITY

OPTION_SEVERITY

public static final String OPTION_SEVERITY

Configuration option that specifies the severity for the logger.

m_severity

protected int m_severity

The logger's severity setting.


Constructors

Logger

public Logger()


Methods

getSeverityValue

protected final int getSeverityValue(String severityName)

Get the severity value associated with the given severity name.

Parameters

severityName - The name of the serverity level (e.g., error).

Returns

The severity (SEVERITY_xxx).

getSeverityName

protected final String getSeverityName(int severity)

Get the severity name associated with the given severity.

Parameters

severity - The severity level (SEVERITY_xxx).

Returns

The severity name.

init

public abstract void init(Properties options,
                           ContainerContext context)
                       throws SOAPException

One-time initialization of the logger with its configuration parameters.

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.

Throws

SOAPException if unable to initialize the logger.

getSeverity

public int getSeverity()

Get the current severity.

Returns

The current severity setting for the logger.

setSeverity

public void setSeverity(int severity)

Set the current severity.

Parameters

severity - The new severity setting for the logger.

isLoggable

public boolean isLoggable(int severity)

Determine if a message would be logged at the given severity level.

Parameters

severity - The severity level to check.

Returns

True if a message would be logged at the given severity level, else false.

log

public abstract void log(String msg,
                          int severity)

Log the given message at the given severity.

Parameters

msg - The message to log.

severity - The severity at which to log the information.

log

public abstract void log(String msg,
                          Throwable t,
                          int severity)

Log the given message and exception at the given severity.

Parameters

msg - The message to log.

t - The throwable exception to log.

severity - The severity at which to log the information.

log

public abstract void log(Throwable t,
                          int severity)

Log the given exception at the given severity.

Parameters

t - The throwable exception to log.

severity - The severity at which to log the information.


Class ProviderDeploymentDescriptor

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.

Table 18-6  Class members in ProviderDeploymentDescriptor
Class Member Description

ProviderDeploymentDescriptor

Class constructor. Construct a new instance of a provider descriptor.

fromXML

Build a provider descriptor from the given document.

getClassname

Returns the name of the class that implements this provider.

getId

Returns the unique id for this provider.

getOptions

Get the provider-specific options.

getProviderType

Returns the provider type.

setClassname

Set the name of the class that implements this provider.

setId

Set the provider id.

setOptions

Set the options.

setProviderType

Set the provider type.

toString

Overrides toString in class Object.

toXML

Write out the service deployment descriptor as XML.


Constructors

ProviderDeploymentDescriptor

public ProviderDeploymentDescriptor()

Construct a new instance of a provider descriptor.


Methods

setId

public void setId(String id)

Set the provider id.

Parameters

id - The unique provider id.

getId

public String getId()

Returns the unique id for this provider.

Returns

This provider's unique id.

setClassname

public void setClassname(String classname)

Set the name of the class that implements this provider.

Parameters

classname - The name of the implementing class.

getClassname

public String getClassname()

Returns the name of the class that implements this provider.

Returns

The classname.

setProviderType

public void setProviderType(String providerType)

Set the provider type.

Parameters

providerType - The provider type.

getProviderType

public String getProviderType()

Returns the provider type.

Returns

This provider's type.

setOptions

public void setOptions(Hashtable options)

Set the options.

Parameters

options - The name-value pairs that represent the provider implementation-specific options for this service.

getOptions

public Hashtable getOptions()

Get the provider-specific options.

Returns

The name -value pairs that represent the provider-specific options for this service.

fromXML

public static ProviderDeploymentDescriptor fromXML(Element root)

Build a provider descriptor from the given document.

Parameters

root - The root of the document that represents the XML provider descriptor.

Returns

The ProviderDeploymentDescriptor for the given XML.

toXML

public void toXML(Writer pr)

Write out the service deployment descriptor as XML.

Parameters

pr - The writer for the XML output.

toString

public String toString()

Overrides

toString in class Object


Class RequestContext

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:

The following information must be given by the Provider to the SOAP engine:


Contructors

RequestContext

public RequestContext()

Default constructor for this class.


Methods

setRequestEnvelope

public void setRequestEnvelope(Envelope envelope)

Set the envelope that represents the actual SOAP request.

Parameters

envelope - The SOAP envelope.

getRequestEnvelope

public Envelope getRequestEnvelope()

Get the envelope that represents the actual SOAP request.

Returns

The SOAP envelope.

setResponseEnvelope

public void setResponseEnvelope(Envelope envelope)

Set the envelope that represents the SOAP response.

Parameters

envelope - The SOAP response envelope.

getResponseEnvelope

public Envelope getResponseEnvelope()

Get the envelope that represents the SOAP response.

Returns

The SOAP response envelope.

setResponseMap

public void setResponseMap(SOAPMappingRegistry smr)

Set the mapping registry that must be used to serialize the SOAP response envelope.

Parameters

smr - The mapping registry for the SOAP response envelope.

getResponseMap

public SOAPMappingRegistry getResponseMap()

Get the mapping registry that must be used to serialize the SOAP response.

Returns

The mapping registry for the SOAP response envelope.

setResponseBytes

public void setResponseBytes(ByteArrayOutputStream bytes)

Set the response stream for this SOAP request.

Parameters

bytes - The ByteArrayOutputStream that contains the response.

getResponseBytes

public ByteArrayOutputStream getResponseBytes()

Get the response stream for this SOAP request.

Returns

The ByteArrayOutputStream that contains the response.

setRequestEncodingStyle

public void setRequestEncodingStyle(String requestEncodingStyle)

Set the encoding style that was used on the request.

Parameters

requestEncodingStyle - The request encoding style.

getRequestEncodingStyle

public String getRequestEncodingStyle()

Get the encoding style that was used on the request.

Returns

The request encoding style.

setServiceDeploymentDescriptor

public void setServiceDeploymentDescriptor(ServiceDeploymentDescriptor 
serviceDeploymentDescriptor)

Set the service deployment descriptor for the requested service.

Parameters

serviceDeploymentDescriptor - The service deployment descriptor for this request.

getServiceDeploymentDescriptor

public ServiceDeploymentDescriptor getServiceDeploymentDescriptor()

Get the service deployment descriptor for the requested service.

Returns

The service deployment descriptor for this request, or null if the provider is an AutonomousProvider.

setMethodName

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.

Parameters

methodName - The method name that is being invoked in the service.

getMethodName

public String getMethodName()

Get the method name for this SOAP request.

Returns

The the method name being invoked.

setServiceId

public void setServiceId(String serviceId)

Set the service id (URI) for this SOAP request.

Parameters

serviceId - The URI for the service to which this request is directed.

getServiceId

public String getServiceId()

Get the service id (URI) for this SOAP request.

Returns

The URI for the service to which this request is directed.

setUserContext

public void setUserContext(UserContext userContext)

Set the user context for this SOAP request.

Parameters

userContext - The user context.

getUserContext

public UserContext getUserContext()

Get the user context for this SOAP request.

Returns

The user context


Class SOAPServerContext

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.

Table 18-8  Class members in SOAPServerContext
Class Member Description

SOAPServerContext

Default constructor.

getAttribute

Returns the attribute with the given name, or null if there is no attribute by that name.

getAttributeNames

Returns an Enumeration containing the attribute names available within this SOAP context.

getGlobalContext

Returns the global context.

getLogger

Returns the SOAP logger.

removeAttribute

Removes the attribute with the given name from the context.

setAttribute

Binds an object to a given attribute name in this SOAP context.

setGlobalContext

Set the global context, which contains SOAP server-wide objects.

setLogger

Set the logger, which is used for text-based logging of informational and debug messages.


Constructors

SOAPServerContext

public SOAPServerContext()

Default constructor.


Methods

getGlobalContext

public Hashtable getGlobalContext()

Returns the global context.

Returns

The global context that contains SOAP server-wide objects, or null if the attribute is not set.

setGlobalContext

public void setGlobalContext(Hashtable globalContext)

Set the global context, which contains SOAP server-wide objects.

Parameters

globalContext - The global context.

setLogger

public void setLogger(Logger logger)

Set the logger, which is used for text-based logging of informational and debug messages.

Parameters

logger - The SOAP logger.

getLogger

public Logger getLogger()

Returns the SOAP logger.

Returns

The SOAP logger, which is used to log informational and debug messages.

getAttribute

public Object getAttribute(String name)

Returns the attribute with the given name, or null if there is no attribute by that name.

Parameters

name - A String specifying the name of the attribute.

Returns

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.

Returns

An Enumeration of attribute names.

getAttribute

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.

Parameters

name - A non-null String specifying the name of the attribute.

object - An non-null Object representing the attribute to be bound.

removeAttribute

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.

Parameters

name - A String specifying the name of the attribute to be removed.

object - An Object representing the attribute to be bound.

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.

Parameters

name - A non-null String specifying the name of the attribute.

object - An non-null Object representing the attribute to be bound.


Class ServiceDeploymentDescriptor

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.


Fields

SERVICE_TYPE_RPC

public static final int SERVICE_TYPE_RPC

SERVICE_TYPE_MESSAGE

public static final int SERVICE_TYPE_MESSAGE

SCOPE_REQUEST

public static final int SCOPE_REQUEST

SCOPE_SESSION

public static final int SCOPE_SESSION

SCOPE_APPLICATION

public static final int SCOPE_APPLICATION

Constructors

ServiceDeploymentDescriptor

public ServiceDeploymentDescriptor()

Construct a new service descriptor.


Methods

setId

public void setId(String id)

Set the service id, which must be a valid URI.

Parameters

id - The service URI.

getId

public String getId()

Get the service id.

Returns

The service id, which is a URI.

setProviderId

public void setProviderId(String providerId)

Set the id of the provider for this service.

Parameters

providerId - The provider's id for this service.

getProviderId

public String getProviderId()

Get the provider id for this service.

Returns

The provider id.

setMethods

public void setMethods(String methods[])

Set the list of methods that are provided by this service.

Parameters

methods - The list of provided methods.

getMethods

public String[] getMethods()

Get the list of methods that are provided by this service.

Returns

The list of provided methods.

setScope

public void setScope(int scope)

Set the execution scope.

Parameters

scope - The execution scope, which is one of the SCOPE_xxx constants.

getScope

public int getScope()

Get the scope.

Returns

The scope, which is one of the SCOPE_xxx constants.

setServiceType

public void setServiceType(int serviceType)

Set the service type. DLD: exlain RPC vs one-way message.

Parameters

serviceType - The service type, which is one of the SERVICE_TYPE_xxx constants.

getServiceType

public int getServiceType()

Get the service type.

Returns

The service type, which is one of the SERVICE_TYPE_xxx constants.

setProviderType

public void setProviderType(String providerType)

Set the provider type.

Parameters

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).

getProviderType

public String getProviderType()

Get the provider type.

Returns

The provider type.

setProviderOptions

public void setProviderOptions(Hashtable providerOptions)

Set the provider-specific options.

Parameters

providerOptions - The name-value pairs that represent the provider-specific options for this service.

getProviderOptions

public Hashtable getProviderOptions()

Get the provider-specific options.

Returns

The name-value pairs that represent the provider-specific options for this service.

setFaultListener

public void setFaultListener(String faultListener[])

Set the fault listener list.

Parameters

faultListener - The list of class names that are fault listeners for this service.

getFaultListener

public String[] getFaultListener()

Get the fault listener list.

Returns

The list of class names that are fault listeners for this service.

buildFaultRouter

public SOAPFaultRouter buildFaultRouter()

Get the fault router.

Returns

The fault router that is built from the service's fault listeners.

setTypeMappings

public void setTypeMappings(TypeMapping typeMappings[])

Set the XML-Java type mappings, which define how to deserialize XML into Java and serialize Java into XML.

Parameters

typeMappings - The type mappings.

getTypeMappings

public TypeMapping[] getTypeMappings()

Get the XML-Java type mappings, which define how to deserialize XML into Java and serialize Java into XML.

Returns

The type mappings.

setSqlMap

public void setSqlMap(Hashtable sqlMap)

Set the map that maps from SQL type to Java type.

Parameters

sqlMap - The SQL type to Java class map.

getSqlMap

public Hashtable getSqlMap()

Get the SQL type to Java type map.

Returns

The SQL type to Java class map.

setDefaultSMRClass

public void setDefaultSMRClass(String defaultSMRClass)

Set the default SOAP mapping registry class.

Parameters

defaultSMRClass - The default SOAP mapping registry class.

getDefaultSMRClass

public String getDefaultSMRClass()

Get the default SOAP mapping registry class.

Returns

The default SOAP mapping registry class.

isMethodValid

public boolean isMethodValid(String methodName)

Determine if the given method is valid for this service.

Returns

true if the method is valid for this service, else false.

fromXML

public static ServiceDeploymentDescriptor fromXML(Element root)

Populate the ServiceDeploymentDescriptor with information from the given document, which is the XML representation of the descriptor.

Parameters

root - The root of the XML document that represents the service descriptor.

Returns

The ServiceDeploymentDescriptor that contains the information from the document.

Throws

IllegalArgumentException if invalid document.

toXML

public void toXML(Writer pr)

Write out the service deployment descriptor as XML.

Parameters

pr - The writer for the XML output.

toString

public String toString()

Get a printable representation of this descriptor.

Overrides

toString in class Object

buildSOAPMappingRegistry

public static SOAPMappingRegistry 
buildSOAPMappingRegistry(ServiceDeploymentDescriptor sdd)

Utility to generate an XML serialization registry from all the type mappings registered into a deployment descriptor.

Parameters

dd - the deployment descriptor

Returns

the xml serialization registry

buildSqlClassMap

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.

Parameters

sdd - The service deployment descriptor to use.

Returns

The type to Class map.

Throws

SOAPException if failed to generate map.


Class UserContext

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.


Constructors

UserContext

public UserContext()

Default constructor.


Methods

getRequestURI

public String getRequestURI()

Returns the URI of the request.

Returns

The URI of the request.

setRequestURI

public void setRequestURI(String uri)

Set the URI of the request.

Parameters

uri - Request URI

getCertificate

public Object getCertificate()

Returns the user certificate.

Returns

The user certificate for the user making SOAP request, or null if this attribute is not set.

setCertificate

public void setCertificate(Object certificate)

Set the user certificate.

Parameters

certificate - The user certificate for the user making the SOAP request.

getHttpServlet

public HttpServlet getHttpServlet()

Returns the HTTP servlet.

Returns

The HttpServlet that is processing the SOAP request, or null if the servlet attribute is not set.

setHttpServlet

public void setHttpServlet(HttpServlet servlet)

Set the HTTP servlet.

Parameters

servlet - The HttpServlet that is processing the SOAP request.

getHttpSession public HttpSession getHttpSession()


Returns the HTTP session.

Returns

The HttpSession for the SOAP request, or null if the session attribute is not set.

setHttpSession

public void setHttpSession(HttpSession session)

Set the HTTP session.

Parameters

servlet - The HttpSession for the SOAP request.

getRemoteAddress

public String getRemoteAddress()

Returns the Internet Protocol (IP) address of the client that sent the request.

Returns

The remote client's IP address.

setRemoteAddress

public void setRemoteAddress(String remoteAddress)

Set the remote IP address of the client.

Parameters

remoteAddress - The IP address of the client making the SOAP request.

getRemoteHost

public String getRemoteHost()

Returns the host name of the client that sent the request.

Returns

The remote client's host name.

setRemoteHost

public void setRemoteHost(String remoteHost)

Set the host name of the client making the SOAP request

Parameters

remoteHost - The host name of the client making the SOAP request.

getSecureChannel

public boolean getSecureChannel()

Returns an indication whether the channel is secure.

Returns

true if the channel is secure, else false.

setSecureChannel

public void setSecureChannel(boolean secureChannel)

Set the indicator of whether the channel is secure.

Parameters

secureChannel - true if the channel is secure, else false.

getUsername

public String getUsername()

Returns the protocol-specific username.

Returns

The protocol-specific username for the SOAP request, or null if this attribute is not set.

setUsername

public void setUsername(String username)

Set the protocol-specific username.

Parameters

username - The protocol-specific username for the SOAP request.

getAttribute

public Object getAttribute(String name)

Returns the attribute with the given name, or null if there is no attribute by that name.

Parameters

name - A String specifying the name of the attribute.

Returns

An Object containing the value of the attribute, or null if no attribute exists matching the given name.

See Also:

getAttributeNames

getAttributeNames

public Enumeration getAttributeNames()

Returns an Enumeration containing the attribute names available within this SOAP context.

Returns

An Enumeration of attribute names.

See Also:

getAttribute

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.

Parameters

name - A non-null String specifying the name of the attribute.

object - An non-null Object representing the attribute to be bound.

removeAttribute

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.

Parameters

name - A String specifying the name of the attribute to be removed.

object - An Object representing the attribute to be bound.


Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback