org.apache.axis.description

Class JavaServiceDesc

public class JavaServiceDesc extends 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)

Field Summary
protected static Loglog
Constructor Summary
JavaServiceDesc()
Default constructor
Method Summary
voidaddOperationDesc(OperationDesc operation)
ListgetAllowedMethods()
StringgetDefaultNamespace()
ListgetDisallowedMethods()
StringgetDocumentation()
get the documentation for the service
StringgetEndpointURL()
ClassgetImplClass()
StringgetName()
the name of the service
OperationDescgetOperationByElementQName(QName qname)
Map an XML QName to an operation.
OperationDescgetOperationByName(String methodName)
Return an operation matching the given method name.
ArrayListgetOperations()
get all the operations as a list of OperationDescs. this method triggers an evaluation of the valid operations by introspection, so use sparingly
OperationDesc[]getOperationsByName(String methodName)
get all overloaded operations by name
OperationDesc[]getOperationsByQName(QName qname)
Return all operations which match this QName (i.e. get all the overloads)
ObjectgetProperty(String name)
ArrayListgetStopClasses()
StylegetStyle()
What kind of service is this?
TypeMappinggetTypeMapping()
TypeMappingRegistrygetTypeMappingRegistry()
UsegetUse()
What kind of use is this?
StringgetWSDLFile()
the wsdl file of the service.
booleanisInitialized()
booleanisWrapped()
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.
voidloadServiceDescByIntrospection()
Fill in a service description by introspecting the implementation class.
voidloadServiceDescByIntrospection(Class implClass)
Fill in a service description by introspecting the implementation class.
voidloadServiceDescByIntrospection(Class cls, TypeMapping tm)
Fill in a service description by introspecting the implementation class.
voidremoveOperationDesc(OperationDesc operation)
voidsetAllowedMethods(List allowedMethods)
voidsetDefaultNamespace(String namespace)
voidsetDisallowedMethods(List disallowedMethods)
voidsetDocumentation(String documentation)
set the documentation for the service
voidsetEndpointURL(String endpointURL)
voidsetImplClass(Class implClass)
set the implementation class

Warning: You cannot call getInitializedServiceDesc() after setting this as it uses this to indicate its work has already been done.

voidsetName(String name)
the name of the service
voidsetNamespaceMappings(List namespaces)
voidsetProperty(String name, Object value)
voidsetStopClasses(ArrayList stopClasses)
voidsetStyle(Style style)
voidsetTypeMapping(TypeMapping tm)
voidsetTypeMappingRegistry(TypeMappingRegistry tmr)
voidsetUse(Use use)
voidsetWSDLFile(String wsdlFileName)
set the wsdl file of the service; this causes the named file to be returned on a ?

Field Detail

log

protected static Log log

Constructor Detail

JavaServiceDesc

public JavaServiceDesc()
Default constructor

Method Detail

addOperationDesc

public void addOperationDesc(OperationDesc operation)

getAllowedMethods

public List getAllowedMethods()

getDefaultNamespace

public String getDefaultNamespace()

getDisallowedMethods

public List getDisallowedMethods()

getDocumentation

public String getDocumentation()
get the documentation for the service

getEndpointURL

public String getEndpointURL()

getImplClass

public Class getImplClass()

getName

public String getName()
the name of the service

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.

Returns: null for no match

getOperationByName

public OperationDesc getOperationByName(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.

Returns: null for no match

getOperations

public 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

Returns: reference to the operations array. This is not a copy

getOperationsByName

public OperationDesc[] getOperationsByName(String methodName)
get all overloaded operations by name

Parameters: methodName

Returns: null for no match, or an array of OperationDesc objects

getOperationsByQName

public OperationDesc[] getOperationsByQName(QName qname)
Return all operations which match this QName (i.e. get all the overloads)

Returns: null for no match

getProperty

public Object getProperty(String name)

getStopClasses

public ArrayList getStopClasses()

getStyle

public Style getStyle()
What kind of service is this?

Returns:

getTypeMapping

public TypeMapping getTypeMapping()

getTypeMappingRegistry

public TypeMappingRegistry getTypeMappingRegistry()

getUse

public Use getUse()
What kind of use is this?

Returns:

getWSDLFile

public String getWSDLFile()
the wsdl file of the service. When null, it means that the wsdl should be autogenerated

Returns: filename or null

isInitialized

public boolean isInitialized()

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.

Returns: true if this is wrapped (i.e. RPC or WRAPPED style), false otherwise

loadServiceDescByIntrospection

public void loadServiceDescByIntrospection()
Fill in a service description by introspecting the implementation class.

loadServiceDescByIntrospection

public void loadServiceDescByIntrospection(Class implClass)
Fill in a service description by introspecting the implementation class.

loadServiceDescByIntrospection

public void loadServiceDescByIntrospection(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.

removeOperationDesc

public void removeOperationDesc(OperationDesc operation)

setAllowedMethods

public void setAllowedMethods(List allowedMethods)

setDefaultNamespace

public void setDefaultNamespace(String namespace)

setDisallowedMethods

public void setDisallowedMethods(List disallowedMethods)

setDocumentation

public void setDocumentation(String documentation)
set the documentation for the service

setEndpointURL

public void setEndpointURL(String endpointURL)

setImplClass

public void setImplClass(Class implClass)
set the implementation class

Warning: You cannot call getInitializedServiceDesc() after setting this as it uses this to indicate its work has already been done.

Parameters: implClass

Throws: IllegalArgumentException if the implementation class is already set

setName

public void setName(String name)
the name of the service

Parameters: name

setNamespaceMappings

public void setNamespaceMappings(List namespaces)

setProperty

public void setProperty(String name, Object value)

setStopClasses

public void setStopClasses(ArrayList stopClasses)

setStyle

public void setStyle(Style style)

setTypeMapping

public void setTypeMapping(TypeMapping tm)

setTypeMappingRegistry

public void setTypeMappingRegistry(TypeMappingRegistry tmr)

setUse

public void setUse(Use use)

setWSDLFile

public void setWSDLFile(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.

Parameters: wsdlFileName filename or null to re-enable introspection

Copyright B) 2005 Apache Web Services Project. All Rights Reserved.