org.apache.axis.description

Class JavaServiceDesc

Implemented Interfaces:
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)

Field Summary

protected static Log
log

Constructor Summary

JavaServiceDesc()
Default constructor

Method Summary

void
addOperationDesc(OperationDesc operation)
List
getAllowedMethods()
String
getDefaultNamespace()
List
getDisallowedMethods()
String
getDocumentation()
get the documentation for the service
String
getEndpointURL()
Class
getImplClass()
String
getName()
the name of the service
OperationDesc
getOperationByElementQName(QName qname)
Map an XML QName to an operation.
OperationDesc
getOperationByName(String methodName)
Return an operation matching the given method name.
ArrayList
getOperations()
get all the operations as a list of OperationDescs.
OperationDesc[]
getOperationsByName(String methodName)
get all overloaded operations by name
OperationDesc[]
getOperationsByQName(QName qname)
Return all operations which match this QName (i.e.
Object
getProperty(String name)
ArrayList
getStopClasses()
Style
getStyle()
What kind of service is this?
TypeMapping
getTypeMapping()
TypeMappingRegistry
getTypeMappingRegistry()
Use
getUse()
What kind of use is this?
String
getWSDLFile()
the wsdl file of the service.
boolean
isInitialized()
boolean
isWrapped()
Determine whether or not this is a "wrapped" invocation, i.e.
void
loadServiceDescByIntrospection()
Fill in a service description by introspecting the implementation class.
void
loadServiceDescByIntrospection(Class implClass)
Fill in a service description by introspecting the implementation class.
void
loadServiceDescByIntrospection(Class cls, TypeMapping tm)
Fill in a service description by introspecting the implementation class.
void
removeOperationDesc(OperationDesc operation)
void
setAllowedMethods(List allowedMethods)
void
setDefaultNamespace(String namespace)
void
setDisallowedMethods(List disallowedMethods)
void
setDocumentation(String documentation)
set the documentation for the service
void
setEndpointURL(String endpointURL)
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.

void
setName(String name)
the name of the service
void
setNamespaceMappings(List namespaces)
void
setProperty(String name, Object value)
void
setStopClasses(ArrayList stopClasses)
void
setStyle(Style style)
void
setTypeMapping(TypeMapping tm)
void
setTypeMappingRegistry(TypeMappingRegistry tmr)
void
setUse(Use use)
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.

Field Details

log

protected static Log log

Constructor Details

JavaServiceDesc

public JavaServiceDesc()
Default constructor

Method Details

addOperationDesc

public void addOperationDesc(OperationDesc operation)
Specified by:
addOperationDesc in interface ServiceDesc


getAllowedMethods

public List getAllowedMethods()
Specified by:
getAllowedMethods in interface ServiceDesc


getDefaultNamespace

public String getDefaultNamespace()
Specified by:
getDefaultNamespace in interface ServiceDesc


getDisallowedMethods

public List getDisallowedMethods()
Specified by:
getDisallowedMethods in interface ServiceDesc


getDocumentation

public String getDocumentation()
get the documentation for the service
Specified by:
getDocumentation in interface ServiceDesc


getEndpointURL

public String getEndpointURL()
Specified by:
getEndpointURL in interface ServiceDesc


getImplClass

public Class getImplClass()


getName

public String getName()
the name of the service
Specified by:
getName in interface ServiceDesc


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:
getOperationByElementQName in interface ServiceDesc

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.
Specified by:
getOperationByName in interface ServiceDesc

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
Specified by:
getOperations in interface ServiceDesc

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


getOperationsByName

public OperationDesc[] getOperationsByName(String methodName)
get all overloaded operations by name
Specified by:
getOperationsByName in interface ServiceDesc

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)
Specified by:
getOperationsByQName in interface ServiceDesc

Returns:
null for no match


getProperty

public Object getProperty(String name)
Specified by:
getProperty in interface ServiceDesc


getStopClasses

public ArrayList getStopClasses()


getStyle

public Style getStyle()
What kind of service is this?
Specified by:
getStyle in interface ServiceDesc

Returns:


getTypeMapping

public TypeMapping getTypeMapping()
Specified by:
getTypeMapping in interface ServiceDesc


getTypeMappingRegistry

public TypeMappingRegistry getTypeMappingRegistry()
Specified by:
getTypeMappingRegistry in interface ServiceDesc


getUse

public Use getUse()
What kind of use is this?
Specified by:
getUse in interface ServiceDesc

Returns:


getWSDLFile

public String getWSDLFile()
the wsdl file of the service. When null, it means that the wsdl should be autogenerated
Specified by:
getWSDLFile in interface ServiceDesc

Returns:
filename or null


isInitialized

public boolean isInitialized()
Specified by:
isInitialized in interface ServiceDesc


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:
isWrapped in interface ServiceDesc

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)
Specified by:
removeOperationDesc in interface ServiceDesc


setAllowedMethods

public void setAllowedMethods(List allowedMethods)
Specified by:
setAllowedMethods in interface ServiceDesc


setDefaultNamespace

public void setDefaultNamespace(String namespace)
Specified by:
setDefaultNamespace in interface ServiceDesc


setDisallowedMethods

public void setDisallowedMethods(List disallowedMethods)
Specified by:
setDisallowedMethods in interface ServiceDesc


setDocumentation

public void setDocumentation(String documentation)
set the documentation for the service
Specified by:
setDocumentation in interface ServiceDesc


setEndpointURL

public void setEndpointURL(String endpointURL)
Specified by:
setEndpointURL in interface ServiceDesc


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 -


setName

public void setName(String name)
the name of the service
Specified by:
setName in interface ServiceDesc

Parameters:
name -


setNamespaceMappings

public void setNamespaceMappings(List namespaces)
Specified by:
setNamespaceMappings in interface ServiceDesc


setProperty

public void setProperty(String name,
                        Object value)
Specified by:
setProperty in interface ServiceDesc


setStopClasses

public void setStopClasses(ArrayList stopClasses)


setStyle

public void setStyle(Style style)
Specified by:
setStyle in interface ServiceDesc


setTypeMapping

public void setTypeMapping(TypeMapping tm)
Specified by:
setTypeMapping in interface ServiceDesc


setTypeMappingRegistry

public void setTypeMappingRegistry(TypeMappingRegistry tmr)
Specified by:
setTypeMappingRegistry in interface ServiceDesc


setUse

public void setUse(Use use)
Specified by:
setUse in interface ServiceDesc


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.
Specified by:
setWSDLFile in interface ServiceDesc

Parameters:
wsdlFileName - filename or null to re-enable introspection


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