org.apache.axis.description

Class OperationDesc

Implemented Interfaces:
Serializable

public class OperationDesc
extends java.lang.Object
implements Serializable

An OperationDesc is an abstract description of an operation on a service. !!! WORK IN PROGRESS
Author:
Glen Daniels (gdaniels@apache.org)

Field Summary

static int
MSG_METHOD_BODYARRAY
static int
MSG_METHOD_DOCUMENT
static int
MSG_METHOD_ELEMENTARRAY
static int
MSG_METHOD_NONCONFORMING
static int
MSG_METHOD_SOAPENVELOPE
protected static Log
log
static Map
mepStrings

Constructor Summary

OperationDesc()
Default constructor.
OperationDesc(String name, ParameterDesc[] parameters, QName returnQName)
"Complete" constructor

Method Summary

void
addFault(FaultDesc fault)
void
addParameter(QName paramName, QName xmlType, Class javaType, byte parameterMode, boolean inHeader, boolean outHeader)
void
addParameter(ParameterDesc param)
ArrayList
getAllInParams()
Return a list of ALL "in" params (including INOUTs) Note: if we were sure the order went IN->INOUT->OUT, we could optimize this.
ArrayList
getAllOutParams()
Return a list of ALL "out" params (including INOUTs) Note: if we were sure the order went IN->INOUT->OUT, we could optimize this.
String
getDocumentation()
get the documentation for the operation
QName
getElementQName()
FaultDesc
getFaultByClass(Class cls)
Returns the FaultDesc for the fault class given.
FaultDesc
getFaultByClass(Class cls, boolean checkParents)
Returns the FaultDesc for the fault class given.
FaultDesc
getFaultByQName(QName qname)
Returns the FaultDesc for a QName (which is typically found in the details element of a SOAP fault).
FaultDesc
getFaultByXmlType(QName xmlType)
Returns the FaultDesc for an XMLType.
ArrayList
getFaults()
ParameterDesc
getInputParamByQName(QName qname)
OperationType
getMep()
int
getMessageOperationStyle()
Method
getMethod()
String
getName()
Return the operation's name
int
getNumInParams()
int
getNumOutParams()
int
getNumParams()
ArrayList
getOutParams()
Returns an ordered list of out params (NOT inouts)
ParameterDesc
getOutputParamByQName(QName qname)
ParameterDesc
getParamByQName(QName qname)
ParameterDesc
getParameter(int i)
ArrayList
getParameters()
ServiceDesc
getParent()
Class
getReturnClass()
ParameterDesc
getReturnParamDesc()
QName
getReturnQName()
QName
getReturnType()
String
getSoapAction()
Style
getStyle()
Return the style of the operation, defaulting to the parent ServiceDesc's style if we don't have one explicitly set.
Use
getUse()
Return the use of the operation, defaulting to the parent ServiceDesc's use if we don't have one explicitly set.
boolean
isReturnHeader()
Is the return value in the header of the response message?
void
setDocumentation(String documentation)
set the documentation for the operation
void
setElementQName(QName elementQName)
void
setMep(OperationType mep)
void
setMep(String mepString)
Set the MEP using a string like "request-response"
void
setMessageOperationStyle(int messageOperationStyle)
void
setMethod(Method method)
void
setName(String name)
Set the operation's name
void
setParameters(ArrayList newParameters)
Set the parameters wholesale.
void
setParent(ServiceDesc parent)
void
setReturnClass(Class returnClass)
void
setReturnHeader(boolean value)
Set whether the return value is in the response message.
void
setReturnQName(QName returnQName)
void
setReturnType(QName returnType)
void
setSoapAction(String soapAction)
void
setStyle(Style style)
void
setUse(Use use)
String
toString()
String
toString(String indent)

Field Details

MSG_METHOD_BODYARRAY

public static final int MSG_METHOD_BODYARRAY
Field Value:
1

MSG_METHOD_DOCUMENT

public static final int MSG_METHOD_DOCUMENT
Field Value:
4

MSG_METHOD_ELEMENTARRAY

public static final int MSG_METHOD_ELEMENTARRAY
Field Value:
3

MSG_METHOD_NONCONFORMING

public static final int MSG_METHOD_NONCONFORMING
Field Value:
-4

MSG_METHOD_SOAPENVELOPE

public static final int MSG_METHOD_SOAPENVELOPE
Field Value:
2

log

protected static Log log

mepStrings

public static Map mepStrings

Constructor Details

OperationDesc

public OperationDesc()
Default constructor.

OperationDesc

public OperationDesc(String name,
                     ParameterDesc[] parameters,
                     QName returnQName)
"Complete" constructor

Method Details

addFault

public void addFault(FaultDesc fault)

addParameter

public void addParameter(QName paramName,
                         QName xmlType,
                         Class javaType,
                         byte parameterMode,
                         boolean inHeader,
                         boolean outHeader)

addParameter

public void addParameter(ParameterDesc param)

getAllInParams

public ArrayList getAllInParams()
Return a list of ALL "in" params (including INOUTs) Note: if we were sure the order went IN->INOUT->OUT, we could optimize this.
Returns:

getAllOutParams

public ArrayList getAllOutParams()
Return a list of ALL "out" params (including INOUTs) Note: if we were sure the order went IN->INOUT->OUT, we could optimize this.
Returns:

getDocumentation

public String getDocumentation()
get the documentation for the operation

getElementQName

public QName getElementQName()

getFaultByClass

public FaultDesc getFaultByClass(Class cls)
Returns the FaultDesc for the fault class given. Returns null if not found.

getFaultByClass

public FaultDesc getFaultByClass(Class cls,
                                 boolean checkParents)
Returns the FaultDesc for the fault class given. Returns null if not found.

getFaultByQName

public FaultDesc getFaultByQName(QName qname)
Returns the FaultDesc for a QName (which is typically found in the details element of a SOAP fault). Returns null if not found.

getFaultByXmlType

public FaultDesc getFaultByXmlType(QName xmlType)
Returns the FaultDesc for an XMLType. Returns null if not found.

getFaults

public ArrayList getFaults()

getInputParamByQName

public ParameterDesc getInputParamByQName(QName qname)

getMep

public OperationType getMep()

getMessageOperationStyle

public int getMessageOperationStyle()

getMethod

public Method getMethod()

getName

public String getName()
Return the operation's name

getNumInParams

public int getNumInParams()

getNumOutParams

public int getNumOutParams()

getNumParams

public int getNumParams()

getOutParams

public ArrayList getOutParams()
Returns an ordered list of out params (NOT inouts)

getOutputParamByQName

public ParameterDesc getOutputParamByQName(QName qname)

getParamByQName

public ParameterDesc getParamByQName(QName qname)

getParameter

public ParameterDesc getParameter(int i)

getParameters

public ArrayList getParameters()

getParent

public ServiceDesc getParent()

getReturnClass

public Class getReturnClass()

getReturnParamDesc

public ParameterDesc getReturnParamDesc()

getReturnQName

public QName getReturnQName()

getReturnType

public QName getReturnType()

getSoapAction

public String getSoapAction()

getStyle

public Style getStyle()
Return the style of the operation, defaulting to the parent ServiceDesc's style if we don't have one explicitly set.

getUse

public Use getUse()
Return the use of the operation, defaulting to the parent ServiceDesc's use if we don't have one explicitly set.

isReturnHeader

public boolean isReturnHeader()
Is the return value in the header of the response message?

setDocumentation

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

setElementQName

public void setElementQName(QName elementQName)

setMep

public void setMep(OperationType mep)

setMep

public void setMep(String mepString)
Set the MEP using a string like "request-response"
Parameters:
mepString -

setMessageOperationStyle

public void setMessageOperationStyle(int messageOperationStyle)

setMethod

public void setMethod(Method method)

setName

public void setName(String name)
Set the operation's name

setParameters

public void setParameters(ArrayList newParameters)
Set the parameters wholesale.
Parameters:
newParameters - an ArrayList of ParameterDescs

setParent

public void setParent(ServiceDesc parent)

setReturnClass

public void setReturnClass(Class returnClass)

setReturnHeader

public void setReturnHeader(boolean value)
Set whether the return value is in the response message.

setReturnQName

public void setReturnQName(QName returnQName)

setReturnType

public void setReturnType(QName returnType)

setSoapAction

public void setSoapAction(String soapAction)

setStyle

public void setStyle(Style style)

setUse

public void setUse(Use use)

toString

public String toString()

toString

public String toString(String indent)

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