Skip Headers

Oracle9i XML API Reference - XDK and Oracle XML DB
Release 2 (9.2)

Part Number A96616-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

11
Simple Object Access Protocol (SOAP) 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.

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 and classes:


oracle.soap.server Package


Description of oracle.soap.server

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 11-1 lists the interfaces and classes that provide support for Oracle SOAP in the XDK for Java.

Table 11-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


Description of Handler

Handler defines the interface for a pluggable handler in the SOAP server. This class does not imply any policies about when the handler in invoked.

A handler implementation must:


Syntax of Handler

oracle.soap.server.Handler

public interface Handler

Fields of Handler

Table 11-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.


Methods of Handler

Table 11-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()

Description

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

Description

Returns this handler's name.

Syntax

public abstract String getName();

getOptions()

Description

Returns options that are specific to the handler implementation.

Syntax

public abstract Properties getOptions();

init()

Description

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

Description

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

Description

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

Description

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


Description of 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:


Syntax of Provider

public interface Provider

Interface oracle.soap.server.Provider

Methods of Provider

Table 11-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()

Description

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

Description

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

Syntax

public abstract String getId();

init()

Description

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, which contains the logger for informational messages.

invoke()

Description

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

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


ProviderManager Interface


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


Syntax of ProviderManager

public interface ProviderManager

Interface oracle.soap.server.ProviderManager

Methods of ProviderManager

Table 11-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()

Description

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

Description

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

Syntax

public abstract void destroy();

getRequiredRequestURI()

Description

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

Description

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

Description

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

Description

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

Description

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

Description

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


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


Syntax of ServiceManager

public interface ServiceManager

Interface oracle.soap.server.ServiceManager


Methods of Servicemanager

Table 11-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()

Description

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

Description

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

Description

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

Syntax

public abstract void destroy();

init()

Description

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

list()

Description

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

Description

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

Description

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


Description of ContainerContext

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 of ContainerContext

public class ContainerContext extends Object

java.lang.Object
   |
   +----oracle.soap.server.ContainerContext


Fields of ContainerContext

Table 11-7 Fields of ContainerContext  
Field Syntax Description

SERVLET_CONTAINER

public static final String

SERVLET_CONTAINER

The value for a servlet container type.


Methods of ContainerContext

Table 11-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()

Description

Class constructor.

Syntax

public ContainerContext();

getAttribute()

Description

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

Description

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

Syntax

public Enumeration getAttributeNames();

getContainerType()

Description

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

Syntax

public String getContainerType();

getHttpServlet()

Description

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

Syntax

public HttpServlet getHttpServlet();

removeAttribute()

Description

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

Description

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

Description

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

Description

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


Description of 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:

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 of Logger

Class oracle.soap.server.Logger

public abstract class Logger extends Object

java.lang.Object
   |
   +----oracle.soap.server.Logger


Fields of Logger

Table 11-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 11-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()

Description

Class constructor.

Syntax

public Logger();

getSeverity()

Description

Returns the current severity setting for the logger.

Syntax

public int getSeverity();

getSeverityName()

Description

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

Description

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

Description

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

Description

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

Description

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

Description

Sets the current severity.

Syntax

public void setSeverity(int severity);

Parameter Description

severity

The new severity setting for the logger.


ProviderDeploymentDescriptor Class


Description of ProviderDeploymentDescriptor

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.


Syntax of ProviderDeploymentDescriptor

public final class ProviderDeploymentDescriptor extends Object implements 
Serializable

java.lang.Object
   |
   +----oracle.soap.server.ProviderDeploymentDescriptor


Methods of ProviderDeploymentDescriptor

Table 11-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()

Description

Constructs a new instance of a provider descriptor.

Syntax

public ProviderDeploymentDescriptor();

fromXML()

Description

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

Description

Returns the name of the class that implements this provider.

Syntax

public String getClassname();

getId()

Description

Returns the unique id for this provider.

Syntax

public String getId();

getOptions()

Description

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

Syntax

public Hashtable getOptions();

getProviderType()

Description

Returns the provider type.

Syntax

public String getProviderType();

setClassname()

Description

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

Description

Sets the provider id.

Syntax

public void setId( String id);

Parameter Description

id

The unique provider id.

setOptions()

Description

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

Description

Sets the provider type.

Syntax

public void setProviderType( String providerType);

Parameter Description

providerType

The provider type.

toString()

Description

Writes out the service deployment descriptor to String.

Syntax

public String toString();

toXML()

Description

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


Description of RequestContext

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:


Syntax of RequestContext

public class RequestContext extends Object

java.lang.Object
   |
   +----oracle.soap.server.RequestContext


Methods of RequestContext

Table 11-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()

Description

Default constructor for this class.

Syntax

public RequestContext();

getMethodName()

Description

Returns the method name being invoked for this SOAP request.

Syntax

public String getMethodName();

getRequestEncodingStyle()

Description

Returns the encoding style that was used on the request.

Syntax

public String getRequestEncodingStyle();

getRequestEnvelope()

Description

Returns the envelope that represents the actual SOAP request.

Syntax

public Envelope getRequestEnvelope();

getResponseBytes()

Description

Returns the response stream for this SOAP request.

Syntax

public ByteArrayOutputStream getResponseBytes();

getResponseEnvelope()

Description

Returns the envelope that represents the SOAP response.

Syntax

public Envelope getResponseEnvelope();

Parameter Description

smr

The mapping registry for the SOAP response envelope.

getResponseMap()

Description

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

Syntax

public SOAPMappingRegistry getResponseMap();

getServiceDeploymentDescriptor()

Description

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

Syntax

public ServiceDeploymentDescriptor getServiceDeploymentDescriptor();

getServiceId()

Description

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

Syntax

public String getServiceId();

getUserContext()

Description

Returns the user context for this SOAP request.

Syntax

public UserContext getUserContext();

setMethodName()

Description

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

Description

Sets the encoding style that was used on the request.

Syntax

public void setRequestEncodingStyle( String requestEncodingStyle);

Parameter Description

requestEncodingStyle

The request encoding style.

setRequestEnvelope()

Description

Sets the envelope that represents the actual SOAP request.

Syntax

public void setRequestEnvelope( Envelope envelope);

Parameter Description

envelope

The SOAP envelope.

setResponseBytes()

Description

Sets the response stream for this SOAP request.

Syntax

public void setResponseBytes( ByteArrayOutputStream bytes);

Parameter Description

bytes

The ByteArrayOutputStream that contains the response.

setResponseEnvelope()

Description

Sets the envelope that represents the SOAP response.

Syntax

public void setResponseEnvelope( Envelope envelope);

Parameter Description

envelope

The SOAP response envelope.

setResponseMap()

Description

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

Syntax

public void setResponseMap( SOAPMappingRegistry smr);

setServiceDeploymentDescriptor

Description

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

Description

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

Description

Sets the user context for this SOAP request.

Syntax

public void setUserContext( UserContext userContext);

Parameter Description

userContext

The user context.


ServiceDeploymentDescriptor Class


Description of ServiceDeploymentDescriptor

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 of ServiceDeploymentDescriptor

public final class ServiceDeploymentDescriptor extends Object implements 
Serializable

java.lang.Object
   |
   +----oracle.soap.server.ServiceDeploymentDescriptor


Fields of ServiceDeploymentDescriptor

Table 11-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.


Methods of ServiceDeploymentDescriptor

Table 11-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()

Description

Constructs a new service descriptor.

Syntax

public ServiceDeploymentDescriptor();

buildFaultRouter()

Description

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

Syntax

public SOAPFaultRouter buildFaultRouter();

buildSOAPMappingRegistry()

Description

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

Description

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

Description

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

Description

Returns the default SOAP mapping registry class.

Syntax

public String getDefaultSMRClass();

getFaultListener()

Description

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

Syntax

public String[] getFaultListener();

getId()

Description

Returns the service id, which is a URI.

Syntax

public String getId();

getMethods()

Description

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

Syntax

public String[] getMethods();

getProviderId()

Description

Returns the provider id for this service.

Syntax

public String getProviderId();

getProviderOptions()

Description

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

Syntax

public Hashtable getProviderOptions();

getProviderType()

Description

Returns the provider type.

Syntax

public String getProviderType();

getScope()

Description

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

Syntax

public int getScope();

getServiceType()

Description

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

Syntax

public int getServiceType();

getSqlMap()

Description

Returns the SQL type to Java type map.

Syntax

public Hashtable getSqlMap();

getTypeMappings()

Description

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

Syntax

public TypeMapping[] getTypeMappings();

isMethodValid()

Description

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

Description

Sets the default SOAP mapping registry class.

Syntax

public void setDefaultSMRClass( String defaultSMRClass);

Parameter Description

defaultSMRClass

The default SOAP mapping registry class.

setFaultListener()

Description

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

Description

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

Syntax

public void setId( String id);

Parameter Description

id

The service URI.

setMethods()

Description

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

Description

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

Description

Sets the provider-specific options.

Syntax

public void setProviderOptions( Hashtable providerOptions);

Parameter Description

providerOptions

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

setProviderType()

Description

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

Description

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

Description

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

Description

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

Description

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

Description

Writes out the service deployment descriptor as XML.

Syntax

public void toXML( Writer pr);

Parameter Description

pr

The writer for the XML output.

toString()

Description

Returns a printable representation of this descriptor.

Syntax

public String toString();

SOAPServerContext Class


Description of SOAPServerContext

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


Syntax of SOAPServerContext

public class SOAPServerContext extends Object

java.lang.Object
   |
   +----oracle.soap.server.SOAPServerContext


Methods of SOAPServerContext

Table 11-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()

Description

Default constructor.

Syntax

public SOAPServerContext();

getAttribute()

Description

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

Description

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

Syntax

public Enumeration getAttributeNames();

getGlobalContext()

Description

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

Syntax

public Hashtable getGlobalContext();

getLogger()

Description

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

Syntax

public Logger getLogger();

removeAttribute()

Description

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

Description

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

Description

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

Syntax

public void setGlobalContext( Hashtable globalContext);

Parameter Description

globalContext

The global context.

setLogger()

Description

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


Description of UserContext

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.


Syntax of UserContext

public class UserContext extends Object

java.lang.Object
   |
   +----oracle.soap.server.UserContext


Methods of UserContext

Table 11-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()

Description

Default constructor.

Syntax

public UserContext();

getAttribute()

Description

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

Description

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

Syntax

public Enumeration getAttributeNames();

getCertificate()

Description

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

Syntax

public Object getCertificate();

getHttpServlet()

Description

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

Syntax

public HttpServlet getHttpServlet();

getHttpSession()

Description

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

Syntax

getHttpSession public HttpSession getHttpSession();

getRemoteAddress()

Description

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

Syntax

public String getRemoteAddress();

getRemoteHost()

Description

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

Syntax

public String getRemoteHost();

getRequestURI()

Description

Returns the URI of the request.

Syntax

public String getRequestURI();

getSecureChannel()

Description

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

Syntax

public boolean getSecureChannel();

getUsername()

Description

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

Syntax

public String getUsername();

removeAttribute()

Description

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

Description

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

Description

Sets the user certificate.

Syntax

public void setCertificate( Object certificate);

Parameter Description

certificate

The user certificate for the user making the SOAP request.

setHttpServlet()

Description

Sets the HTTP servlet.

Syntax

public void setHttpServlet( HttpServlet servlet);

Parameter Description

servlet

The HttpServlet that is processing the SOAP request.

setHttpSession()

Description

Sets the HTTP session.

Syntax

public void setHttpSession( HttpSession session);

Parameter Description

servlet

The HttpSession for the SOAP request.

setRemoteAddress()

Description

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

Description

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

Description

Sets the URI of the request.

Syntax

public void setRequestURI( String uri);

Parameter Description

uri

Request URI.

setSecureChannel()

Description

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

Description

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


Description of oracle.soap.transport

This package contains the OracleSOAPTransport Interface, which provides support for Oracle SOAP in the XDK for Java.


OracleSOAPTransport Interface


Description of OracleSOAPTransport

This interface defines Oracle specific transport extensions.


Syntax of OracleSOAPTransport

oracle.soap.transport.OracleSOAPTransport

public interface OracleSOAPTransport extends SOAPTransport

Methods of OracleSOAPTransport

Table 11-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()

Description

Closes the transport and performs clean up.

Syntax

public abstract void close();

getProperties()

Description

Returns the connection properties.

Syntax

public abstract Properties getProperties();

setProperties()

Description

Sets the connection properties.

Syntax

public abstract void setProperties( Properties prop);

Parameter Description

prop

Connection properties.


oracle.soap.transport.http Package


Description of oracle.soap.transport.http

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


Description of OracleSOAPHTTPConnection

This class implements OracleSOAPTransport.


Syntax of OracleSOAPHTTPConnection

public class OracleSOAPHTTPConnection extends Object

java.lang.Object
   |
   +----oOracle.soap.transport.http.OracleSOAPHTTPConnection


Fields of OracleSOAPHTTPConnection

Table 11-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.


Methods of OracleSOAPHTTPConnection

Table 11-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()

Description

Constructs a new instance of OracleSOAPHTTPConnection from given properties.

Syntax

public OracleSOAPHTTPConnection( Properties prop);

Parameter Description

prop

Connection properties.

close()

Description

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

Description

Finalizes the connection.

Syntax

public void finalize();

getHeaders()

Description

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

Description

Returns the connection properties.

Syntax

public Properties getProperties();

receive()

Description

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

Description

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

Description

Sets the connection properties.

Syntax

public void setProperties( Properties prop);

Parameter Description

prop

Connection properties.


oracle.soap.util.xml Package


Description of oracle.soap.util.xml

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


XmlUtils Class


Description of XmlUtils

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 of XmlUtils

public class XmlUtils

java.lang.Object
   |
   +----oracle.soap.util.xml.XmlUtils


Methods of XmlUtils

Table 11-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()

Description

Default constructor.

Syntax

public XmlUtils();

extractServiceId()

Description

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

Description

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

Description

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

Description

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

Syntax

public static Document createDocument();

Go to previous page Go to next page
Oracle
Copyright © 2001, 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