Oracle9i XML API Reference - XDK and Oracle XML DB Release 2 (9.2) Part Number A96616-01 |
|
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:
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.
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:
oracle.soap.server.Handler public interface Handler
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.
public abstract void destroy();
Returns this handler's name.
public abstract String getName();
Returns options that are specific to the handler implementation.
public abstract Properties getOptions();
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.
public abstract void init( SOAPServerContext ssc);
Parameter | Description |
---|---|
ssc |
The SOAP server context, which contains the logger for informational messages. |
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.
public abstract void invoke( int chainType, RequestContext requestContext);
Sets the name of the handler. This method must be called before init()
.
public abstract void setName( String name);
Parameter | Description |
---|---|
name |
The name of the handler instance. |
Sets the options for the handler for subsequent use by init. This method must be called before init()
.
public abstract void setOptions( Properties options);
Parameter | Description |
---|---|
options |
Options that are specific to the handler implementation. |
Provider defines the capabilities that must be supported for each type of service provider, such as Java class or stored procedure. Providers are responsible for service authorization, and parameter unmarshalling/marshalling.
Providers, aka provider instances, must be deployed to the SOAP handler. Each provider deployment must define the provider name, Java classname that implements the provider (which must be an implementation of this interface), and any number of provider-specific key-value pairs. Given the provider deployment information, the SOAP handler will interact with the providers solely through this interface.
The SOAP handler will create one instance for each deployed provider instance. It is possible to have one or more instances of each provider implementation (which is not to say that is necessarily recommended). In any event, each instance of a provider must be able to handle requests concurrently.
A provider implementation must:
public interface Provider
Interface oracle.soap.server.Provider
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.
public abstract void destroy();
Returns this providers name, which is unique within the SOAP handler.
public abstract String getId();
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.
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. |
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.
public abstract void invoke( RequestContext requestContext);
Parameter | Description |
---|---|
requestContext |
The RequestContext that contains everything the provider needs to process the request. |
Provider Manager defines the interface to manage providers. The provider manager is used by the SOAP engine to deploy providers, undeploy providers, and access provider deployment information. The provider manager may cache deployment information and is responsible to maintain the cache.
The HTTP server provides security for the provider manager. The provider manager can be configured with a URL that requests must be made to in order for the request to be accepted. If a SOAP request for the provider manager is made to any other URL, the request will be rejected. This URL should be an alias to the SOAP servlet, and HTTP security can be set to control which users can post to the URL.
public interface ProviderManager Interface oracle.soap.server.ProviderManager
Deploys the given provider. Throws SOAPException
if unable to deploy.
public abstract void deploy(ProviderDeploymentDescriptor providerId);
Parameter | Description |
---|---|
providerId |
The id of the provider to deploy. |
Cleans up the provider manager. Throws SOAPException
if unable to cleanup the provider manager.
public abstract void destroy();
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.
public abstract String getRequiredRequestURI();
Initializes the provider manager. Throws SOAPException
if unable to access the deployment information.
public abstract void init(Properties options);
Parameter | Description |
---|---|
options |
The options required to setup access to the deployment information. |
Returns an array of provider ids for all providers that have been deployed. Throws SOAPException
if unable to list provider ids.
public abstract String[] list();
Returns the deployment descriptor for the given provider. Throws SOAPException
if the provider is not found.
public abstract ProviderDeploymentDescriptor query( String providerId);
Parameter | Description |
---|---|
providerId |
The id of the provider. |
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.
public abstract void setServiceManager( ServiceManager serviceManager);
Parameter | Description |
---|---|
providerManager |
The provider manager that is managing provider deployment information for the SOAP server. |
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.
public abstract ProviderDeploymentDescriptor undeploy( String providerId);
Parameter | Description |
---|---|
providerId |
The id of the provider to undeploy. |
Service Manager defines the interface to manage services. The Service Manager is used by the SOAP engine to deploy services, undeploy services, and to access service deployment information. The Service Manager may cache deployment information and is responsible for maintaining the cache.
The HTTP server provides security for the service manager. The service manager can be configured with a URL that requests must be made to in order for the request to be accepted. If a SOAP request for the service manager is made to any other URL, the request will be rejected. This URL should be an alias to the SOAP servlet, and HTTP security can be set to control which users can post to the specified URL.
public interface ServiceManager Interface oracle.soap.server.ServiceManager
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.
public abstract String getRequiredRequestURI();
Deploys the given service. Throws SOAPException
if unable to deploy.
public abstract void deploy(ServiceDeploymentDescriptor sd);
Parameter | Description |
---|---|
sd |
The service descriptor for the service to deploy. |
Cleans up the service manager. Throws SOAPException
if unable to cleanup the service manager.
public abstract void destroy();
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.
public abstract void init( Properties options, ProviderManager providerManager);
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.
public abstract String[] list();
Returns the deployment descriptor for the given service. Throws SOAPException
if the service is not found.
public abstract ServiceDeploymentDescriptor query( String serviceId);
Parameter | Description |
---|---|
serviceId |
The unique URI of the service. |
Undeploys the given service, and returns its descriptor. Throws SOAPException
if the service is not found or failed to undeploy.
public abstract ServiceDeploymentDescriptor undeploy( String serviceId);
Parameter | Description |
---|---|
serviceId |
The URI of the service to undeploy. |
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.
public class ContainerContext extends Object java.lang.Object | +----oracle.soap.server.ContainerContext
Field | Syntax | Description |
---|---|---|
SERVLET_CONTAINER |
SERVLET_CONTAINER |
The value for a servlet container type. |
Class constructor.
public ContainerContext();
Returns the attribute with the given name, or NULL
if there is no attribute by that name.
public Object getAttribute( String name);
Parameter | Description |
---|---|
name |
A String specifying the name of the attribute. |
Returns an Enumeration
containing the attribute names available within this SOAP context.
public Enumeration getAttributeNames();
Returns the container type in which the SOAP server is running.
public String getContainerType();
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.
public HttpServlet getHttpServlet();
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
.
public void removeAttribute( String name);
Parameter | Description |
---|---|
name |
A String specifying the name of the attribute to be removed. |
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
.
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. |
Sets the container type.
public void setContainerType( String containerType);
Parameter | Description |
---|---|
containerType |
The type of container in which the SOAP server is running. |
Sets the HTTP servlet for a SOAP server running in a SERVLET_CONTAINER
type of container.
public void setHttpServlet(HttpServlet servlet);
Parameter | Description |
---|---|
servlet |
The HttpServlet that is processing the SOAP request. |
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.
Class oracle.soap.server.Logger public abstract class Logger extends Object java.lang.Object | +----oracle.soap.server.Logger
Class constructor.
public Logger();
Returns the current severity setting for the logger.
public int getSeverity();
Returns the severity name associated with the given severity.
protected final String getSeverityName( int severity);
Parameter | Description |
---|---|
severity |
The severity level ( |
Returns the severity value associated with the given severity name.
protected final int getSeverityValue( String severityName);
Parameter | Description |
---|---|
severityName |
The name of the severity level, such as error. |
Initializes of the logger (one-time only) with its configuration parameters. Throws SOAPException
if unable to initialize the logger.
public abstract void init( Properties options, ContainerContext context);
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.
public boolean isLoggable( int severity);
Parameter | Description |
---|---|
severity |
The severity level to check. |
Logs messages. The options are described in the following table.
Parameter | Description |
---|---|
msg |
The message to log. |
severity |
The severity at which to log the information. |
t |
The throwable exception to log. |
Sets the current severity.
public void setSeverity(int severity);
Parameter | Description |
---|---|
severity |
The new severity setting for the logger. |
ProviderDeploymentDescriptor
defines the deployment information for a specific provider. Different providers may be deployed using the same implementation and be distinguished only by their provider descriptor.
public final class ProviderDeploymentDescriptor extends Object implements Serializable java.lang.Object | +----oracle.soap.server.ProviderDeploymentDescriptor
Constructs a new instance of a provider descriptor.
public ProviderDeploymentDescriptor();
Builds and returns a provider descriptor from the given XML document.
public static ProviderDeploymentDescriptor fromXML( Element root);
Parameter | Description |
---|---|
root |
The root of the document that represents the XML provider descriptor. |
Returns the name of the class that implements this provider.
public String getClassname();
Returns the unique id for this provider.
public String getId();
Returns the provider-specific options, or value pairs that represent the provider-specific options for this service.
public Hashtable getOptions();
Returns the provider type.
public String getProviderType();
Sets the name of the class that implements this provider.
public void setClassname( String classname);
Parameter | Description |
---|---|
classname |
The name of the implementing class. |
Sets the provider id.
public void setId( String id);
Parameter | Description |
---|---|
id |
The unique provider id. |
Sets the options.
public void setOptions( Hashtable options);
Parameter | Description |
---|---|
options |
The name-value pairs that represent the provider implementation-specific options for this service. |
Sets the provider type.
public void setProviderType( String providerType);
Parameter | Description |
---|---|
providerType |
The provider type. |
Writes out the service deployment descriptor to String.
public String toString();
Writes out the service deployment descriptor as XML.
public void toXML( Writer pr);
Parameter | Description |
---|---|
pr |
The writer for the XML output. |
RequestContext defines all of the context for a SOAP request, including information that is passed to the provider and information that the provider must set before returning. Note that the provider is given the request Envelope and is therefore responsible to unmarshall the request parameters. Similarly, the provider is required to marshall the response, although the response envelope must also be set by the provider, as it may be needed by a pluggable handler. The following information is provided by the SOAP engine to the Provider, meaning that the provider can utilize this information in Provider.invoke()
:
getEnvelope
- the envelope containing the requestgetServiceDeploymentDescriptor
- the service deployment descriptor for the service in which the method is being invokedgetServiceId
- the URI of the servicegetUserContext
- the security context describing the user invoking the method in the servicegetMethodName
- the name of the method being invoked in the service.The following information must be given by the Provider to the SOAP engine:
setResponseBytes
- this is the marshalled response. Given a Response, it can be created by building the response envelope and then marshalling the envelope.setResponseEnvelope
- this is the response envelope, which is logically equivalent to the response bytes.getRequestEncodingStyle
- the encoding style to use for the response in case of an error (if not set, defaults to Constants.NS_URI_SOAP_ENC, which is SOAP encoding). If the provider cares about this, it should set this value as soon as it can in case of an exception. The provider might use the same encoding as the request or as one of the parameters.public class RequestContext extends Object java.lang.Object | +----oracle.soap.server.RequestContext
Default constructor for this class.
public RequestContext();
Returns the method name being invoked for this SOAP request.
public String getMethodName();
Returns the encoding style that was used on the request.
public String getRequestEncodingStyle();
Returns the envelope that represents the actual SOAP request.
public Envelope getRequestEnvelope();
Returns the response stream for this SOAP request.
public ByteArrayOutputStream getResponseBytes();
Returns the envelope that represents the SOAP response.
public Envelope getResponseEnvelope();
Parameter | Description |
---|---|
smr |
The mapping registry for the SOAP response envelope. |
Returns the mapping registry that must be used to serialize the SOAP response.
public SOAPMappingRegistry getResponseMap();
Returns the service deployment descriptor for the requested service, or NULL
if the provider is an AutonomousProvider.
public ServiceDeploymentDescriptor getServiceDeploymentDescriptor();
Returns the service id (URI) for this SOAP request.
public String getServiceId();
Returns the user context for this SOAP request.
public UserContext getUserContext();
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.
public void setMethodName( String methodName);
Parameter | Description |
---|---|
methodName |
The method name that is being invoked in the service. |
Sets the encoding style that was used on the request.
public void setRequestEncodingStyle( String requestEncodingStyle);
Parameter | Description |
---|---|
requestEncodingStyle |
The request encoding style. |
Sets the envelope that represents the actual SOAP request.
public void setRequestEnvelope( Envelope envelope);
Parameter | Description |
---|---|
envelope |
The SOAP envelope. |
Sets the response stream for this SOAP request.
public void setResponseBytes( ByteArrayOutputStream bytes);
Parameter | Description |
---|---|
bytes |
The ByteArrayOutputStream that contains the response. |
Sets the envelope that represents the SOAP response.
public void setResponseEnvelope( Envelope envelope);
Parameter | Description |
---|---|
envelope |
The SOAP response envelope. |
Sets the mapping registry that must be used to serialize the SOAP response envelope.
public void setResponseMap( SOAPMappingRegistry smr);
Sets the service deployment descriptor for the requested service.
public void setServiceDeploymentDescriptor( ServiceDeploymentDescriptor serviceDeploymentDescriptor);
Parameter | Description |
---|---|
serviceDeploymentDescriptor |
The service deployment descriptor for this request. |
Sets the service id (URI) for this SOAP request.
public void setServiceId( String serviceId);
Parameter | Description |
---|---|
serviceId |
The URI for the service to which this request is directed. |
Sets the user context for this SOAP request.
public void setUserContext( UserContext userContext);
Parameter | Description |
---|---|
userContext |
The user context. |
ServiceDeploymentDescriptor
defines the deployment information for a SOAP service, independent of its provider type. The class supports any number of named provider options, which allows the descriptor to be easily extended (without code changes) for new types of providers.
public final class ServiceDeploymentDescriptor extends Object implements Serializable java.lang.Object | +----oracle.soap.server.ServiceDeploymentDescriptor
Constructs a new service descriptor.
public ServiceDeploymentDescriptor();
Returns the fault router that is built from the service's fault listeners.
public SOAPFaultRouter buildFaultRouter();
Generates an XML serialization registry from all the type mappings registered into a deployment descriptor.
public static SOAPMappingRegistry buildSOAPMappingRegistry( ServiceDeploymentDescriptor sdd);
Parameter | Description |
---|---|
sdd |
The service deployment descriptor. |
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.
public static Hashtable buildSqlClassMap( ServiceDeploymentDescriptor sdd);
Parameter | Description |
---|---|
sdd |
The service deployment descriptor to use. |
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.
public static ServiceDeploymentDescriptor fromXML( Element root);
Parameter | Description |
---|---|
root |
The root of the XML document that represents the service descriptor. |
Returns the default SOAP mapping registry class.
public String getDefaultSMRClass();
Returns list of class names that are fault listeners for this service.
public String[] getFaultListener();
Returns the service id, which is a URI.
public String getId();
Returns the list of methods that are provided by this service.
public String[] getMethods();
Returns the provider id for this service.
public String getProviderId();
Returns the name-value pairs that represent the provider-specific options for this service.
public Hashtable getProviderOptions();
Returns the provider type.
public String getProviderType();
Returns the scope, which is one of the SCOPE_xxx
constants.
public int getScope();
Returns the service type, which is one of the SERVICE_TYPE_xxx constants.
public int getServiceType();
Returns the SQL type to Java type map.
public Hashtable getSqlMap();
Returns the XML-Java type mappings, which define how to deserialize XML into Java and serialize Java into XML.
public TypeMapping[] getTypeMappings();
Determines if the given method is valid for this service. Returns TRUE
if the method is valid for this service, FALSE
otherwise.
public boolean isMethodValid( String methodName);
Sets the default SOAP mapping registry class.
public void setDefaultSMRClass( String defaultSMRClass);
Parameter | Description |
---|---|
defaultSMRClass |
The default SOAP mapping registry class. |
Sets the fault listener list.
public void setFaultListener( String faultListener[]);
Parameter | Description |
---|---|
faultListener |
The list of class names that are fault listeners for this service. |
Sets the service id, which must be a valid URI.
public void setId( String id);
Parameter | Description |
---|---|
id |
The service URI. |
Sets the list of methods that are provided by this service.
public void setMethods( String methods[]);
Parameter | Description |
---|---|
methods |
The list of provided methods. |
Sets the id of the provider for this service.
public void setProviderId( String providerId);
Parameter | Description |
---|---|
providerId |
The provider's id for this service. |
Sets the provider-specific options.
public void setProviderOptions( Hashtable providerOptions);
Parameter | Description |
---|---|
providerOptions |
The name-value pairs that represent the provider-specific options for this service. |
Sets the provider type.
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). |
Sets the execution scope.
public void setScope( int scope);
Parameter | Description |
---|---|
scope |
The execution scope, which is one of the |
Sets the service type.
public void setServiceType( int serviceType);
Parameter | Description |
---|---|
serviceType |
The service type, which is one of the |
Sets the map that maps from SQL type to Java type.
public void setSqlMap( Hashtable sqlMap);
Parameter | Description |
---|---|
sqlMap |
The SQL type to Java class map. |
Sets the XML-Java type mappings, which define how to deserialize XML into Java and serialize Java into XML.
public void setTypeMappings( TypeMapping typeMappings[]);
Parameter | Description |
---|---|
typeMappings |
The type mappings. |
Writes out the service deployment descriptor as XML.
public void toXML( Writer pr);
Parameter | Description |
---|---|
pr |
The writer for the XML output. |
Returns a printable representation of this descriptor.
public String toString();
SOAPServerContext defines the context of the SOAP server that is independent of the type of container in which the server is running.
public class SOAPServerContext extends Object java.lang.Object | +----oracle.soap.server.SOAPServerContext
Default constructor.
public SOAPServerContext();
Returns an Object containing the value of the attribute. or NULL
if there is no attribute by that name.
public Object getAttribute( String name);
Parameter | Description |
---|---|
name |
A String specifying the name of the attribute to get. |
Returns an Enumeration containing the attribute names available within this SOAP context.
public Enumeration getAttributeNames();
Returns the global context that contains SOAP server-wide objects, or null if the attribute is not set.
public Hashtable getGlobalContext();
Returns the SOAP logger, which is used to log informational and debug messages.
public Logger getLogger();
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.
public void removeAttribute( String name);
Parameter | Description |
---|---|
name |
A String specifying the name of the attribute to be removed. |
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
.
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. |
Sets the global context, which contains SOAP server-wide objects.
public void setGlobalContext( Hashtable globalContext);
Parameter | Description |
---|---|
globalContext |
The global context. |
Sets the logger, which is used for text-based logging of informational and debug messages.
public void setLogger( Logger logger);
Parameter | Description |
---|---|
logger |
The SOAP logger. |
UserContext defines the user context for a SOAP service request. Several attributes are pre-defined, and set and get methods are provided for those. In addition, the provider may define additional attributes using getAttribute and setAttribute.
Note that the HttpServlet
and HttpSession
do not really belong here, but they are required by the JavaProvider.
public class UserContext extends Object java.lang.Object | +----oracle.soap.server.UserContext
Default constructor.
public UserContext();
Returns the attribute with the given name, or NULL
if there is no attribute by that name.
public Object getAttribute( String name);
Parameter | Description |
---|---|
name |
A String specifying the name of the attribute |
Returns an Enumeration
containing the attribute names available within this SOAP context.
public Enumeration getAttributeNames();
Returns the user certificate for the user making SOAP request, or null if this attribute is not set.
public Object getCertificate();
Returns the HttpServlet that is processing the SOAP request, or null if the servlet attribute is not set.
public HttpServlet getHttpServlet();
Returns the HTTP session for the SOAP request, or null if the session attribute is not set.
getHttpSession public HttpSession getHttpSession();
Returns the Internet Protocol (IP) address of the remote client that sent the request.
public String getRemoteAddress();
Returns the host name of the remote client that sent the request.
public String getRemoteHost();
Returns the URI of the request.
public String getRequestURI();
Returns an indication whether the channel is secure; TRUE
if the channel is secure, FALSE
otherwise.
public boolean getSecureChannel();
Returns the protocol-specific username for the SOAP request, or null if this attribute is not set.
public String getUsername();
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
.
public void removeAttribute( String name);
Parameter | Description |
---|---|
name |
A non-null String specifying the name of the attribute. |
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
.
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. |
Sets the user certificate.
public void setCertificate( Object certificate);
Parameter | Description |
---|---|
certificate |
The user certificate for the user making the SOAP request. |
Sets the HTTP servlet.
public void setHttpServlet( HttpServlet servlet);
Parameter | Description |
---|---|
servlet |
The HttpServlet that is processing the SOAP request. |
Sets the HTTP session.
public void setHttpSession( HttpSession session);
Parameter | Description |
---|---|
servlet |
The HttpSession for the SOAP request. |
Sets the remote IP address of the client.
public void setRemoteAddress( String remoteAddress);
Parameter | Description |
---|---|
remoteAddress |
The IP address of the client making the SOAP request. |
Sets the host name of the remote client making the SOAP request.
public void setRemoteHost( String remoteHost);
Parameter | Description |
---|---|
remoteHost |
The host name of the client making the SOAP request. |
Sets the URI of the request.
public void setRequestURI( String uri);
Parameter | Description |
---|---|
uri |
Request URI. |
Sets the indicator of whether the channel is secure.
public void setSecureChannel( boolean secureChannel);
Parameter | Description |
---|---|
secureChannel |
|
Sets the protocol-specific username.
public void setUsername( String username);
Parameter | Description |
---|---|
username |
The protocol-specific username for the SOAP request. |
This package contains the OracleSOAPTransport Interface, which provides support for Oracle SOAP in the XDK for Java.
This interface defines Oracle specific transport extensions.
oracle.soap.transport.OracleSOAPTransport public interface OracleSOAPTransport extends SOAPTransport
Method | Description |
---|---|
Close the transport and perform any clean up. |
|
Returns the connection properties. |
|
Sets the connection properties. |
Closes the transport and performs clean up.
public abstract void close();
Returns the connection properties.
public abstract Properties getProperties();
Sets the connection properties.
public abstract void setProperties( Properties prop);
Parameter | Description |
---|---|
prop |
Connection properties. |
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).
This class implements OracleSOAPTransport
.
public class OracleSOAPHTTPConnection extends Object java.lang.Object | +----oOracle.soap.transport.http.OracleSOAPHTTPConnection
Constructs a new instance of OracleSOAPHTTPConnection
from given properties.
public OracleSOAPHTTPConnection( Properties prop);
Parameter | Description |
---|---|
prop |
Connection properties. |
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.
public void close();
Finalizes the connection.
public void finalize();
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.
public Hashtable getHeaders();
Returns the connection properties.
public Properties getProperties();
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.
public BufferedReader receive();
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.
public void send( URL sendTo, String action, Hashtable headers, Envelope env, SOAPMappingRegistry smr, int timeout);
Sets the connection properties.
public void setProperties( Properties prop);
Parameter | Description |
---|---|
prop |
Connection properties. |
Package oracle.soap.util.xml contains the 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.
public class XmlUtils java.lang.Object | +----oracle.soap.util.xml.XmlUtils
Default constructor.
public XmlUtils();
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.
public static String extractServiceId(Envelope envelope);
Parameter | Description |
---|---|
envelope |
The SOAP envelope. |
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.
public static String extractMethodName( Envelope envelope);
Parameter | Description |
---|---|
envelope |
The SOAP envelope. |
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.
Parameter | Description |
---|---|
filename |
The full path to the XML file. |
reader |
Reader for XML. |
is |
The input stream source. |
Creates a Document
. Throws a SOAPException
if cannot create Document
.
public static Document createDocument();
|
Copyright © 2001, 2002 Oracle Corporation. All Rights Reserved. |
|