Package org.apache.axis2.description
Class AxisService
- java.lang.Object
-
- org.apache.axis2.description.AxisDescription
-
- org.apache.axis2.description.AxisService
-
- All Implemented Interfaces:
DescriptionConstants,ParameterInclude
public class AxisService extends AxisDescription
Class AxisService
-
-
Field Summary
Fields Modifier and Type Field Description static StringIMPORT_TAGstatic StringINCLUDE_TAGstatic StringSCHEMA_LOCATIONstatic StringSUPPORT_SINGLE_OPIf this param is true, and the service has exactly one AxisOperation, normal operation dispatch (via URI/soapAction/etc) will not be necessary, and we'll just default to funneling all messages to that op.-
Fields inherited from class org.apache.axis2.description.AxisDescription
engagedModules, parameterObservers, parent
-
Fields inherited from interface org.apache.axis2.description.DescriptionConstants
CLASSLOADER_KEY, CONTEXTPATH_KEY, EXECUTION_CHAIN_KEY, EXECUTION_FAULT_CHAIN_KEY, EXECUTION_OUT_CHAIN_KEY, IN_FAULTFLOW_KEY, INFLOW_KEY, MESSAGE_RECEIVER_KEY, MODULEREF_KEY, OPERATION_KEY, OUT_FAULTFLOW_KEY, OUTFLOW_KEY, PARAMETER_KEY, PHASES_KEY, SERVICE_CLASS_NAME, STYLE_KEY
-
-
Constructor Summary
Constructors Constructor Description AxisService()Constructor AxisService.AxisService(String name)Constructor AxisService.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddDataLocatorClassNames(String dialect, String dataLocatorClassName)Save data Locator configured at service level for this Axis ServicevoidaddEndpoint(String key, AxisEndpoint axisEndpoint)voidaddExcludeOperationName(String operation)Adds operation name to exclude list.voidaddExposedTransport(String transport)voidaddHttpLocationDispatcherString(String string, AxisOperation axisOperation)Maps an constant string in the whttp:location to the given operation.voidaddMessageContextListener(MessageContextListener scl)Add a ServiceContextListenervoidaddMessageElementQNameToOperationMapping(QName messageElementQName, AxisOperation operation)Add an entry to the map between element QNames in WSDL messages and AxisOperations for this service.voidaddMessageReceiver(String mepURI, MessageReceiver messageReceiver)voidaddModuleConfig(ModuleConfiguration moduleConfiguration)Adds module configuration , if there is moduleConfig tag in service.voidaddModuleref(String moduleref)voidaddOperation(AxisOperation axisOperation)Method addOperation.voidaddSchema(Collection<org.apache.ws.commons.schema.XmlSchema> schemas)voidaddSchema(org.apache.ws.commons.schema.XmlSchema schema)voidattachEnvelopeEvent(MessageContext mc)Signal an Attach Envelope EventvoidattachServiceContextEvent(ServiceContext sc, MessageContext mc)Signal an Attach ServiceContext Eventstatic AxisServicecreateClientSideAxisService(URL wsdlURL, QName wsdlServiceName, String portName, Options options)To create a AxisService for a given WSDL and the created client is most suitable for client side invocation not for server side invocation.static AxisServicecreateClientSideAxisService(javax.wsdl.Definition wsdlDefinition, QName wsdlServiceName, String portName, Options options)static AxisServicecreateClientSideAxisService(org.apache.woden.wsdl20.Description description, QName wsdlServiceName, String endPoint, Options options)returns a axisService given a input Stream of WSDL2.0 document.static AxisServicecreateService(String implClass, String serviceName, AxisConfiguration axisConfiguration, Map<String,MessageReceiver> messageReceiverClassMap, String targetNamespace, ClassLoader loader, SchemaGenerator schemaGenerator, AxisService axisService)messageReceiverClassMap will hold the MessageReceivers for given meps.static AxisServicecreateService(String implClass, AxisConfiguration axisConfig)To create an AxisService using given service impl class name first generate schema corresponding to the given java class , next for each methods AxisOperation will be created.static AxisServicecreateService(String implClass, AxisConfiguration axisConfiguration, Map messageReceiverClassMap, String targetNamespace, String schemaNamespace, ClassLoader loader)messageReceiverClassMap will hold the MessageReceivers for given meps.AxisServiceGroupgetAxisServiceGroup()StringgetBindingName()ClassLoadergetClassLoader()Method getClassLoader.ArrayList<AxisOperation>getControlOperations()Gets the control operation which are added by module like RM.StringgetCustomSchemaNamePrefix()StringgetCustomSchemaNameSuffix()Data[]getData(DataRetrievalRequest request, MessageContext msgContext)Find a data locator from the available data locators (both configured and default ones) to retrieve Metadata or data specified in the request.AxisDataLocatorgetDataLocator(LocatorType locatorType, String dialect)AxisEndpointgetEndpoint(String key)StringgetEndpointName()get the endpointNameMap<String,AxisEndpoint>getEndpoints()StringgetEndpointURL()Deprecated.String[]getEPRs()ExcludeInfogetExcludeInfo()List<String>getExposedTransports()URLgetFileName()AxisDataLocatorgetGlobalDataLocator(String dialect)ListgetImportedNamespaces()Get the namespaces associated with imported WSDLsObjectgetKey()longgetLastUpdate()MessageReceivergetMessageReceiver(String mepURL)ModuleConfigurationgetModuleConfig(String moduleName)ArrayList<String>getModules()StringgetName()MapgetNamespaceMap()Get the namespace map for this service.ObjectSuppliergetObjectSupplier()AxisOperationgetOperation(QName operationName)Method getOperation.AxisOperationgetOperationByAction(String action)Returns the AxisOperation which has been mapped to the given alias.AxisOperationgetOperationByMessageElementQName(QName messageElementQName)Look up an AxisOperation for this service based off of an element QName from a WSDL message element.AxisOperationgetOperationBySOAPAction(String soapAction)Returns the operation given a SOAP Action.Iterator<AxisOperation>getOperations()Method getOperations.ListgetOperationsNameList()MapgetP2nMap()ArrayList<AxisOperation>getPublishedOperations()Gets only the published operations.ArrayList<org.apache.ws.commons.schema.XmlSchema>getSchema()org.apache.ws.commons.schema.XmlSchemagetSchema(int index)org.apache.ws.commons.schema.XmlSchemaElementgetSchemaElement(QName elementQName)MapgetSchemaMappingTable()StringgetSchemaTargetNamespace()StringgetSchemaTargetNamespacePrefix()StringgetScope()ServiceLifeCyclegetServiceLifeCycle()StringgetSoapNsUri()get the SOAPVersionStringgetTargetNamespace()StringgetTargetNamespacePrefix()TypeTablegetTypeTable()booleanhasMessageContextListener(Class cls)booleanisActive()booleanisClientSide()booleanisCustomWsdl()booleanisElementFormDefault()booleanisEnableAllTransports()booleanisExcludedOperation(String operation)Returns whether operation name is in exclude list.booleanisExposedTransport(String transport)booleanisModifyUserWSDLPortAddress()By default the port address in user WSDLs is modified, set the following parameter to override this behaviourfalse booleanisSchemaLocationsAdjusted()booleanisSetEndpointsToAllUsedBindings()users can use this parameter when they supply a wsdl file with the .aar file but wants to generate the endpoints for all available transports. here it assume that the user has not set the useOriginalwsdlbooleanisUseDefaultChains()booleanisUseUserWSDL()User can set a parameter in services.xml saying he want to show the original wsdl that he put into META-INF once someone ask for ?booleanisWsdlFound()protected AxisDataLocatorloadDataLocator(String className)org.apache.neethi.PolicylookupPolicy(String key)voidmapActionToOperation(String action, AxisOperation axisOperation)Maps an alias (such as a SOAPAction, WSA action, or an operation name) to the given AxisOperation.voidonDisengage(AxisModule module)voidonEngage(AxisModule axisModule, AxisDescription engager)Engages a module.MappopulateSchemaMappings()MappopulateSchemaMappings(boolean overrideAbsoluteAddress)runs the schema mappings if it has not been run previously it is best that this logic be in the axis service since one can call the axis service to populate the schema mappingsvoidprintSchema(OutputStream out)Prints the schema to the given output stream.voidprintUserWSDL(OutputStream out, String wsdlName)voidprintUserWSDL(OutputStream out, String wsdlName, String ip)Prints the user WSDL.voidprintUserWSDL2(OutputStream out, String wsdlName, String ip)voidprintWSDL(OutputStream out)Print the WSDL with a default URL.voidprintWSDL(OutputStream out, String requestIP)Produces a WSDL for this AxisService and prints it to the specified OutputStream.voidprintWSDL2(OutputStream out)Print the WSDL2.0 with a default URL.voidprintWSDL2(OutputStream out, String requestIP)Prints WSDL2.0 data for the service with the given host IP address.intprintWSDL2(OutputStream out, String requestIP, String wsdl)Produces a WSDL2 for this AxisService and prints it to the specified OutputStream.intprintXSD(OutputStream out, String xsd)Produces a XSD for this AxisService and prints it to the specified OutputStream.voidregisterPolicy(String key, org.apache.neethi.Policy policy)voidreleaseSchemaList()Release the list of schema objects.voidremoveExcludeOperationName(String operation)Removes operation name from exclude list.voidremoveExposedTransport(String transport)voidremoveMessageContextListener(MessageContextListener scl)Remove a ServiceContextListenervoidremoveOperation(QName opName)voidsetActive(boolean active)voidsetBindingName(String bindingName)voidsetClassLoader(ClassLoader classLoader)Method setClassLoader.voidsetClientSide(boolean clientSide)voidsetCustomSchemaNamePrefix(String customSchemaNamePrefix)voidsetCustomSchemaNameSuffix(String customSchemaNameSuffix)voidsetCustomWsdl(boolean customWsdl)voidsetElementFormDefault(boolean elementFormDefault)voidsetEnableAllTransports(boolean enableAllTransports)To eneble service to be expose in all the transportvoidsetEndpointName(String endpoint)voidsetEndpointURL(String endpointURL)Deprecated.voidsetEPRs(String[] eprs)voidsetExcludeInfo(ExcludeInfo excludeInfo)voidsetExposedTransports(List transports)voidsetFileName(URL fileName)voidsetImportedNamespaces(List importedNamespaces)Set the namespaces associated with imported WSDLsvoidsetLastUpdate()Sets the current time as last update time of the service.voidsetMessageElementQNameToOperationMap(Map messageElementQNameToOperationMap)Set the map of WSDL message element QNames to AxisOperations for this service.voidsetName(String name)voidsetNamespaceMap(org.apache.ws.commons.schema.utils.NamespaceMap namespaceMap)voidsetObjectSupplier(ObjectSupplier objectSupplier)voidsetOperationsNameList(List operationsNameList)voidsetP2nMap(Map p2nMap)voidsetParent(AxisServiceGroup parent)voidsetSchemaLocationsAdjusted(boolean schemaLocationsAdjusted)voidsetSchemaMappingTable(Map schemaMappingTable)voidsetSchemaTargetNamespace(String schematargetNamespace)voidsetSchemaTargetNamespacePrefix(String schematargetNamespacePrefix)voidsetScope(String scope)voidsetServiceLifeCycle(ServiceLifeCycle serviceLifeCycle)voidsetSoapNsUri(String soapNsUri)voidsetTargetNamespace(String targetNamespace)voidsetTargetNamespacePrefix(String targetNamespacePrefix)voidsetTypeTable(TypeTable typeTable)voidsetUseDefaultChains(boolean useDefaultChains)voidsetWsdlFound(boolean wsdlFound)StringtoString()-
Methods inherited from class org.apache.axis2.description.AxisDescription
addChild, addChild, addParameter, addParameter, addParameterObserver, applyPolicy, applyPolicy, deserializeParameters, disengageModule, engageModule, engageModule, getAxisConfiguration, getChild, getChildren, getDocumentation, getDocumentationNode, getEngagedModules, getParameter, getParameters, getParameterValue, getParent, getPolicyInclude, getPolicySubject, isEngaged, isEngaged, isParameterLocked, isParameterTrue, removeChild, removeParameter, removeParameterObserver, setDocumentation, setDocumentation, setParent, setPolicyInclude
-
-
-
-
Field Detail
-
SUPPORT_SINGLE_OP
public static final String SUPPORT_SINGLE_OP
If this param is true, and the service has exactly one AxisOperation, normal operation dispatch (via URI/soapAction/etc) will not be necessary, and we'll just default to funneling all messages to that op. This is useful for passthrough/ESB/embedded applications.- See Also:
- Constant Field Values
-
IMPORT_TAG
public static final String IMPORT_TAG
- See Also:
- Constant Field Values
-
INCLUDE_TAG
public static final String INCLUDE_TAG
- See Also:
- Constant Field Values
-
SCHEMA_LOCATION
public static final String SCHEMA_LOCATION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AxisService
public AxisService()
Constructor AxisService.
-
AxisService
public AxisService(String name)
Constructor AxisService.
-
-
Method Detail
-
getEndpoint
public AxisEndpoint getEndpoint(String key)
-
addEndpoint
public void addEndpoint(String key, AxisEndpoint axisEndpoint)
-
isSchemaLocationsAdjusted
public boolean isSchemaLocationsAdjusted()
-
setSchemaLocationsAdjusted
public void setSchemaLocationsAdjusted(boolean schemaLocationsAdjusted)
-
getSchemaMappingTable
public Map getSchemaMappingTable()
-
setSchemaMappingTable
public void setSchemaMappingTable(Map schemaMappingTable)
-
getCustomSchemaNamePrefix
public String getCustomSchemaNamePrefix()
-
setCustomSchemaNamePrefix
public void setCustomSchemaNamePrefix(String customSchemaNamePrefix)
-
getCustomSchemaNameSuffix
public String getCustomSchemaNameSuffix()
-
setCustomSchemaNameSuffix
public void setCustomSchemaNameSuffix(String customSchemaNameSuffix)
-
getBindingName
public String getBindingName()
-
setBindingName
public void setBindingName(String bindingName)
-
getSoapNsUri
public String getSoapNsUri()
get the SOAPVersion
-
setSoapNsUri
public void setSoapNsUri(String soapNsUri)
-
getEndpointName
public String getEndpointName()
get the endpointName
-
setEndpointName
public void setEndpointName(String endpoint)
-
addMessageReceiver
public void addMessageReceiver(String mepURI, MessageReceiver messageReceiver)
-
getMessageReceiver
public MessageReceiver getMessageReceiver(String mepURL)
-
addModuleConfig
public void addModuleConfig(ModuleConfiguration moduleConfiguration)
Adds module configuration , if there is moduleConfig tag in service.- Parameters:
moduleConfiguration-
-
addModuleref
public void addModuleref(String moduleref)
-
addExcludeOperationName
public void addExcludeOperationName(String operation)
Adds operation name to exclude list.- Parameters:
operation- operation name to add to exclude list
-
removeExcludeOperationName
public void removeExcludeOperationName(String operation)
Removes operation name from exclude list.- Parameters:
operation- operation name to remove from exclude list
-
isExcludedOperation
public boolean isExcludedOperation(String operation)
Returns whether operation name is in exclude list.- Parameters:
operation- name to check if operation is in the exlude list.- Returns:
- boolean indicating whether operation name is in exlude list.
-
addOperation
public void addOperation(AxisOperation axisOperation)
Method addOperation.- Parameters:
axisOperation-
-
onEngage
public void onEngage(AxisModule axisModule, AxisDescription engager) throws AxisFault
Engages a module. It is required to use this method.- Overrides:
onEngagein classAxisDescription- Parameters:
axisModule-engager-- Throws:
AxisFault
-
mapActionToOperation
public void mapActionToOperation(String action, AxisOperation axisOperation)
Maps an alias (such as a SOAPAction, WSA action, or an operation name) to the given AxisOperation. This is used by dispatching (both SOAPAction- and WSAddressing- based dispatching) to figure out which operation a given message is for. Some notes on restrictions of "action" - A null or empty action will be ignored - An action that is a duplicate and references an idential operation is allowed - An acton that is a duplicate and references a different operation is NOT allowed. In this case, the action for the original operation is removed from the alias table, thus removing the ability to route based on this action. This is necessary to prevent mis-directing incoming message to the wrong operation based on SOAPAction. Note that an alias could be a SOAPAction, WS-Addressing Action, the operation name, or some other alias.- Parameters:
action- the alias keyaxisOperation- the operation to map to- See Also:
getOperationByAction(String)
-
addHttpLocationDispatcherString
public void addHttpLocationDispatcherString(String string, AxisOperation axisOperation)
Maps an constant string in the whttp:location to the given operation. This is used by RequestURIOperationDispatcher based dispatching to figure out which operation it is that a given message is for.- Parameters:
string- the constant drawn from whttp:locationaxisOperation- the operation to map to
-
printSchema
public void printSchema(OutputStream out) throws AxisFault
Prints the schema to the given output stream.- Parameters:
out- The output stream for the data to be written. NOTE: the stream is not closed after the operation, it is the responsibility of the caller to close the stream after usage.- Throws:
AxisFault
-
getSchema
public org.apache.ws.commons.schema.XmlSchema getSchema(int index)
-
releaseSchemaList
public void releaseSchemaList()
Release the list of schema objects. In some environments, this can provide significant relief of memory consumption in the java heap, as long as the need for the schema list has completed.
-
setEPRs
public void setEPRs(String[] eprs)
-
getEPRs
public String[] getEPRs()
-
printUserWSDL
public void printUserWSDL(OutputStream out, String wsdlName) throws AxisFault
- Throws:
AxisFault
-
printUserWSDL
public void printUserWSDL(OutputStream out, String wsdlName, String ip) throws AxisFault
Prints the user WSDL.- Parameters:
out- The output stream for the data to be written. NOTE: the stream is not closed after the operation, it is the responsibility of the caller to close the stream after usage.wsdlName- The name of the WSDL.ip- The host IP address.- Throws:
AxisFault
-
printUserWSDL2
public void printUserWSDL2(OutputStream out, String wsdlName, String ip) throws AxisFault
- Throws:
AxisFault
-
printXSD
public int printXSD(OutputStream out, String xsd) throws IOException
Produces a XSD for this AxisService and prints it to the specified OutputStream.- Parameters:
out- destination stream, NOTE: the stream is not closed after the operation, it is the responsibility of the caller to close the stream after usage.xsd- schema name- Returns:
- -1 implies not found, 0 implies redirect to root, 1 implies found/printed a schema
- Throws:
IOException
-
printWSDL
public void printWSDL(OutputStream out, String requestIP) throws AxisFault
Produces a WSDL for this AxisService and prints it to the specified OutputStream.- Parameters:
out- destination stream. The WSDL will be sent here. NOTE: the stream is not closed after the operation, it is the responsibility of the caller to close the stream after usage.requestIP- the hostname the WSDL request was directed at. This should be the address that appears in the generated WSDL.- Throws:
AxisFault- if an error occurs
-
isSetEndpointsToAllUsedBindings
public boolean isSetEndpointsToAllUsedBindings()
users can use this parameter when they supply a wsdl file with the .aar file but wants to generate the endpoints for all available transports. here it assume that the user has not set the useOriginalwsdl- Returns:
-
printWSDL
public void printWSDL(OutputStream out) throws AxisFault
Print the WSDL with a default URL. This will be called only during codegen time.- Parameters:
out- The output stream for the data to be written. NOTE: the stream is not closed after the operation, it is the responsibility of the caller to close the stream after usage.- Throws:
AxisFault
-
printWSDL2
public void printWSDL2(OutputStream out) throws AxisFault
Print the WSDL2.0 with a default URL. This will be called only during codegen time.- Parameters:
out- The output stream for the data to be written for. NOTE: the stream is not closed after the operation, it is the responsibility of the caller to close the stream after usage.- Throws:
AxisFault
-
printWSDL2
public void printWSDL2(OutputStream out, String requestIP) throws AxisFault
Prints WSDL2.0 data for the service with the given host IP address.- Parameters:
out- The output stream for the data to be written for. NOTE: the stream is not closed after the operation, it is the responsibility of the caller to close the stream after usage.requestIP- The host IP address.- Throws:
AxisFault
-
printWSDL2
public int printWSDL2(OutputStream out, String requestIP, String wsdl) throws IOException, AxisFault
Produces a WSDL2 for this AxisService and prints it to the specified OutputStream.- Parameters:
out- destination stream. NOTE: the stream is not closed after the operation, it is the responsibility of the caller to close the stream after usage.wsdl- wsdl name- Returns:
- -1 implies not found, 0 implies redirect to root, 1 implies found/printed wsdl
- Throws:
IOExceptionAxisFault
-
getClassLoader
public ClassLoader getClassLoader()
Method getClassLoader.- Returns:
- Returns ClassLoader.
-
getControlOperations
public ArrayList<AxisOperation> getControlOperations()
Gets the control operation which are added by module like RM.
-
getFileName
public URL getFileName()
-
getLastUpdate
public long getLastUpdate()
-
getModuleConfig
public ModuleConfiguration getModuleConfig(String moduleName)
-
getName
public String getName()
-
getOperation
public AxisOperation getOperation(QName operationName)
Method getOperation.- Parameters:
operationName-- Returns:
- Returns AxisOperation.
-
getOperationByAction
public AxisOperation getOperationByAction(String action)
Returns the AxisOperation which has been mapped to the given alias.- Parameters:
action- the alias key- Returns:
- Returns the corresponding AxisOperation or null if it isn't found.
- See Also:
mapActionToOperation(String, AxisOperation)
-
getOperationBySOAPAction
public AxisOperation getOperationBySOAPAction(String soapAction)
Returns the operation given a SOAP Action. This method should be called if only one Endpoint is defined for this Service. If more than one Endpoint exists, one of them will be picked. If more than one Operation is found with the given SOAP Action; null will be returned. If no particular Operation is found with the given SOAP Action; null will be returned. If the action is in the list of invaliad aliases, which means it did not uniquely identify an operation, a null will be returned.- Parameters:
soapAction- SOAP Action defined for the particular Operation- Returns:
- Returns an AxisOperation if a unique Operation can be found with the given SOAP Action otherwise will return null.
-
getOperations
public Iterator<AxisOperation> getOperations()
Method getOperations.- Returns:
- Returns HashMap
-
getPublishedOperations
public ArrayList<AxisOperation> getPublishedOperations()
Gets only the published operations.
-
setClassLoader
public void setClassLoader(ClassLoader classLoader)
Method setClassLoader.- Parameters:
classLoader-
-
setFileName
public void setFileName(URL fileName)
-
setLastUpdate
public void setLastUpdate()
Sets the current time as last update time of the service.
-
setName
public void setName(String name)
-
getSchema
public ArrayList<org.apache.ws.commons.schema.XmlSchema> getSchema()
-
addSchema
public void addSchema(org.apache.ws.commons.schema.XmlSchema schema)
-
addSchema
public void addSchema(Collection<org.apache.ws.commons.schema.XmlSchema> schemas)
-
isWsdlFound
public boolean isWsdlFound()
-
setWsdlFound
public void setWsdlFound(boolean wsdlFound)
-
getScope
public String getScope()
-
setScope
public void setScope(String scope)
- Parameters:
scope- - Available scopes : Constants.SCOPE_APPLICATION Constants.SCOPE_TRANSPORT_SESSION Constants.SCOPE_SOAP_SESSION Constants.SCOPE_REQUEST.equals
-
isUseDefaultChains
public boolean isUseDefaultChains()
-
setUseDefaultChains
public void setUseDefaultChains(boolean useDefaultChains)
-
getKey
public Object getKey()
- Specified by:
getKeyin classAxisDescription
-
isActive
public boolean isActive()
-
setActive
public void setActive(boolean active)
-
getSchemaTargetNamespace
public String getSchemaTargetNamespace()
-
setSchemaTargetNamespace
public void setSchemaTargetNamespace(String schematargetNamespace)
-
getSchemaTargetNamespacePrefix
public String getSchemaTargetNamespacePrefix()
-
setSchemaTargetNamespacePrefix
public void setSchemaTargetNamespacePrefix(String schematargetNamespacePrefix)
-
getTargetNamespace
public String getTargetNamespace()
-
setTargetNamespace
public void setTargetNamespace(String targetNamespace)
-
getTargetNamespacePrefix
public String getTargetNamespacePrefix()
-
setTargetNamespacePrefix
public void setTargetNamespacePrefix(String targetNamespacePrefix)
-
getSchemaElement
public org.apache.ws.commons.schema.XmlSchemaElement getSchemaElement(QName elementQName)
-
isEnableAllTransports
public boolean isEnableAllTransports()
-
setEnableAllTransports
public void setEnableAllTransports(boolean enableAllTransports)
To eneble service to be expose in all the transport- Parameters:
enableAllTransports-
-
setExposedTransports
public void setExposedTransports(List transports)
-
addExposedTransport
public void addExposedTransport(String transport)
-
removeExposedTransport
public void removeExposedTransport(String transport)
-
isExposedTransport
public boolean isExposedTransport(String transport)
-
onDisengage
public void onDisengage(AxisModule module) throws AxisFault
- Overrides:
onDisengagein classAxisDescription- Throws:
AxisFault
-
createClientSideAxisService
public static AxisService createClientSideAxisService(URL wsdlURL, QName wsdlServiceName, String portName, Options options) throws AxisFault
To create a AxisService for a given WSDL and the created client is most suitable for client side invocation not for server side invocation. Since all the soap action and wsa action is added to operations- Parameters:
wsdlURL- location of the WSDLwsdlServiceName- name of the service to be invoke , if it is null then the first one will be selected if there are more than oneportName- name of the port , if there are more than one , if it is null then the first one in the iterator will be selectedoptions- Service client options, to set the target EPR- Returns:
- AxisService , the created service will be return
- Throws:
AxisFault
-
createClientSideAxisService
public static AxisService createClientSideAxisService(javax.wsdl.Definition wsdlDefinition, QName wsdlServiceName, String portName, Options options) throws AxisFault
- Throws:
AxisFault
-
createService
public static AxisService createService(String implClass, AxisConfiguration axisConfig) throws AxisFault
To create an AxisService using given service impl class name first generate schema corresponding to the given java class , next for each methods AxisOperation will be created. If the method is in-out it will uses RPCMessageReceiver else RPCInOnlyMessageReceiver Note : Inorder to work this properly RPCMessageReceiver should be available in the class path otherewise operation can not continue- Parameters:
implClass- Service implementation classaxisConfig- Current AxisConfiguration- Returns:
- return created AxisSrevice the creted service , it can either be null or valid service
- Throws:
AxisFault
-
createService
public static AxisService createService(String implClass, AxisConfiguration axisConfiguration, Map messageReceiverClassMap, String targetNamespace, String schemaNamespace, ClassLoader loader) throws AxisFault
messageReceiverClassMap will hold the MessageReceivers for given meps. Key will be the mep and value will be the instance of the MessageReceiver class. Ex: Map mrMap = new HashMap(); mrMap.put("http://www.w3.org/ns/wsdl/in-only", RPCInOnlyMessageReceiver.class.newInstance()); mrMap.put("http://www.w3.org/ns/wsdl/in-out", RPCMessageReceiver.class.newInstance());- Parameters:
implClass-axisConfiguration-messageReceiverClassMap-targetNamespace-schemaNamespace-- Throws:
AxisFault
-
createService
public static AxisService createService(String implClass, String serviceName, AxisConfiguration axisConfiguration, Map<String,MessageReceiver> messageReceiverClassMap, String targetNamespace, ClassLoader loader, SchemaGenerator schemaGenerator, AxisService axisService) throws AxisFault
messageReceiverClassMap will hold the MessageReceivers for given meps. Key will be the mep and value will be the instance of the MessageReceiver class. Ex: Map mrMap = new HashMap(); mrMap.put("http://www.w3.org/ns/wsdl/in-only", RPCInOnlyMessageReceiver.class.newInstance()); mrMap.put("http://www.w3.org/ns/wsdl/in-out", RPCMessageReceiver.class.newInstance());- Parameters:
implClass-axisConfiguration-messageReceiverClassMap-targetNamespace-- Throws:
AxisFault
-
removeOperation
public void removeOperation(QName opName)
-
getNamespaceMap
public Map getNamespaceMap()
Get the namespace map for this service.- Returns:
- a Map of prefix (String) to namespace URI (String)
-
getImportedNamespaces
public List getImportedNamespaces()
Get the namespaces associated with imported WSDLs- Returns:
- a
Listof namespace URIs (String)
-
setImportedNamespaces
public void setImportedNamespaces(List importedNamespaces)
Set the namespaces associated with imported WSDLs- Parameters:
importedNamespaces-
-
setNamespaceMap
public void setNamespaceMap(org.apache.ws.commons.schema.utils.NamespaceMap namespaceMap)
-
populateSchemaMappings
public Map populateSchemaMappings()
-
populateSchemaMappings
public Map populateSchemaMappings(boolean overrideAbsoluteAddress)
runs the schema mappings if it has not been run previously it is best that this logic be in the axis service since one can call the axis service to populate the schema mappings
-
isClientSide
public boolean isClientSide()
-
setClientSide
public void setClientSide(boolean clientSide)
-
isElementFormDefault
public boolean isElementFormDefault()
-
setElementFormDefault
public void setElementFormDefault(boolean elementFormDefault)
-
isUseUserWSDL
public boolean isUseUserWSDL()
User can set a parameter in services.xml saying he want to show the original wsdl that he put into META-INF once someone ask for ?wsdl so if you want to use your own wsdl then add following parameter into services.xmltrue
-
isModifyUserWSDLPortAddress
public boolean isModifyUserWSDLPortAddress()
By default the port address in user WSDLs is modified, set the following parameter to override this behaviourfalse
-
getServiceLifeCycle
public ServiceLifeCycle getServiceLifeCycle()
-
setServiceLifeCycle
public void setServiceLifeCycle(ServiceLifeCycle serviceLifeCycle)
-
getP2nMap
public Map getP2nMap()
-
setP2nMap
public void setP2nMap(Map p2nMap)
-
getObjectSupplier
public ObjectSupplier getObjectSupplier()
-
setObjectSupplier
public void setObjectSupplier(ObjectSupplier objectSupplier)
-
getTypeTable
public TypeTable getTypeTable()
-
setTypeTable
public void setTypeTable(TypeTable typeTable)
-
getData
public Data[] getData(DataRetrievalRequest request, MessageContext msgContext) throws AxisFault
Find a data locator from the available data locators (both configured and default ones) to retrieve Metadata or data specified in the request.- Parameters:
request- anDataRetrievalRequestobjectmsgContext- message context- Returns:
- array of
Dataobject for the request. - Throws:
AxisFault
-
addDataLocatorClassNames
public void addDataLocatorClassNames(String dialect, String dataLocatorClassName)
Save data Locator configured at service level for this Axis Service- Parameters:
dialect- - an absolute URI represents the Dialect i.e. WSDL, Policy, Schema or "ServiceLevel" for non-dialect service level data locator.dataLocatorClassName- - class name of the Data Locator configured to support data retrieval for the specified dialect.
-
getDataLocator
public AxisDataLocator getDataLocator(LocatorType locatorType, String dialect) throws AxisFault
- Throws:
AxisFault
-
getGlobalDataLocator
public AxisDataLocator getGlobalDataLocator(String dialect) throws AxisFault
- Throws:
AxisFault
-
loadDataLocator
protected AxisDataLocator loadDataLocator(String className) throws AxisFault
- Throws:
AxisFault
-
setMessageElementQNameToOperationMap
public void setMessageElementQNameToOperationMap(Map messageElementQNameToOperationMap)
Set the map of WSDL message element QNames to AxisOperations for this service. This map is used during SOAP Body-based routing for document/literal bare services to match the first child element of the SOAP Body element to an operation. (Routing for RPC and document/literal wrapped services occurs via the operationsAliasesMap.) From section 4.7.6 of the WS-I BP 1.1: the "operation signature" is "the fully qualified name of the child element of SOAP body of the SOAP input message described by an operation in a WSDL binding," and thus this map must be from a QName to an operation.- Parameters:
messageElementQNameToOperationMap- The map from WSDL message element QNames to AxisOperations.
-
getOperationByMessageElementQName
public AxisOperation getOperationByMessageElementQName(QName messageElementQName)
Look up an AxisOperation for this service based off of an element QName from a WSDL message element.- Parameters:
messageElementQName- The QName to search for.- Returns:
- The AxisOperation registered to the QName or null if no match was found.
- See Also:
setMessageElementQNameToOperationMap(Map)
-
addMessageElementQNameToOperationMapping
public void addMessageElementQNameToOperationMapping(QName messageElementQName, AxisOperation operation)
Add an entry to the map between element QNames in WSDL messages and AxisOperations for this service.- Parameters:
messageElementQName- The QName of the element on the input message that maps to the given operation.operation- The AxisOperation to be mapped to.- See Also:
setMessageElementQNameToOperationMap(Map)
-
getEndpointURL
public String getEndpointURL()
Deprecated.
-
setEndpointURL
public void setEndpointURL(String endpointURL)
Deprecated.
-
getEndpoints
public Map<String,AxisEndpoint> getEndpoints()
-
isCustomWsdl
public boolean isCustomWsdl()
-
setCustomWsdl
public void setCustomWsdl(boolean customWsdl)
-
getOperationsNameList
public List getOperationsNameList()
-
setOperationsNameList
public void setOperationsNameList(List operationsNameList)
-
getAxisServiceGroup
public AxisServiceGroup getAxisServiceGroup()
-
setParent
public void setParent(AxisServiceGroup parent)
-
getExcludeInfo
public ExcludeInfo getExcludeInfo()
-
setExcludeInfo
public void setExcludeInfo(ExcludeInfo excludeInfo)
-
registerPolicy
public void registerPolicy(String key, org.apache.neethi.Policy policy)
-
lookupPolicy
public org.apache.neethi.Policy lookupPolicy(String key)
-
addMessageContextListener
public void addMessageContextListener(MessageContextListener scl)
Add a ServiceContextListener- Parameters:
scl-
-
removeMessageContextListener
public void removeMessageContextListener(MessageContextListener scl)
Remove a ServiceContextListener- Parameters:
scl-
-
hasMessageContextListener
public boolean hasMessageContextListener(Class cls)
- Parameters:
cls- Class of ServiceContextListener- Returns:
- true if ServiceContextLister is in the list
-
attachServiceContextEvent
public void attachServiceContextEvent(ServiceContext sc, MessageContext mc)
Signal an Attach ServiceContext Event- Parameters:
sc- ServiceContextmc- MessageContext
-
attachEnvelopeEvent
public void attachEnvelopeEvent(MessageContext mc)
Signal an Attach Envelope Event- Parameters:
mc- MessageContext
-
createClientSideAxisService
public static AxisService createClientSideAxisService(org.apache.woden.wsdl20.Description description, QName wsdlServiceName, String endPoint, Options options) throws AxisFault
returns a axisService given a input Stream of WSDL2.0 document.- Parameters:
description- WSDL descriptionwsdlServiceName-endPoint-options-- Returns:
- Throws:
AxisFault
-
-