Package org.apache.axis.deployment.wsdd
Class WSDDDeployment
- java.lang.Object
-
- org.apache.axis.deployment.wsdd.WSDDConstants
-
- org.apache.axis.deployment.wsdd.WSDDElement
-
- org.apache.axis.deployment.wsdd.WSDDDeployment
-
- All Implemented Interfaces:
java.io.Serializable,WSDDTypeMappingContainer,EngineConfiguration,WSDDEngineConfiguration
public class WSDDDeployment extends WSDDElement implements WSDDTypeMappingContainer, WSDDEngineConfiguration
WSDD deployment element- Author:
- James Snell, Glen Daniels (gdaniels@apache.org)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.commons.logging.Loglog-
Fields inherited from class org.apache.axis.deployment.wsdd.WSDDConstants
ARRAY_DESERIALIZER_FACTORY, ARRAY_SERIALIZER_FACTORY, ATTR_ATTACHMENT_FORMAT, ATTR_CLASS, ATTR_CLASSNAME, ATTR_DESERIALIZER, ATTR_ENCSTYLE, ATTR_INHEADER, ATTR_INNER_NAME, ATTR_INNER_TYPE, ATTR_ITEMQNAME, ATTR_ITEMTYPE, ATTR_LANG_SPEC_TYPE, ATTR_LOCKED, ATTR_MEP, ATTR_MODE, ATTR_NAME, ATTR_OUTHEADER, ATTR_PIVOT, ATTR_PROVIDER, ATTR_QNAME, ATTR_RETHEADER, ATTR_RETITEMQNAME, ATTR_RETITEMTYPE, ATTR_RETQNAME, ATTR_RETTYPE, ATTR_SERIALIZER, ATTR_SOAP12ACTION, ATTR_SOAPACTION, ATTR_SOAPACTORNAME, ATTR_STREAMING, ATTR_STYLE, ATTR_TYPE, ATTR_USE, ATTR_VALUE, BEAN_DESERIALIZER_FACTORY, BEAN_SERIALIZER_FACTORY, ELEM_WSDD_ARRAYMAPPING, ELEM_WSDD_BEANMAPPING, ELEM_WSDD_CHAIN, ELEM_WSDD_DEPLOY, ELEM_WSDD_DOC, ELEM_WSDD_ELEMENTMAPPING, ELEM_WSDD_ENDPOINTURL, ELEM_WSDD_FAULT, ELEM_WSDD_FAULTFLOW, ELEM_WSDD_GLOBAL, ELEM_WSDD_HANDLER, ELEM_WSDD_JAXRPC_CHAIN, ELEM_WSDD_JAXRPC_HANDLERINFO, ELEM_WSDD_JAXRPC_HEADER, ELEM_WSDD_JAXRPC_ROLE, ELEM_WSDD_NAMESPACE, ELEM_WSDD_OPERATION, ELEM_WSDD_PARAM, ELEM_WSDD_REQFLOW, ELEM_WSDD_RESPFLOW, ELEM_WSDD_ROLE, ELEM_WSDD_SERVICE, ELEM_WSDD_TRANSPORT, ELEM_WSDD_TYPEMAPPING, ELEM_WSDD_UNDEPLOY, ELEM_WSDD_WSDLFILE, NS_PREFIX_WSDD, NS_PREFIX_WSDD_JAVA, PROVIDER_BSF, PROVIDER_COM, PROVIDER_CORBA, PROVIDER_EJB, PROVIDER_HANDLER, PROVIDER_MSG, PROVIDER_RMI, PROVIDER_RPC, QNAME_ARRAYMAPPING, QNAME_BEANMAPPING, QNAME_BSF_PROVIDER, QNAME_CHAIN, QNAME_COM_PROVIDER, QNAME_CORBA_PROVIDER, QNAME_DEPLOY, QNAME_DOC, QNAME_EJB_PROVIDER, QNAME_ELEMENTMAPPING, QNAME_ENDPOINTURL, QNAME_FAULT, QNAME_FAULTFLOW, QNAME_GLOBAL, QNAME_HANDLER, QNAME_HANDLER_PROVIDER, QNAME_JAVAMSG_PROVIDER, QNAME_JAVARPC_PROVIDER, QNAME_JAXRPC_HANDLERINFO, QNAME_JAXRPC_HANDLERINFOCHAIN, QNAME_JAXRPC_HEADER, QNAME_JAXRPC_ROLE, QNAME_NAMESPACE, QNAME_OPERATION, QNAME_PARAM, QNAME_REQFLOW, QNAME_RESPFLOW, QNAME_RMI_PROVIDER, QNAME_SERVICE, QNAME_TRANSPORT, QNAME_TYPEMAPPING, QNAME_UNDEPLOY, QNAME_WSDLFILE, URI_WSDD, URI_WSDD_HANDLER, URI_WSDD_JAVA, URI_WSDD_WSDD_BSF, URI_WSDD_WSDD_COM
-
Fields inherited from interface org.apache.axis.EngineConfiguration
PROPERTY_NAME
-
-
Constructor Summary
Constructors Constructor Description WSDDDeployment()Default constructorWSDDDeployment(org.w3c.dom.Element e)Create an element in WSDD that wraps an extant DOM element
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddHandler(WSDDHandler handler)protected voidaddService(WSDDService service)protected voidaddTransport(WSDDTransport transport)voidconfigureEngine(AxisEngine engine)Configure this AxisEngine using whatever data source we have.voiddeployHandler(WSDDHandler handler)Put a WSDDHandler into this deployment, replacing any other WSDDHandler which might already be present with the same QName.voiddeployService(WSDDService service)Put a WSDDService into this deployment, replacing any other WSDDService which might already be present with the same QName.voiddeployToRegistry(WSDDDeployment target)voiddeployTransport(WSDDTransport transport)Put a WSDDTransport into this deployment, replacing any other WSDDTransport which might already be present with the same QName.voiddeployTypeMapping(WSDDTypeMapping typeMapping)java.util.IteratorgetDeployedServices()Get an enumeration of the services deployed to this engineWSDDDeploymentgetDeployment()Get the WSDDDeployment for this engine configuration.protected QNamegetElementName()Return the element name of a particular subclass.AxisEnginegetEngine()WSDDGlobalConfigurationgetGlobalConfiguration()Get our global configurationjava.util.HashtablegetGlobalOptions()Returns the global configuration options.HandlergetGlobalRequest()Returns a global request handler.HandlergetGlobalResponse()Returns a global response handler.HandlergetHandler(QName name)Return an instance of the named handler.WSDDHandler[]getHandlers()java.util.ListgetRoles()Get a list of roles that this engine plays globally.SOAPServicegetService(QName name)Retrieve an instance of the named service.SOAPServicegetServiceByNamespaceURI(java.lang.String namespace)Get a service which has been mapped to a particular namespace.WSDDService[]getServices()Return an array of the services in this deploymentHandlergetTransport(QName name)Retrieve an instance of the named transport.WSDDTransport[]getTransports()TypeMappinggetTypeMapping(java.lang.String encodingStyle)TypeMappingRegistrygetTypeMappingRegistry()Retrieve the TypeMappingRegistry for this engine.WSDDTypeMapping[]getTypeMappings()WSDDHandlergetWSDDHandler(QName qname)WSDDServicegetWSDDService(QName qname)Return the WSDD description for a given named serviceWSDDTransportgetWSDDTransport(QName qname)voidregisterNamespaceForService(java.lang.String namespace, WSDDService service)Register a particular namepsace which maps to a given WSDDService.voidremoveNamespaceMapping(java.lang.String namespace)Remove a namespace -> WSDDService mapping.voidsetGlobalConfiguration(WSDDGlobalConfiguration globalConfig)voidundeployHandler(QName qname)Remove a named handlervoidundeployService(QName qname)Remove a named servicevoidundeployTransport(QName qname)Remove a named transportvoidwriteEngineConfig(AxisEngine engine)Read the configuration from an engine, and store it somehow.voidwriteToContext(SerializationContext context)Write this element out to a SerializationContext-
Methods inherited from class org.apache.axis.deployment.wsdd.WSDDElement
getChildElement, getChildElements
-
-
-
-
Constructor Detail
-
WSDDDeployment
public WSDDDeployment()
Default constructor
-
WSDDDeployment
public WSDDDeployment(org.w3c.dom.Element e) throws WSDDExceptionCreate an element in WSDD that wraps an extant DOM element- Parameters:
e- the element to create the deployment from- Throws:
WSDDException- when problems occur deploying a service or type mapping.
-
-
Method Detail
-
addHandler
protected void addHandler(WSDDHandler handler)
-
addService
protected void addService(WSDDService service)
-
addTransport
protected void addTransport(WSDDTransport transport)
-
deployHandler
public void deployHandler(WSDDHandler handler)
Put a WSDDHandler into this deployment, replacing any other WSDDHandler which might already be present with the same QName.- Parameters:
handler- a WSDDHandler to insert in this deployment
-
deployTransport
public void deployTransport(WSDDTransport transport)
Put a WSDDTransport into this deployment, replacing any other WSDDTransport which might already be present with the same QName.- Parameters:
transport- a WSDDTransport to insert in this deployment
-
deployService
public void deployService(WSDDService service)
Put a WSDDService into this deployment, replacing any other WSDDService which might already be present with the same QName.- Parameters:
service- a WSDDHandler to insert in this deployment
-
undeployHandler
public void undeployHandler(QName qname)
Remove a named handler- Parameters:
qname- the QName of the handler to remove
-
undeployService
public void undeployService(QName qname)
Remove a named service- Parameters:
qname- the QName of the service to remove
-
undeployTransport
public void undeployTransport(QName qname)
Remove a named transport- Parameters:
qname- the QName of the transport to remove
-
deployTypeMapping
public void deployTypeMapping(WSDDTypeMapping typeMapping) throws WSDDException
- Specified by:
deployTypeMappingin interfaceWSDDTypeMappingContainer- Throws:
WSDDException
-
getElementName
protected QName getElementName()
Description copied from class:WSDDElementReturn the element name of a particular subclass.- Specified by:
getElementNamein classWSDDElement
-
deployToRegistry
public void deployToRegistry(WSDDDeployment target) throws ConfigurationException
- Throws:
ConfigurationException
-
writeToContext
public void writeToContext(SerializationContext context) throws java.io.IOException
Description copied from class:WSDDElementWrite this element out to a SerializationContext- Specified by:
writeToContextin classWSDDElement- Throws:
java.io.IOException
-
getGlobalConfiguration
public WSDDGlobalConfiguration getGlobalConfiguration()
Get our global configuration- Returns:
- a global configuration object
-
setGlobalConfiguration
public void setGlobalConfiguration(WSDDGlobalConfiguration globalConfig)
-
getTypeMappings
public WSDDTypeMapping[] getTypeMappings()
- Returns:
- an array of type mappings in this deployment
-
getServices
public WSDDService[] getServices()
Return an array of the services in this deployment
-
getWSDDService
public WSDDService getWSDDService(QName qname)
Return the WSDD description for a given named service
-
getHandler
public Handler getHandler(QName name) throws ConfigurationException
Return an instance of the named handler.- Specified by:
getHandlerin interfaceEngineConfiguration- Parameters:
name- the name of the handler to get- Returns:
- an Axis handler with the specified QName or null of not found
- Throws:
ConfigurationException- if there was a failure in resolvingqname
-
getTransport
public Handler getTransport(QName name) throws ConfigurationException
Retrieve an instance of the named transport.- Specified by:
getTransportin interfaceEngineConfiguration- Parameters:
name- theQNameof the transport- Returns:
- a
Handlerimplementing the transport - Throws:
ConfigurationException- if there was an error resolving the transport
-
getService
public SOAPService getService(QName name) throws ConfigurationException
Retrieve an instance of the named service.- Specified by:
getServicein interfaceEngineConfiguration- Parameters:
name- theQNameidentifying theService- Returns:
- the
Serviceassociated withqname - Throws:
ConfigurationException- if there was an error resolving the qname
-
getServiceByNamespaceURI
public SOAPService getServiceByNamespaceURI(java.lang.String namespace) throws ConfigurationException
Description copied from interface:EngineConfigurationGet a service which has been mapped to a particular namespace.- Specified by:
getServiceByNamespaceURIin interfaceEngineConfiguration- Parameters:
namespace- a namespace URI- Returns:
- an instance of the appropriate Service, or null
- Throws:
ConfigurationException- if there was an error resolving the namespace
-
configureEngine
public void configureEngine(AxisEngine engine) throws ConfigurationException
Description copied from interface:EngineConfigurationConfigure this AxisEngine using whatever data source we have.- Specified by:
configureEnginein interfaceEngineConfiguration- Parameters:
engine- the AxisEngine we'll deploy state to- Throws:
ConfigurationException- if there was a problem
-
writeEngineConfig
public void writeEngineConfig(AxisEngine engine) throws ConfigurationException
Description copied from interface:EngineConfigurationRead the configuration from an engine, and store it somehow.- Specified by:
writeEngineConfigin interfaceEngineConfiguration- Parameters:
engine- the AxisEngine from which to read state.- Throws:
ConfigurationException- if there was a problem
-
getTypeMapping
public TypeMapping getTypeMapping(java.lang.String encodingStyle) throws ConfigurationException
- Throws:
ConfigurationException
-
getTypeMappingRegistry
public TypeMappingRegistry getTypeMappingRegistry() throws ConfigurationException
Description copied from interface:EngineConfigurationRetrieve the TypeMappingRegistry for this engine.- Specified by:
getTypeMappingRegistryin interfaceEngineConfiguration- Returns:
- the type mapping registry
- Throws:
ConfigurationException- if there was an error resolving the registry
-
getGlobalRequest
public Handler getGlobalRequest() throws ConfigurationException
Description copied from interface:EngineConfigurationReturns a global request handler.- Specified by:
getGlobalRequestin interfaceEngineConfiguration- Returns:
- the
Handlerthat globally handles requests - Throws:
ConfigurationException- if there was some error fetching the handler
-
getGlobalResponse
public Handler getGlobalResponse() throws ConfigurationException
Description copied from interface:EngineConfigurationReturns a global response handler.- Specified by:
getGlobalResponsein interfaceEngineConfiguration- Returns:
- the
Handlerthat globally handles responses - Throws:
ConfigurationException- if there was some error fetching the handler
-
getGlobalOptions
public java.util.Hashtable getGlobalOptions() throws ConfigurationExceptionDescription copied from interface:EngineConfigurationReturns the global configuration options.- Specified by:
getGlobalOptionsin interfaceEngineConfiguration- Returns:
- the global options as a
Hashtable - Throws:
ConfigurationException- if the global options could not be returned
-
getRoles
public java.util.List getRoles()
Description copied from interface:EngineConfigurationGet a list of roles that this engine plays globally. Services within the engine configuration may also add additional roles.- Specified by:
getRolesin interfaceEngineConfiguration- Returns:
- a
Listof the roles for this engine
-
getDeployedServices
public java.util.Iterator getDeployedServices() throws ConfigurationExceptionGet an enumeration of the services deployed to this engine- Specified by:
getDeployedServicesin interfaceEngineConfiguration- Returns:
- an
Iteratorover theServiceDescobjects - Throws:
ConfigurationException- if the deployed services could not be returned- See Also:
ServiceDesc
-
registerNamespaceForService
public void registerNamespaceForService(java.lang.String namespace, WSDDService service)Register a particular namepsace which maps to a given WSDDService. This will be used for namespace-based dispatching.- Parameters:
namespace- a namespace URIservice- the target WSDDService
-
removeNamespaceMapping
public void removeNamespaceMapping(java.lang.String namespace)
Remove a namespace -> WSDDService mapping.- Parameters:
namespace- the namespace URI to unmap
-
getEngine
public AxisEngine getEngine()
-
getDeployment
public WSDDDeployment getDeployment()
Description copied from interface:WSDDEngineConfigurationGet the WSDDDeployment for this engine configuration.- Specified by:
getDeploymentin interfaceWSDDEngineConfiguration- Returns:
- the WSDDDeployment
-
getHandlers
public WSDDHandler[] getHandlers()
-
getWSDDHandler
public WSDDHandler getWSDDHandler(QName qname)
-
getTransports
public WSDDTransport[] getTransports()
-
getWSDDTransport
public WSDDTransport getWSDDTransport(QName qname)
-
-