oracle.soap.server
Class ServiceDeploymentDescriptor

java.lang.Object
  |
  +--oracle.soap.server.ServiceDeploymentDescriptor
All Implemented Interfaces:
java.io.Serializable

public final class ServiceDeploymentDescriptor
extends java.lang.Object
implements java.io.Serializable

ServiceDeploymentDescriptor defines the deployment information for a SOAP service, independent of its provider type. The class supports any number of named provider options, which allows the descriptor to be easily extended (without code changes) for new types of providers.

See Also:
Serialized Form

Field Summary
protected  java.lang.String[] m_faultListener
           
protected  java.lang.String m_id
           
protected  java.lang.String[] m_methods
           
protected  java.lang.String m_providerId
           
protected  java.util.Hashtable m_providerOptions
           
protected  java.lang.String m_providerType
           
protected  int m_scope
           
protected  int m_serviceType
           
protected  java.util.Hashtable m_sqlMap
           
protected  org.apache.soap.server.TypeMapping[] m_typeMappings
           
static int SCOPE_APPLICATION
           
static int SCOPE_REQUEST
           
static int SCOPE_SESSION
           
static int SERVICE_TYPE_MESSAGE
           
static int SERVICE_TYPE_RPC
           
 
Constructor Summary
ServiceDeploymentDescriptor()
          Construct a new service descriptor.
 
Method Summary
 org.apache.soap.server.SOAPFaultRouter buildFaultRouter()
          Get the fault router.
static SOAPMappingRegistry buildSOAPMappingRegistry(ServiceDeploymentDescriptor sdd)
          Utility to generate an XML serialization registry from all the type mappings registered into a deployment descriptor.
static java.util.Hashtable buildSqlClassMap(ServiceDeploymentDescriptor sdd)
          Utility to generate a map from SQL type to Java Class using the type mapping information from the deployment descriptor.
static ServiceDeploymentDescriptor fromXML(org.w3c.dom.Element root)
          Populate the ServiceDeploymentDescriptor with information from the given document, which is the XML representation of the descriptor.
 java.lang.String getDefaultSMRClass()
          Get the default SOAP mapping registry class.
 java.lang.String[] getFaultListener()
          Get the fault listener list.
 java.lang.String getId()
          Get the service id.
 java.lang.String[] getMethods()
          Get the list of methods that are provided by this service.
 java.lang.String getProviderId()
          Get the provider id for this service.
 java.util.Hashtable getProviderOptions()
          Get the provider-specific options.
 java.lang.String getProviderType()
          Get the provider type.
 int getScope()
          Get the scope.
 int getServiceType()
          Get the service type.
 java.util.Hashtable getSqlMap()
          Get the SQL type to Java type map.
 org.apache.soap.server.TypeMapping[] getTypeMappings()
          Get the XML-Java type mappings, which define how to deserialize XML into Java and serialize Java into XML.
 boolean isMethodValid(java.lang.String methodName)
          Determine if the given method is valid for this service.
 void setDefaultSMRClass(java.lang.String defaultSMRClass)
          Set the default SOAP mapping registry class.
 void setFaultListener(java.lang.String[] faultListener)
          Set the fault listener list.
 void setId(java.lang.String id)
          Set the service id, which must be a valid URI.
 void setMethods(java.lang.String[] methods)
          Set the list of methods that are provided by this service.
 void setProviderId(java.lang.String providerId)
          Set the id of the provider for this service.
 void setProviderOptions(java.util.Hashtable providerOptions)
          Set the provider-specific options.
 void setProviderType(java.lang.String providerType)
          Set the provider type.
 void setScope(int scope)
          Set the execution scope.
 void setServiceType(int serviceType)
          Set the service type.
 void setSqlMap(java.util.Hashtable sqlMap)
          Set the map that maps from SQL type to Java type.
 void setTypeMappings(org.apache.soap.server.TypeMapping[] typeMappings)
          Set the XML-Java type mappings, which define how to deserialize XML into Java and serialize Java into XML.
 java.lang.String toString()
          Get a printable representation of this descriptor.
 void toXML(java.io.Writer pr)
          Write out the service deployment descriptor as XML.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SERVICE_TYPE_RPC

public static final int SERVICE_TYPE_RPC

SERVICE_TYPE_MESSAGE

public static final int SERVICE_TYPE_MESSAGE

SCOPE_REQUEST

public static final int SCOPE_REQUEST

SCOPE_SESSION

public static final int SCOPE_SESSION

SCOPE_APPLICATION

public static final int SCOPE_APPLICATION

m_id

protected java.lang.String m_id

m_serviceType

protected int m_serviceType

m_providerType

protected java.lang.String m_providerType

m_providerId

protected java.lang.String m_providerId

m_scope

protected int m_scope

m_methods

protected java.lang.String[] m_methods

m_providerOptions

protected java.util.Hashtable m_providerOptions

m_typeMappings

protected org.apache.soap.server.TypeMapping[] m_typeMappings

m_sqlMap

protected java.util.Hashtable m_sqlMap

m_faultListener

protected java.lang.String[] m_faultListener
Constructor Detail

ServiceDeploymentDescriptor

public ServiceDeploymentDescriptor()
Construct a new service descriptor.
Method Detail

setId

public void setId(java.lang.String id)
Set the service id, which must be a valid URI.
Parameters:
id - The service URI.

getId

public java.lang.String getId()
Get the service id.
Returns:
The service id, which is a URI.

setProviderId

public void setProviderId(java.lang.String providerId)
Set the id of the provider for this service.
Parameters:
providerId - The provider's id for this service.

getProviderId

public java.lang.String getProviderId()
Get the provider id for this service.
Returns:
The provider id.

setMethods

public void setMethods(java.lang.String[] methods)
Set the list of methods that are provided by this service.
Parameters:
methods - The list of provided methods.

getMethods

public java.lang.String[] getMethods()
Get the list of methods that are provided by this service.
Returns:
The list of provided methods.

setScope

public void setScope(int scope)
Set the execution scope.
Parameters:
scope - The execution scope, which is one of the SCOPE_xxx constants.

getScope

public int getScope()
Get the scope.
Returns:
The scope, which is one of the SCOPE_xxx constants.

setServiceType

public void setServiceType(int serviceType)
Set the service type. DLD: exlain RPC vs one-way message.
Parameters:
serviceType - The service type, which is one of the SERVICE_TYPE_xxx constants.

getServiceType

public int getServiceType()
Get the service type.
Returns:
The service type, which is one of the SERVICE_TYPE_xxx constants.

setProviderType

public void setProviderType(java.lang.String providerType)
Set the provider type.
Parameters:
providerType - The provider type, which can be any string. The provider type is used to validate the XML service descriptor (for the provider-specific options).

getProviderType

public java.lang.String getProviderType()
Get the provider type.
Returns:
The provider type.

setProviderOptions

public void setProviderOptions(java.util.Hashtable providerOptions)
Set the provider-specific options.
Parameters:
providerOptions - The name-value pairs that represent the provider-specific options for this service.

getProviderOptions

public java.util.Hashtable getProviderOptions()
Get the provider-specific options.
Returns:
The name-value pairs that represent the provider-specific options for this service.

setFaultListener

public void setFaultListener(java.lang.String[] faultListener)
Set the fault listener list.
Parameters:
faultListener - The list of class names that are fault listeners for this service.

getFaultListener

public java.lang.String[] getFaultListener()
Get the fault listener list.
Returns:
The list of class names that are fault listeners for this service.

buildFaultRouter

public org.apache.soap.server.SOAPFaultRouter buildFaultRouter()
Get the fault router.
Returns:
The fault router that is built from the service's fault listeners.

setTypeMappings

public void setTypeMappings(org.apache.soap.server.TypeMapping[] typeMappings)
Set the XML-Java type mappings, which define how to deserialize XML into Java and serialize Java into XML.
Parameters:
typeMappings - The type mappings.

getTypeMappings

public org.apache.soap.server.TypeMapping[] getTypeMappings()
Get the XML-Java type mappings, which define how to deserialize XML into Java and serialize Java into XML.
Returns:
The type mappings.

setSqlMap

public void setSqlMap(java.util.Hashtable sqlMap)
Set the map that maps from SQL type to Java type.
Parameters:
sqlMap - The SQL type to Java class map.

getSqlMap

public java.util.Hashtable getSqlMap()
Get the SQL type to Java type map.
Returns:
The SQL type to Java class map.

setDefaultSMRClass

public void setDefaultSMRClass(java.lang.String defaultSMRClass)
Set the default SOAP mapping registry class.
Parameters:
defaultSMRClass - The default SOAP mapping registry class.

getDefaultSMRClass

public java.lang.String getDefaultSMRClass()
Get the default SOAP mapping registry class.
Returns:
The default SOAP mapping registry class.

isMethodValid

public boolean isMethodValid(java.lang.String methodName)
Determine if the given method is valid for this service.
Returns:
true if the method is valid for this service, else false.

fromXML

public static ServiceDeploymentDescriptor fromXML(org.w3c.dom.Element root)
Populate the ServiceDeploymentDescriptor with information from the given document, which is the XML representation of the descriptor.
Parameters:
root - The root of the XML document that represents the service descriptor.
Returns:
The ServiceDeploymentDescriptor that contains the information from the document.
Throws:
java.lang.IllegalArgumentException - Invalid document.

toXML

public void toXML(java.io.Writer pr)
Write out the service deployment descriptor as XML.
Parameters:
pr - The writer for the XML output.

toString

public java.lang.String toString()
Get a printable representation of this descriptor.
Overrides:
toString in class java.lang.Object

buildSOAPMappingRegistry

public static SOAPMappingRegistry buildSOAPMappingRegistry(ServiceDeploymentDescriptor sdd)
Utility to generate an XML serialization registry from all the type mappings registered into a deployment descriptor.
Parameters:
dd - the deployment descriptor
Returns:
the xml serialization registry

buildSqlClassMap

public static java.util.Hashtable buildSqlClassMap(ServiceDeploymentDescriptor sdd)
                                            throws SOAPException
Utility to generate a map from SQL type to Java Class using the type mapping information from the deployment descriptor.
Parameters:
sdd - The service deployment descriptor to use.
Returns:
The type to Class map.
Throws:
SOAPException - Failed to generate map.


Copyright © 2001 Oracle SOAP. All Rights Reserved.