Skip Headers

Oracle® XML Reference 10g (9.0.4) Part Number B10926-01 |
Home | Contents | Index

# 12
Simple Object Access Protocol (SOAP)

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.

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

Oracle SOAP APIs are contained in these packages:

- oracle.soap.server Package

- oracle.soap.transport Package

- oracle.soap.transport.http Package

- oracle.soap.util.xml Package

  See Also: `http://www.w3.org/TR/SOAP/` `http://xml.apache.org/soap/` Oracle Application Developer's Guide - XML

## oracle.soap.server Package

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.

Table 12-1 lists the interfaces and classes that provide support for Oracle SOAP in the XDK for Java.

##### Table 12-1 Summary of Classes and Interfaces of oracle.soap.server

Class/Interface | Description
--- | ---
Handler Interface | Defines the interface for a pluggable handler in the SOAP server.
Provider Interface | Defines the capabilities that must be supported for each type of service provider.
ProviderManager Interface | Defines the Provider Manager used by the SOAP engine to deploy providers, undeploy providers, and access provider deployment information.
ServiceManager Interface | Defines the Service Manager used by the SOAP engine to deploy services, undeploy services, and to access service deployment information.
ContainerContext Class | 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; the logger is used to persistently record error and informational messages.
ProviderDeploymentDescriptor Class | Defines the deployment information for a specific provider.
RequestContext Class | 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.
ServiceDeploymentDescriptor Class | Defines the deployment information for a SOAP service, independent of its provider type.
UserContext Class | Defines the user context for a SOAP service request.

## Handler Interface

``

`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 provide a no-args constructor and be thread-safe.

#### Syntax

    public interface Handler

##### Table 12-2 Fields of Handler

Field | Syntax | Description
--- | --- | ---
    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.

##### Table 12-3 Summary of Methods of Handler

Method | Description
--- | ---
destroy() | Cleans-up handler (one time only).
getName() | Returns this handler's name.
getOptions() | Returns options that are specific to the handler implementation.
init() | Initializes handler (one-time only).
invoke() | Invokes the requested handler as part of the specified chain type.
setName() | Sets the name of the handler. This method must be called before init().
setOptions() | Sets the options for the handler for subsequent use by init.

## destroy()

Cleans-up handler (one time only). 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.

#### Syntax

    public abstract void destroy();

## getName()

Returns this handler's name.

#### Syntax

    public abstract String getName();

## getOptions()

Returns options that are specific to the handler implementation.

#### Syntax

    public abstract Properties getOptions();

## init()

Initializes handler (one-time only). 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 through `setOptions()`. Throws `SOAPException` if unable to initialize the handler.

#### Syntax

    public abstract void init( SOAPServerContext ssc);

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

## invoke()

Invokes 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. Throws `SOAPException` if handler invocation failed.

#### Syntax

    public abstract void invoke( int chainType, RequestContext requestContext);

Parameter | Description
--- | ---
    chainType
| `The following chainTypes are supported:` `Handler.REQUEST_TYPE` if the handler is being invoked as part of a request chain, before the service is invoked `Handler.RESPONSE_TYPE` if the handler is being invoked as part of a response chain, after the service has been invoked `Handler.ERROR_TYPE` if the handler is being invoked as part of an error chain, in case of an error during any one of request chain, service invocation, or response chain
    requestContext
| The relevant request context.

## setName()

Sets the name of the handler. This method must be called before `init()`.

#### Syntax

    public abstract void setName( String name);

Parameter | Description
--- | ---
    name
| The name of the handler instance.

## setOptions()

Sets the options for the handler for subsequent use by init. This method must be called before `init()`.

#### Syntax

    public abstract void setOptions( Properties options);

Parameter | Description
--- | ---
    options
| Options that are specific to the handler implementation.

## Provider Interface

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 provide a no-args constructor and be thread-safe

#### Syntax

    public interface Provider

##### Table 12-4 Summary of Methods in Provider

Method | Description
--- | ---
destroy() | Cleans up provider instance (one time only).
getId() | Returns this providers name, which is unique within the SOAP handler.
init() | Initializes provider instance (one time only).
invoke() | Invokes the requested method in the specified service, where the SOAP request is completely described in the request context.

## destroy()

Cleans up provider instance (one time only). 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.

#### Syntax

    public abstract void destroy();

## getId()

Returns this providers name, which is unique within the SOAP handler.

#### Syntax

    public abstract String getId();

## init()

Initializes provider instance (one time only). 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. Throws `SOAPException` if unable to initialize and therefore unable to provide services.

#### Syntax

    public abstract void init(ProviderDeploymentDescriptor pd,
                              SOAPServerContext ssc);

Parameter | Description
--- | ---
    pd
| The provider descriptor which contains the provider deployment information.
    ssc
| The SOAP server context that h contains the logger for informational messages.

## invoke()

Invokes the requested method in the specified service, where the SOAP request is completely described in the request context. Throws `SOAPException` if error during method invocation for any number of reasons, including user does not have permission, method does not exist.

#### Syntax

    public abstract void invoke( RequestContext requestContext);

Parameter | Description
--- | ---
    requestContext
| `RequestContext` that contains information used to process the request.

## ProviderManager Interface

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.

#### Syntax

    public interface ProviderManager

##### Table 12-5 Summary of Methods in ProviderManager

Method | Description
--- | ---
deploy() | Deploys the given provider.
destroy() | Cleans up the provider manager.
getRequiredRequestURI() | Returns the URI that provider manager requests.
init() | Initializes the provider manager.
list() | Returns an array of provider ids for all providers that have been deployed.
query() | Returns the deployment descriptor for the given provider.
setServiceManager() | Makes the service manager available to the provider manager.
undeploy() | Undeploys the given provider.

## deploy()

Deploys the given provider. Throws `SOAPException` if unable to deploy.

#### Syntax

    public abstract void deploy(ProviderDeploymentDescriptor providerId);

Parameter | Description
--- | ---
    providerId
| The id of the provider to deploy.

## destroy()

Cleans up the provider manager. Throws `SOAPException` if unable to cleanup the provider manager.

#### Syntax

    public abstract void destroy();

## getRequiredRequestURI()

Returns the URI that provider manager requests, or `NULL` if any URI can be used. Request must be made to in order to be accepted. Requests made to any other URI must be rejected.

#### Syntax

    public abstract String getRequiredRequestURI();

## init()

Initializes the provider manager. Throws`SOAPException` if unable to access the deployment information.

#### Syntax

    public abstract void init(Properties options);

Parameter | Description
--- | ---
    options
| The options required to setup access to the deployment information.

## list()

Returns an array of provider ids for all providers that have been deployed. Throws `SOAPException` if unable to list provider ids.

#### Syntax

    public abstract String[] list();

## query()

Returns the deployment descriptor for the given provider. Throws `SOAPException` if the provider is not found.

#### Syntax

    public abstract ProviderDeploymentDescriptor query( String providerId);

Parameter | Description
--- | ---
    providerId
| The id of the provider.

## setServiceManager()

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

#### Syntax

    public abstract void setServiceManager( ServiceManager serviceManager);

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

## undeploy()

Undeploys the given provider, and returns its descriptor containing the deployment information for the provider that has been undeployed. Throws `SOAPException` if the provider is not found or failed to undeploy.

#### Syntax

    public abstract ProviderDeploymentDescriptor undeploy( String providerId);

Parameter | Description
--- | ---
    providerId
| The id of the provider to undeploy.

## ServiceManager Interface

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.

#### Syntax

    public interface ServiceManager

##### Table 12-6 Summary of Methods in ServiceManager

Method | Description
--- | ---
getRequiredRequestURI() | Returns the URI that service manager requests.
deploy() | Deploys the given service.
destroy() | Cleans up the service manager.
init() | Initializes the service manager.
list() | Returns an array of service ids for all services that have been deployed, regardless of the provider.
query() | Returns the deployment descriptor for the given service.
undeploy() | Undeploys the given service, and returns its descriptor.

## getRequiredRequestURI()

Returns the URI that service manager requests, or `NUKLL` if any URI can be used. Requests must be made to in order to be accepted. Requests made to any other URI must be rejected.

#### Syntax

    public abstract String getRequiredRequestURI();

## deploy()

Deploys the given service. Throws `SOAPException` if unable to deploy.

#### Syntax

    public abstract void deploy(ServiceDeploymentDescriptor sd);

Parameter | Description
--- | ---
    sd
| The service descriptor for the service to deploy.

## destroy()

Cleans up the service manager. Throws `SOAPException` if unable to cleanup the service manager.

#### Syntax

    public abstract void destroy();

## init()

Initializes the service manager. The implementation should be able to handle a null value for the provider manager. Throws `SOAPException` if unable to access the service deployment information.

#### Syntax

    public abstract void init( Properties options,
                               ProviderManager providerManager);

Parameter | Description
--- | ---
    options
| The options required to setup access to 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.

## list()

Returns an array of service ids for all services that have been deployed, regardless of the provider. Throws `SOAPException` if unable to list service ids.

#### Syntax

    public abstract String[] list();

## query()

Returns the deployment descriptor for the given service. Throws `SOAPException` if the service is not found.

#### Syntax

    public abstract ServiceDeploymentDescriptor query( String serviceId);

Parameter | Description
--- | ---
    serviceId
| The unique URI of the service.

## undeploy()

Undeploys the given service, and returns its descriptor. Throws `SOAPException` if the service is not found or failed to undeploy.

#### Syntax

    public abstract ServiceDeploymentDescriptor undeploy( String serviceId);

Parameter | Description
--- | ---
    serviceId
| The URI of the service to undeploy.

## ContainerContext Class

ContainerContext class 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.

#### Syntax

    public class ContainerContext extends Object

##### Table 12-7 Fields of ContainerContext

Field | Syntax | Description
--- | --- | ---
    SERVLET_CONTAINER
    public static final String
         SERVLET_CONTAINER
| The value for a servlet container type.

##### Table 12-8 Summary of Methods of ContainerContext

Method | Description
--- | ---
ContainerContext() | Class constructor.
getAttribute() | Returns the attribute with the given name.
getAttributeNames() | Returns an Enumeration containing the attribute names available within this SOAP context.
getContainerType() | Returns the container type in which the SOAP server is running.
getHttpServlet() | Returns the HTTP servlet that is processing the SOAP request if the container type is SERVLET_CONTAINER.
removeAttribute() | Removes the attribute with the given name from the context.
setAttribute() | Binds an object to a given attribute name in this SOAP context.
setContainerType() | Sets the container type.
setHttpServlet() | Sets the HTTP servlet for a SOAP server running in a `SERVLET_CONTAINER` type of container.

## ContainerContext()

Class constructor.

#### Syntax

    public ContainerContext();

## getAttribute()

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

#### Syntax

    public Object getAttribute( String name);

Parameter | Description
--- | ---
    name
| A String specifying the name of the attribute.

## getAttributeNames()

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

#### Syntax

    public Enumeration getAttributeNames();

## getContainerType()

Returns the container type in which the SOAP server is running.

#### Syntax

    public String getContainerType();

## getHttpServlet()

Returns the HTTP servlet processing SOAP request if the container type is `SERVLET_CONTAINER`, or `NULL` if the servlet attribute is not set.

#### Syntax

    public HttpServlet getHttpServlet();

## removeAttribute()

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

#### Syntax

    public void removeAttribute( String name);

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

## setAttribute()

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

#### Syntax

    public void setAttribute( String name, Object object);

Parameter | Description
--- | ---
    name
| A non-null String specifying the name of the attribute.
    object
| An non-null Object representing the attribute to be bound.

## setContainerType()

Sets the container type.

#### Syntax

    public void setContainerType( String containerType);

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

## setHttpServlet()

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

#### Syntax

    public void setHttpServlet(HttpServlet servlet);

Parameter | Description
--- | ---
    servlet
| The HttpServlet that is processing the SOAP request.

## Class Logger

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:

- `SEVERITY_ERROR`

- `SEVERITY_STATUS`

- `SEVERITY_DEBUG`

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.

#### Syntax

    public abstract class Logger extends Object

##### Table 12-9 Fields of Logger

Field | Syntax | Description
--- | --- | ---
    SEVERITY_ERROR
    public static final int
         SEVERITY_ERROR
| Severity level for logging error messages.
    SEVERITY_STATUS
    public static final int
         SEVERITY_STATUS
| Severity level for logging status messages.
    SEVERITY_DEBUG
    public static final int
         SEVERITY_DEBUG
| Severity level for logging information for debugging purposes.
    SEVERITY_INVALID
    protected static final int
         SEVERITY_INVALID
| Indicates an invalid severity setting.
    SEVERITY_NAMES
    public static String
         SEVERITY_NAMES[]
| Printable names for each severity level, indexed by severity.
    DEFAULT_SEVERITY
    public static final int
         DEFAULT_SEVERITY
| The default severity level setting for determining which log requests are actually logged. The default is `SEVERITY_STATUS.`
    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.

## Methods of Logger

##### Table 12-10 Summary of Methods of Logger

Method | Description
--- | ---
Logger() | Class constructor.
getSeverity() | Returns the current severity setting for the logger.
getSeverityName() | Returns the severity name associated with the given severity.
getSeverityValue() | Returns the severity value associated with the given severity name.
init() | Initializes of the logger (one-time only) with its configuration parameters.
isLoggable() | Determines if a message would be logged at the given severity level.
log() | Logs messages.
setSeverity() | Sets the current severity.

## Logger()

Class constructor.

#### Syntax

    public Logger();

## getSeverity()

Returns the current severity setting for the logger.

#### Syntax

    public int getSeverity();

## getSeverityName()

Returns the severity name associated with the given severity.

#### Syntax

    protected final String getSeverityName( int severity);

Parameter | Description
--- | ---
    severity
| The severity level (`SEVERITY_xxx`).

## getSeverityValue()

Returns the severity value associated with the given severity name.

#### Syntax

    protected final int getSeverityValue( String severityName);

Parameter | Description
--- | ---
    severityName
| The name of the severity level, such as error.

## init()

Initializes of the logger (one-time only) with its configuration parameters. Throws `SOAPException` if unable to initialize the logger.

#### Syntax

    public abstract void init( Properties options,
                               ContainerContext context);

Parameter | Description
--- | ---
    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.

## isLoggable()

Determines if a message would be logged at the given severity level. Returns `TRUE` if a message would be logged at the given severity level, `FALSE` otherwise.

#### Syntax

    public boolean isLoggable( int severity);

Parameter | Description
--- | ---
    severity
| The severity level to check.

## log()

Logs messages. The options are described in the following table.

Syntax | Description
--- | ---
    public abstract void log(
         String msg,
         int severity);
| Logs the given message at the given severity.
    public abstract void log(
         String msg,
         Throwable t,
         int severity);
| Logs the given message and exception at the given severity.
    public abstract void log(
         Throwable t,
         int severity);
| Logs the given exception at the given severity.

Parameter | Description
--- | ---
    msg
| The message to log.
    severity
| The severity at which to log the information.
    t
| The throwable exception to log.

## setSeverity()

Sets the current severity.

#### Syntax

    public void setSeverity(int severity);

Parameter | Description
--- | ---
    severity
| The new severity setting for the logger.

## ProviderDeploymentDescriptor Class

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

#### Syntaxr

    public final class ProviderDeploymentDescriptor extends Object implements
    Serializable

##### Table 12-11 Summary of Methods of ProviderDeploymentDescriptor

Method | Descriptor
--- | ---
ProviderDeploymentDescriptor() | Constructs a new instance of a provider descriptor.
fromXML() | Builds and returns a provider descriptor from the given XML document.
getClassname() | Returns the name of the class that implements this provider.
getId() | Returns the unique id for this provider.
getOptions() | Returns the provider-specific options
getProviderType() | Returns the provider type.
setClassname() | Sets the name of the class that implements this provider.
setId() | Sets the provider id.
setOptions() | Sets the options.
setProviderType() | Sets the provider type.
toString() | Writes out the service deployment descriptor to String.
toXML() | Writes out the service deployment descriptor as XML.

## ProviderDeploymentDescriptor()

Constructs a new instance of a provider descriptor.

#### Syntax

    public ProviderDeploymentDescriptor();

## fromXML()

Builds and returns a provider descriptor from the given XML document.

#### Syntax

    public static ProviderDeploymentDescriptor fromXML( Element root);

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

## getClassname()

Returns the name of the class that implements this provider.

#### Syntax

    public String getClassname();

## getId()

Returns the unique id for this provider.

#### Syntax

    public String getId();

## getOptions()

Returns the provider-specific options, or value pairs that represent the provider-specific options for this service.

#### Syntax

    public Hashtable getOptions();

## getProviderType()

Returns the provider type.

#### Syntax

    public String getProviderType();

## setClassname()

Sets the name of the class that implements this provider.

#### Syntax

    public void setClassname( String classname);

Parameter | Description
--- | ---
    classname
| The name of the implementing class.

## setId()

Sets the provider id.

#### Syntax

    public void setId( String id);

Parameter | Description
--- | ---
    id
| The unique provider id.

## setOptions()

Sets the options.

#### Syntax

    public void setOptions( Hashtable options);

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

## setProviderType()

Sets the provider type.

#### Syntax

    public void setProviderType( String providerType);

Parameter | Description
--- | ---
    providerType
| The provider type.

## toString()

Writes out the service deployment descriptor to String.

#### Syntax

    public String toString();

## toXML()

Writes out the service deployment descriptor as XML.

#### Syntax

    public void toXML( Writer pr);

Parameter | Description
--- | ---
    pr
| The writer for the XML output.

## RequestContext 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. 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 request

- `getServiceDeploymentDescriptor` - the service deployment descriptor for the service in which the method is being invoked

- `getServiceId` - the URI of the service

- `getUserContext` - the security context describing the user invoking the method in the service

- `getMethodName` - 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.

#### Syntax

    public class RequestContext extends Object

##### Table 12-12 Summary of Methods of RequestContext

Method | Description
--- | ---
RequestContext() | Default constructor for this class.
getMethodName() | Returns the method name being invoked for this SOAP request.
getRequestEncodingStyle() | Returns the encoding style that was used on the request.
getRequestEnvelope() | Returns the envelope that represents the actual SOAP request.
getResponseBytes() | Returns the response stream for this SOAP request.
getResponseEnvelope() | Returns the envelope that represents the SOAP response.
getResponseMap() | Returns the mapping registry that must be used to serialize the SOAP response.
getServiceDeploymentDescriptor() | Returns the service deployment descriptor for the requested service.
getServiceId() | Returns the service id (URI) for this SOAP request.
getUserContext() | Returns the user context for this SOAP request.
setMethodName() | Sets the method name for this SOAP request.
setRequestEncodingStyle() | Sets the encoding style that was used on the request.
setRequestEnvelope() | Sets the envelope that represents the actual SOAP request.
setResponseBytes() | Sets the response stream for this SOAP request.
setResponseEnvelope() | Sets the envelope that represents the SOAP response.
setResponseMap() | Sets the mapping registry that must be used to serialize the SOAP response envelope.
setServiceDeploymentDescriptor | Sets the service deployment descriptor for the requested service.
setServiceId() | Sets the service id (URI) for this SOAP request.
setUserContext() | Sets the user context for this SOAP request.

## RequestContext()

Default constructor for this class.

#### Syntax

    public RequestContext();

## getMethodName()

Returns the method name being invoked for this SOAP request.

#### Syntax

    public String getMethodName();

## getRequestEncodingStyle()

Returns the encoding style that was used on the request.

#### Syntax

    public String getRequestEncodingStyle();

## getRequestEnvelope()

Returns the envelope that represents the actual SOAP request.

#### Syntax

    public Envelope getRequestEnvelope();

## getResponseBytes()

Returns the response stream for this SOAP request.

#### Syntax

    public ByteArrayOutputStream getResponseBytes();

## getResponseEnvelope()

Returns the envelope that represents the SOAP response.

#### Syntax

    public Envelope getResponseEnvelope();

Parameter | Description
--- | ---
    smr
| The mapping registry for the SOAP response envelope.

## getResponseMap()

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

#### Syntax

    public SOAPMappingRegistry getResponseMap();

## getServiceDeploymentDescriptor()

Returns the service deployment descriptor for the requested service, or `NULL` if the provider is an AutonomousProvider.

#### Syntax

    public ServiceDeploymentDescriptor getServiceDeploymentDescriptor();

## getServiceId()

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

#### Syntax

    public String getServiceId();

## getUserContext()

Returns the user context for this SOAP request.

#### Syntax

    public UserContext getUserContext();

## setMethodName()

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

#### Syntax

    public void setMethodName( String methodName);

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

## setRequestEncodingStyle()

Sets the encoding style that was used on the request.

#### Syntax

    public void setRequestEncodingStyle( String requestEncodingStyle);

Parameter | Description
--- | ---
    requestEncodingStyle
| The request encoding style.

## setRequestEnvelope()

Sets the envelope that represents the actual SOAP request.

#### Syntax

    public void setRequestEnvelope( Envelope envelope);

Parameter | Description
--- | ---
    envelope
| The SOAP envelope.

## setResponseBytes()

Sets the response stream for this SOAP request.

#### Syntax

    public void setResponseBytes( ByteArrayOutputStream bytes);

Parameter | Description
--- | ---
    bytes
| The `ByteArrayOutputStream` that contains the response.

## setResponseEnvelope()

Sets the envelope that represents the SOAP response.

#### Syntax

    public void setResponseEnvelope( Envelope envelope);

Parameter | Description
--- | ---
    envelope
| The SOAP response envelope.

## setResponseMap()

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

#### Syntax

    public void setResponseMap( SOAPMappingRegistry smr);

## setServiceDeploymentDescriptor

Sets the service deployment descriptor for the requested service.

#### Syntax

    public void setServiceDeploymentDescriptor(
                       ServiceDeploymentDescriptor serviceDeploymentDescriptor);

Parameter | Description
--- | ---
    serviceDeploymentDescriptor
| The service deployment descriptor for this request.

## setServiceId()

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

#### Syntax

    public void setServiceId( String serviceId);

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

## setUserContext()

Sets the user context for this SOAP request.

#### Syntax

    public void setUserContext( UserContext userContext);

Parameter | Description
--- | ---
    userContext
| The user context.

## ServiceDeploymentDescriptor Class

``

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

#### Syntax

    public final class ServiceDeploymentDescriptor extends Object implements
    Serializable

##### Table 12-13 Fields of ServiceDeploymentDescriptor

Field | Syntax | Description
--- | --- | ---
    SERVICE_TYPE_RPC
    public static final int
       SERVICE_TYPE_RPC
| Indicates the service is RPC based.
    SERVICE_TYPE_MESSAGE
    public static final int
       SERVICE_TYPE_MESSAGE
| Indicates the service is message based.
    SCOPE_REQUEST
    public static final int
       SCOPE_REQUEST
| Indicates that a fresh service instance should be allocated for each request.
    SCOPE_SESSION
    public static final int
       SCOPE_SESSION
| Indicates that all requests within the same session will be served by the same service instance.
    SCOPE_APPLICATION
    public static final int
       SCOPE_APPLICATION
| Indicates that all requests will be served by the same service instance.

##### Table 12-14 Summary of Methods of ServiceDeploymentDescriptor

Method | Description
--- | ---
ServiceDeploymentDescriptor() | Constructs a new service descriptor.
buildFaultRouter() | Returns the fault router that is built from the service's fault listeners.
buildSOAPMappingRegistry() | Generates an XML serialization registry from all the type mappings registered into a deployment descriptor.
buildSqlClassMap() | Generates a map from SQL type to Java Class using the type mapping information from the deployment descriptor. Throws SOAPException if failed to generate map.
fromXML() | Populates the ServiceDeploymentDescriptor with information from the given document, which is the XML representation of the descriptor.
getDefaultSMRClass() | Returns the default SOAP mapping registry class.
getFaultListener() | Returns list of class names that are fault listeners for this service.
getId() | Returns the service id, which is a URI.
getMethods() | Returns the list of methods that are provided by this service.
getProviderId() | Returns the provider id for this service.
getProviderOptions() | Returns the name-value pairs that represent the provider-specific options for this service.
getProviderType() | Returns the provider type.
getScope() | Returns the scope, which is one of the SCOPE_xxx constants.
getServiceType() | Returns the service type, which is one of the SERVICE_TYPE_xxx constants.
getSqlMap() | Returns the SQL type to Java type map.
getTypeMappings() | Returns the XML-Java type mappings, which define how to deserialize XML into Java and serialize Java into XML.
isMethodValid() | Determines if the given method is valid for this service.
setDefaultSMRClass() | Sets the default SOAP mapping registry class.
setFaultListener() | Sets the fault listener list.
setId() | Sets the service id, which must be a valid URI.
setMethods() | Sets the list of methods that are provided by this service.
setProviderId() | Sets the id of the provider for this service.
setProviderOptions() | Sets the provider-specific options.
setProviderType() | Sets the provider type.
setScope() | Sets the execution scope.
setServiceType() | Sets the service type.
setSqlMap() | Sets the map that maps from SQL type to Java type.
setTypeMappings() | Sets the XML-Java type mappings, which define how to deserialize XML into Java and serialize Java into XML.
toXML() | Writes out the service deployment descriptor as XML.
toString() | Returns a printable representation of this descriptor.

## ServiceDeploymentDescriptor()

Constructs a new service descriptor.

#### Syntax

    public ServiceDeploymentDescriptor();

## buildFaultRouter()

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

#### Syntax

    public SOAPFaultRouter buildFaultRouter();

## buildSOAPMappingRegistry()

Generates an XML serialization registry from all the type mappings registered into a deployment descriptor.

#### Syntax

    public static SOAPMappingRegistry buildSOAPMappingRegistry(
                                              ServiceDeploymentDescriptor sdd);

Parameter | Description
--- | ---
    sdd
| The service deployment descriptor.

## buildSqlClassMap()

Generates a map from SQL type to Java Class using the type mapping information from the deployment descriptor. Throws SOAPException if failed to generate map.

#### Syntax

    public static Hashtable buildSqlClassMap( ServiceDeploymentDescriptor sdd);

Parameter | Description
--- | ---
    sdd
| The service deployment descriptor to use.

## fromXML()

Populates the ServiceDeploymentDescriptor with information from the given document, which is the XML representation of the descriptor; returns this ServiceDeploymentDescriptor. Throws`IllegalArgumentException` if invalid document.

#### Syntax

    public static ServiceDeploymentDescriptor fromXML( Element root);

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

## getDefaultSMRClass()

Returns the default SOAP mapping registry class.

#### Syntax

    public String getDefaultSMRClass();

## getFaultListener()

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

#### Syntax

    public String[] getFaultListener();

## getId()

Returns the service id, which is a URI.

#### Syntax

    public String getId();

## getMethods()

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

#### Syntax

    public String[] getMethods();

## getProviderId()

Returns the provider id for this service.

#### Syntax

    public String getProviderId();

## getProviderOptions()

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

#### Syntax

    public Hashtable getProviderOptions();

## getProviderType()

Returns the provider type.

#### Syntax

    public String getProviderType();

## getScope()

Returns the scope, which is one of the `SCOPE_xxx` constants.

#### Syntax

    public int getScope();

## getServiceType()

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

#### Syntax

    public int getServiceType();

## getSqlMap()

Returns the SQL type to Java type map.

#### Syntax

    public Hashtable getSqlMap();

## getTypeMappings()

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

#### Syntax

    public TypeMapping[] getTypeMappings();

## isMethodValid()

Determines if the given method is valid for this service. Returns `TRUE` if the method is valid for this service, `FALSE` otherwise.

#### Syntax

    public boolean isMethodValid( String methodName);

## setDefaultSMRClass()

Sets the default SOAP mapping registry class.

#### Syntax

    public void setDefaultSMRClass( String defaultSMRClass);

Parameter | Description
--- | ---
    defaultSMRClass
| The default SOAP mapping registry class.

## setFaultListener()

Sets the fault listener list.

#### Syntax

    public void setFaultListener( String faultListener[]);

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

## setId()

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

#### Syntax

    public void setId( String id);

Parameter | Description
--- | ---
    id
| The service URI.

## setMethods()

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

#### Syntax

    public void setMethods( String methods[]);

Parameter | Description
--- | ---
    methods
| The list of provided methods.

## setProviderId()

Sets the id of the provider for this service.

#### Syntax

    public void setProviderId( String providerId);

Parameter | Description
--- | ---
    providerId
| The provider's id for this service.

## setProviderOptions()

Sets the provider-specific options.

#### Syntax

    public void setProviderOptions( Hashtable providerOptions);

Parameter | Description
--- | ---
    providerOptions
| The name-value pairs that represent provider-specific options.

## setProviderType()

Sets the provider type.

#### Syntax

    public void setProviderType( String providerType);

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

## setScope()

Sets the execution scope.

#### Syntax

    public void setScope( int scope);

Parameter | Description
--- | ---
    scope
| The execution scope, which is one of the `SCOPE_xxx` constants.

## setServiceType()

Sets the service type.

#### Syntax

    public void setServiceType( int serviceType);

Parameter | Description
--- | ---
    serviceType
| The service type, which is one of the `SERVICE_TYPE_xxx` constants.

## setSqlMap()

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

#### Syntax

    public void setSqlMap( Hashtable sqlMap);

Parameter | Description
--- | ---
    sqlMap
| The SQL type to Java class map.

## setTypeMappings()

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

#### Syntax

    public void setTypeMappings( TypeMapping typeMappings[]);

Parameter | Description
--- | ---
    typeMappings
| The type mappings.

## toXML()

Writes out the service deployment descriptor as XML.

#### Syntax

    public void toXML( Writer pr);

Parameter | Description
--- | ---
    pr
| The writer for the XML output.

## toString()

Returns a printable representation of this descriptor.

#### Syntax

    public String toString();

## SOAPServerContext Class

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

#### Syntax

    public class SOAPServerContext extends Object

##### Table 12-15 Summary of Methods of SOAPServerContext

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

## SOAPServerContext()

Default constructor.

#### Syntax

    public SOAPServerContext();

## getAttribute()

Returns an Object containing the value of the attribute. or `NULL` if there is no attribute by that name.

#### Syntax

    public Object getAttribute( String name);

Parameter | Description
--- | ---
name | A String specifying the name of the attribute to get.

## getAttributeNames()

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

#### Syntax

    public Enumeration getAttributeNames();

## getGlobalContext()

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

#### Syntax

    public Hashtable getGlobalContext();

## getLogger()

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

#### Syntax

    public Logger getLogger();

## removeAttribute()

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.

#### Syntax

    public void removeAttribute( String name);

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

## setAttribute()

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

#### Syntax

    public void setAttribute( String name,
                              Object object);

Parameter | Description
--- | ---
    name
| A non-null String specifying the name of the attribute.
    object
| A non-null Object representing the attribute to be bound.

## setGlobalContext ()

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

#### Syntax

    public void setGlobalContext( Hashtable globalContext);

Parameter | Description
--- | ---
    globalContext
| The global context.

## setLogger()

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

#### Syntax

    public void setLogger( Logger logger);

Parameter | Description
--- | ---
    logger
| The SOAP logger.

## UserContext Class

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. The `HttpServlet` and `HttpSession` do not really belong here, but they are required by the JavaProvider.

#### Syntax

    public class UserContext extends Object

##### Table 12-16 Summary of Methods of UserContext

Method | Description
--- | ---
UserContext() | Default constructor.
getAttribute() | Returns the attribute with the given name
getAttributeNames() | Returns an Enumeration containing the attribute names available within this SOAP context.
getCertificate() | Returns the user certificate for the user making SOAP request.
getHttpServlet() | Returns the HttpServlet that is processing the SOAP request.
getHttpSession() | Returns the HTTP session for the SOAP request
getRemoteAddress() | Returns the Internet Protocol (IP) address of the remote client that sent the request.
getRemoteHost() | Returns the host name of the remote client that sent the request.
getRequestURI() | Returns the URI of the request.
getSecureChannel() | Returns an indication whether the channel is secure.
getUsername() | Returns the protocol-specific username for the SOAP request.
removeAttribute() | Removes the attribute with the given name from the context.
setAttribute() | Binds an object to a given attribute name in this SOAP context.
setCertificate() | Sets the user certificate.
setHttpServlet() | Sets the HTTP servlet.
setHttpSession() | Sets the HTTP session.
setRemoteAddress() | Sets the remote IP address of the client.
setRemoteHost() | Sets the host name of the remote client making the SOAP request.
setRequestURI() | Sets the URI of the request.
setSecureChannel() | Sets the indicator of whether the channel is secure.
setUsername() | Sets the protocol-specific username.

## UserContext()

Default constructor.

#### Syntax

    public UserContext();

## getAttribute()

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

#### Syntax

    public Object getAttribute( String name);

Parameter | Description
--- | ---
    name
| A String specifying the name of the attribute

## getAttributeNames()

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

#### Syntax

    public Enumeration getAttributeNames();

## getCertificate()

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

#### Syntax

    public Object getCertificate();

## getHttpServlet()

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

#### Syntax

    public HttpServlet getHttpServlet();

## getHttpSession()

Returns the HTTP session for the SOAP request, or null if the session attribute is not set.

#### Syntax

    getHttpSession public HttpSession getHttpSession();

## getRemoteAddress()

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

#### Syntax

    public String getRemoteAddress();

## getRemoteHost()

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

#### Syntax

    public String getRemoteHost();

## getRequestURI()

Returns the URI of the request.

#### Syntax

    public String getRequestURI();

## getSecureChannel()

Returns an indication whether the channel is secure;`TRUE` if the channel is secure, `FALSE` otherwise.

#### Syntax

    public boolean getSecureChannel();

## getUsername()

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

#### Syntax

    public String getUsername();

## removeAttribute()

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

#### Syntax

    public void removeAttribute( String name);

Parameter | Description
--- | ---
    name
| A non-null String specifying the name of the attribute.

## setAttribute()

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

#### Syntax

    public void setAttribute( String name,
                              Object object);

Parameter | Description
--- | ---
    name
| A non-null String specifying the name of the attribute.
    object
| An non-null Object representing the attribute to be bound.

## setCertificate()

Sets the user certificate.

#### Syntax

    public void setCertificate( Object certificate);

Parameter | Description
--- | ---
    certificate
| The user certificate for the user making the SOAP request.

## setHttpServlet()

Sets the HTTP servlet.

#### Syntax

    public void setHttpServlet( HttpServlet servlet);

Parameter | Description
--- | ---
    servlet
| The HttpServlet that is processing the SOAP request.

## setHttpSession()

Sets the HTTP session.

#### Syntax

    public void setHttpSession( HttpSession session);

Parameter | Description
--- | ---
    servlet
| The HttpSession for the SOAP request.

## setRemoteAddress()

Sets the remote IP address of the client.

#### Syntax

    public void setRemoteAddress( String remoteAddress);

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

## setRemoteHost()

Sets the host name of the remote client making the SOAP request.

#### Syntax

    public void setRemoteHost( String remoteHost);

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

## setRequestURI()

Sets the URI of the request.

#### Syntax

    public void setRequestURI( String uri);

Parameter | Description
--- | ---
    uri
| Request URI.

## setSecureChannel()

Sets the indicator of whether the channel is secure.

#### Syntax

    public void setSecureChannel( boolean secureChannel);

Parameter | Description
--- | ---
    secureChannel
| `TRUE` if the channel is secure, `FALSE` otherwise.

## setUsername()

Sets the protocol-specific username.

#### Syntax

    public void setUsername( String username);

Parameter | Description
--- | ---
    username
| The protocol-specific username for the SOAP request.

## oracle.soap.transport Package

Contains the OracleSOAPTransport Interface and provides support for Oracle SOAP in the XDK for Java.

## OracleSOAPTransport Interface

This interface defines Oracle specific transport extensions.

#### Syntax

    public interface OracleSOAPTransport extends SOAPTransport

##### Table 12-17 Summary of Methods of OracleSOAPTransport

Method | Description
--- | ---
close() | Close the transport and perform any clean up.
getProperties() | Returns the connection properties.
setProperties() | Sets the connection properties.

## close()

Closes the transport and performs clean up.

#### Syntax

    public abstract void close();

## getProperties()

Returns the connection properties.

#### Syntax

    public abstract Properties getProperties();

## setProperties()

Sets the connection properties.

#### Syntax

    public abstract void setProperties( Properties prop);

Parameter | Description
--- | ---
    prop
| Connection properties.

## oracle.soap.transport.http Package

Package oracle.soap.transport.http contains OracleSOAPHTTPConnection Class, which implements `OracleSOAPTransport`. The Oracle SOAP client API supports a pluggable transport, allowing the client to easily change the transport. Available transports include HTTP and HTTPS (secure HTTP).

## OracleSOAPHTTPConnection Class

This class implements `OracleSOAPTransport`.

#### Syntax

    public class OracleSOAPHTTPConnection extends Object

##### Table 12-18 Fields of OracleSOAPHTTPConnection

Field | Syntax | Description
--- | --- | ---
    ALLOW_USER_
    INTERACTION
    public static final String
         ALLOW_USER_INTERACTION
| Property to set user interaction.
    AUTH_TYPE
    public static final String
         AUTH_TYPE
| Property used for defining http auth type, (basic/digest.
    CIPHERS
    public static final String
         CIPHERS
| Property used for defining cipher suites used for HTTPS, a colon separated list of cipher suites.
    PASSWORD
    public static final String
         PASSWORD
| Property used for defining http password.
    PROXY_AUTH_TYPE
    public static final String
         PROXY_AUTH_TYPE
| Property used for defining proxy auth type, basic/digest.
    PROXY_HOST
    public static final String
         PROXY_HOST
| Property used for defining proxy host.
    PROXY_PASSWORD
    public static final String
         PROXY_PASSWORD
| Property used for defining proxy password.
    PROXY_PORT
    public static final String
         PROXY_PORT
| Property used for defining proxy port.
    PROXY_USERNAME
    public static final String
         PROXY_USERNAME
| Property used for defining proxy username.
    STATUS_LINE
    public static final String
         STATUS_LINE
| Property used to get HTTP status line from HTTP headers, `getHeaders()`.
    USERNAME
    public static final String
         USERNAME
| Property used for defining http username.
    WALLET_LOCATION
    public static final String
         WALLET_LOCATION
| Property used for defining wallet location used for HTTPS.
    WALLET_PASSWORD
    public static final String
         WALLET_PASSWORD
| Property used for defining wallet password used for HTTPS.

##### Table 12-19 Summary of Methods of OracleSOAPHTTPConnection

Member | Description
--- | ---
OracleSOAPHTTPConnection() | Constructs a new instance of `OracleSOAPHTTPConnection` from given properties.
close() | Closes the connection.
finalize() | Finalizes the connection.
getHeaders() | Returns a hashtable containing all the headers to headers generated by the protocol.
getProperties() | Returns the connection properties.
receive() | Returns a buffered reader from which the received response is read.
send() | Requests that an envelope be posted to the given URL.
setProperties() | Sets the connection properties.

## OracleSOAPHTTPConnection()

Constructs a new instance of `OracleSOAPHTTPConnection` from given properties.

#### Syntax

    public OracleSOAPHTTPConnection( Properties prop);

Parameter | Description
--- | ---
    prop
| Connection properties.

## close()

Closes the connection. Once this method has been called, the `BufferedReader` returned by `receive` method may be closed and should not be used. Calling this method will free resources without having the garbage collector run.

#### Syntax

    public void close();

## finalize()

Finalizes the connection.

#### Syntax

    public void finalize();

## getHeaders()

Returns a hashtable containing all the headers to headers generated by the protocol. SOAP clients should not use this method directly but use `org.apache.soap.rpc.Call()` instead.

#### Syntax

    public Hashtable getHeaders();

## getProperties()

Returns the connection properties.

#### Syntax

    public Properties getProperties();

## receive()

Returns a buffered reader from which the received response is read, or `null` if the response is not received. SOAP clients should not use this method directly but use `org.apache.soap.rpc.Call()` instead.

#### Syntax

    public BufferedReader receive();

## send()

Requests that an envelope be posted to the given URL. The response (if any) is retrieved by calling the `receive()` function. SOAP clients should not use this method directly, but should instead use `org.apache.soap.rpc.Call`(). Throws `SOAPException` with appropriate reason code if there are errors.

#### Syntax

    public void send( URL sendTo,
                      String action,
                      Hashtable headers,
                      Envelope env,
                      SOAPMappingRegistry smr,
                      int timeout);

Parameter | Description
--- | ---
    sendTo
| The URL to which the envelope is sent.
    action
| The SOAPAction header field value.
    headers
| Any other header fields to go to as protocol headers.
    env
| The envelope to send.
    smr
| The XML<->Java type mapping registry, passed on.
    ctx
| The request SOAPContext.

## setProperties()

Sets the connection properties.

#### Syntax

    public void setProperties( Properties prop);

Parameter | Description
--- | ---
    prop
| Connection properties.

## oracle.soap.util.xml Package

Package oracle.soap.util.xml contains the XmlUtils Class.

## XmlUtils Class

The XmlUtils class implements Oracle- specific transport extensions in OracleSOAPTransport. The APIs of this class enable SOAP clients to generate the XML documents that compose a request for a SOAP service, and to handle the SOAP response. Oracle SOAP processes requests from any client that sends a valid SOAP request.

#### Syntax

    public class XmlUtils

##### Table 12-20 Summary of Methods of XmlUtils

Member | Description
--- | ---
XmlUtils() | Default constructor.
extractServiceId() | Returns the service id from the envelope.
extractMethodName() | Returns the method name from the envelope.
parseXml() | Parses the given XML file and returns the XML document.
createDocument() | Creates a Document.

## XmlUtils()

Default constructor.

#### Syntax

    public XmlUtils();

## extractServiceId()

Returns the service id from the envelope. It is the namespace URI of the first body entry. Throws `SOAPException` if unable to get service URI from envelope.

#### Syntax

    public static String extractServiceId(Envelope envelope);

Parameter | Description
--- | ---
    envelope
| The SOAP envelope.

## extractMethodName()

Returns the method name from the envelope. It is the name of the first body entry. Throws `SOAPException` if unable to get method name from envelope.

#### Syntax

    public static String extractMethodName( Envelope envelope);

Parameter | Description
--- | ---
    envelope
| The SOAP envelope.

## parseXml()

Parses the given XML file and returns the XML document. Throws `SOAPException` if file not found, there is a parse error, or I/O errors. The options are described in the following table.

Syntax | Description
--- | ---
    public static Document parseXml(
         String filename);
| Parses the given XML file and returns the XML document, given the filename.
    public static Document parseXml(
         Reader reader);
| Parses the given XML file and returns the XML document from a reader.
    public static Document parseXml(
         InputStream is);
| Parses the given XML file and returns the XML document from an input stream.

Parameter | Description
--- | ---
    filename
| The full path to the XML file.
    reader
| Reader for XML.
    is
| The input stream source.

## createDocument()

Creates a `Document`. Throws a `SOAPException` if cannot create `Document`.

#### Syntax

    public static Document createDocument();

| Copyright © 2001, 2003 Oracle Corporation. All Rights Reserved. |
Home | Contents | Index