Package org.apache.axis.description
Class JavaServiceDesc
- java.lang.Object
-
- org.apache.axis.description.JavaServiceDesc
-
- All Implemented Interfaces:
java.io.Serializable,ServiceDesc
public class JavaServiceDesc extends java.lang.Object implements ServiceDesc
A ServiceDesc is an abstract description of a service. ServiceDescs contain OperationDescs, which are descriptions of operations. The information about a service's operations comes from one of two places: 1) deployment, or 2) introspection.- Author:
- Glen Daniels (gdaniels@apache.org)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.commons.logging.Loglog
-
Constructor Summary
Constructors Constructor Description JavaServiceDesc()Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddOperationDesc(OperationDesc operation)java.util.ListgetAllowedMethods()java.lang.StringgetDefaultNamespace()java.util.ListgetDisallowedMethods()java.lang.StringgetDocumentation()get the documentation for the servicejava.lang.StringgetEndpointURL()java.lang.ClassgetImplClass()java.lang.StringgetName()the name of the serviceOperationDescgetOperationByElementQName(QName qname)Map an XML QName to an operation.OperationDescgetOperationByName(java.lang.String methodName)Return an operation matching the given method name.java.util.ArrayListgetOperations()get all the operations as a list of OperationDescs.OperationDesc[]getOperationsByName(java.lang.String methodName)get all overloaded operations by nameOperationDesc[]getOperationsByQName(QName qname)Return all operations which match this QName (i.e.java.lang.ObjectgetProperty(java.lang.String name)java.util.ArrayListgetStopClasses()StylegetStyle()What kind of service is this?TypeMappinggetTypeMapping()TypeMappingRegistrygetTypeMappingRegistry()UsegetUse()What kind of use is this?java.lang.StringgetWSDLFile()the wsdl file of the service.booleanisInitialized()booleanisWrapped()Determine whether or not this is a "wrapped" invocation, i.e.voidloadServiceDescByIntrospection()Fill in a service description by introspecting the implementation class.voidloadServiceDescByIntrospection(java.lang.Class implClass)Fill in a service description by introspecting the implementation class.voidloadServiceDescByIntrospection(java.lang.Class cls, TypeMapping tm)Fill in a service description by introspecting the implementation class.voidremoveOperationDesc(OperationDesc operation)voidsetAllowedMethods(java.util.List allowedMethods)voidsetDefaultNamespace(java.lang.String namespace)voidsetDisallowedMethods(java.util.List disallowedMethods)voidsetDocumentation(java.lang.String documentation)set the documentation for the servicevoidsetEndpointURL(java.lang.String endpointURL)voidsetImplClass(java.lang.Class implClass)set the implementation classvoidsetName(java.lang.String name)the name of the servicevoidsetNamespaceMappings(java.util.List namespaces)voidsetProperty(java.lang.String name, java.lang.Object value)voidsetStopClasses(java.util.ArrayList stopClasses)voidsetStyle(Style style)voidsetTypeMapping(TypeMapping tm)voidsetTypeMappingRegistry(TypeMappingRegistry tmr)voidsetUse(Use use)voidsetWSDLFile(java.lang.String wsdlFileName)set the wsdl file of the service; this causes the named file to be returned on a ?wsdl, probe, not introspection generated wsdl.
-
-
-
Method Detail
-
getStyle
public Style getStyle()
What kind of service is this?- Specified by:
getStylein interfaceServiceDesc- Returns:
-
setStyle
public void setStyle(Style style)
- Specified by:
setStylein interfaceServiceDesc
-
getUse
public Use getUse()
What kind of use is this?- Specified by:
getUsein interfaceServiceDesc- Returns:
-
setUse
public void setUse(Use use)
- Specified by:
setUsein interfaceServiceDesc
-
isWrapped
public boolean isWrapped()
Determine whether or not this is a "wrapped" invocation, i.e. whether the outermost XML element of the "main" body element represents a method call, with the immediate children of that element representing arguments to the method.- Specified by:
isWrappedin interfaceServiceDesc- Returns:
- true if this is wrapped (i.e. RPC or WRAPPED style), false otherwise
-
getWSDLFile
public java.lang.String getWSDLFile()
the wsdl file of the service. When null, it means that the wsdl should be autogenerated- Specified by:
getWSDLFilein interfaceServiceDesc- Returns:
- filename or null
-
setWSDLFile
public void setWSDLFile(java.lang.String wsdlFileName)
set the wsdl file of the service; this causes the named file to be returned on a ?wsdl, probe, not introspection generated wsdl.- Specified by:
setWSDLFilein interfaceServiceDesc- Parameters:
wsdlFileName- filename or null to re-enable introspection
-
getAllowedMethods
public java.util.List getAllowedMethods()
- Specified by:
getAllowedMethodsin interfaceServiceDesc
-
setAllowedMethods
public void setAllowedMethods(java.util.List allowedMethods)
- Specified by:
setAllowedMethodsin interfaceServiceDesc
-
getImplClass
public java.lang.Class getImplClass()
-
setImplClass
public void setImplClass(java.lang.Class implClass)
set the implementation classWarning: You cannot call getInitializedServiceDesc() after setting this as it uses this to indicate its work has already been done.
- Parameters:
implClass-- Throws:
java.lang.IllegalArgumentException- if the implementation class is already set
-
getTypeMapping
public TypeMapping getTypeMapping()
- Specified by:
getTypeMappingin interfaceServiceDesc
-
setTypeMapping
public void setTypeMapping(TypeMapping tm)
- Specified by:
setTypeMappingin interfaceServiceDesc
-
getName
public java.lang.String getName()
the name of the service- Specified by:
getNamein interfaceServiceDesc
-
setName
public void setName(java.lang.String name)
the name of the service- Specified by:
setNamein interfaceServiceDesc- Parameters:
name-
-
getDocumentation
public java.lang.String getDocumentation()
get the documentation for the service- Specified by:
getDocumentationin interfaceServiceDesc
-
setDocumentation
public void setDocumentation(java.lang.String documentation)
set the documentation for the service- Specified by:
setDocumentationin interfaceServiceDesc
-
getStopClasses
public java.util.ArrayList getStopClasses()
-
setStopClasses
public void setStopClasses(java.util.ArrayList stopClasses)
-
getDisallowedMethods
public java.util.List getDisallowedMethods()
- Specified by:
getDisallowedMethodsin interfaceServiceDesc
-
setDisallowedMethods
public void setDisallowedMethods(java.util.List disallowedMethods)
- Specified by:
setDisallowedMethodsin interfaceServiceDesc
-
removeOperationDesc
public void removeOperationDesc(OperationDesc operation)
- Specified by:
removeOperationDescin interfaceServiceDesc
-
addOperationDesc
public void addOperationDesc(OperationDesc operation)
- Specified by:
addOperationDescin interfaceServiceDesc
-
getOperations
public java.util.ArrayList getOperations()
get all the operations as a list of OperationDescs. this method triggers an evaluation of the valid operations by introspection, so use sparingly- Specified by:
getOperationsin interfaceServiceDesc- Returns:
- reference to the operations array. This is not a copy
-
getOperationsByName
public OperationDesc[] getOperationsByName(java.lang.String methodName)
get all overloaded operations by name- Specified by:
getOperationsByNamein interfaceServiceDesc- Parameters:
methodName-- Returns:
- null for no match, or an array of OperationDesc objects
-
getOperationByName
public OperationDesc getOperationByName(java.lang.String methodName)
Return an operation matching the given method name. Note that if we have multiple overloads for this method, we will return the first one.- Specified by:
getOperationByNamein interfaceServiceDesc- Returns:
- null for no match
-
getOperationByElementQName
public OperationDesc getOperationByElementQName(QName qname)
Map an XML QName to an operation. Returns the first one it finds in the case of mulitple matches.- Specified by:
getOperationByElementQNamein interfaceServiceDesc- Returns:
- null for no match
-
getOperationsByQName
public OperationDesc[] getOperationsByQName(QName qname)
Return all operations which match this QName (i.e. get all the overloads)- Specified by:
getOperationsByQNamein interfaceServiceDesc- Returns:
- null for no match
-
loadServiceDescByIntrospection
public void loadServiceDescByIntrospection()
Fill in a service description by introspecting the implementation class.
-
loadServiceDescByIntrospection
public void loadServiceDescByIntrospection(java.lang.Class implClass)
Fill in a service description by introspecting the implementation class.
-
loadServiceDescByIntrospection
public void loadServiceDescByIntrospection(java.lang.Class cls, TypeMapping tm)Fill in a service description by introspecting the implementation class. This version takes the implementation class and the in-scope TypeMapping.
-
setNamespaceMappings
public void setNamespaceMappings(java.util.List namespaces)
- Specified by:
setNamespaceMappingsin interfaceServiceDesc
-
getDefaultNamespace
public java.lang.String getDefaultNamespace()
- Specified by:
getDefaultNamespacein interfaceServiceDesc
-
setDefaultNamespace
public void setDefaultNamespace(java.lang.String namespace)
- Specified by:
setDefaultNamespacein interfaceServiceDesc
-
setProperty
public void setProperty(java.lang.String name, java.lang.Object value)- Specified by:
setPropertyin interfaceServiceDesc
-
getProperty
public java.lang.Object getProperty(java.lang.String name)
- Specified by:
getPropertyin interfaceServiceDesc
-
getEndpointURL
public java.lang.String getEndpointURL()
- Specified by:
getEndpointURLin interfaceServiceDesc
-
setEndpointURL
public void setEndpointURL(java.lang.String endpointURL)
- Specified by:
setEndpointURLin interfaceServiceDesc
-
getTypeMappingRegistry
public TypeMappingRegistry getTypeMappingRegistry()
- Specified by:
getTypeMappingRegistryin interfaceServiceDesc
-
setTypeMappingRegistry
public void setTypeMappingRegistry(TypeMappingRegistry tmr)
- Specified by:
setTypeMappingRegistryin interfaceServiceDesc
-
isInitialized
public boolean isInitialized()
- Specified by:
isInitializedin interfaceServiceDesc
-
-