org.codehaus.xfire.annotations
Class WebParamAnnotation

java.lang.Object
  extended byorg.codehaus.xfire.annotations.WebParamAnnotation
Direct Known Subclasses:
WebParam

public class WebParamAnnotation
extends java.lang.Object

Represents a common representation of a web parameter annotation. Customizes the mapping of an individual parameter to a Web Service message part and XML element.

Author:
Arjen Poutsma

Field Summary
static int MODE_IN
          Constant used to specify that a parameter flows inwards.
static int MODE_INOUT
          Constant used to specify that a parameter flows both in and outwards.
static int MODE_OUT
          Constant used to specify that a parameter flows outwards.
 
Constructor Summary
WebParamAnnotation()
           
 
Method Summary
 int getMode()
          Returns the direction in which the parameter is flowing.
 java.lang.String getName()
          Returns the name of the parameter as it appears in the WSDL.
 java.lang.String getPartName()
           
 java.lang.String getTargetNamespace()
          Returns the XML namespace for the parameter.
 boolean isHeader()
          If true, the parameter is pulled from a message header rather then the message body.
 void setHeader(boolean header)
          Determines whether this parameter is a header.
 void setMode(int mode)
          Sets the direction in which the parameter is flowing.
 void setName(java.lang.String name)
          Sets the name of the parameter as it appears in the WSDL.
 void setPartName(java.lang.String partName)
           
 void setTargetNamespace(java.lang.String targetNamespace)
          Sets the XML namespace for the parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODE_IN

public static final int MODE_IN
Constant used to specify that a parameter flows inwards. This is the default mode.

See Also:
Constant Field Values

MODE_INOUT

public static final int MODE_INOUT
Constant used to specify that a parameter flows both in and outwards.

See Also:
Constant Field Values

MODE_OUT

public static final int MODE_OUT
Constant used to specify that a parameter flows outwards.

See Also:
Constant Field Values
Constructor Detail

WebParamAnnotation

public WebParamAnnotation()
Method Detail

getPartName

public java.lang.String getPartName()

setPartName

public void setPartName(java.lang.String partName)

getName

public java.lang.String getName()
Returns the name of the parameter as it appears in the WSDL. For RPC bindings, this is name of the wsdl:part representing the parameter. For document bindings, this is the local name of the XML element representing the parameter. Defaults to the name of the parameter as it appears in the argument list.

Returns:
the name of the parameter as it appears in the WSDL.

setName

public void setName(java.lang.String name)
Sets the name of the parameter as it appears in the WSDL. For RPC bindings, this is name of the wsdl:part representing the parameter. For document bindings, this is the local name of the XML element representing the parameter. Defaults to the name of the parameter as it appears in the argument list.

Parameters:
name - the new name of the parameter as it appears in the WSDL.

getTargetNamespace

public java.lang.String getTargetNamespace()
Returns the XML namespace for the parameter. Only used with document bindings, where the parameter maps to an XML element. Defaults to the targetNamespace for the Web Service.

Returns:
the XML namespace for the parameter.

setTargetNamespace

public void setTargetNamespace(java.lang.String targetNamespace)
Sets the XML namespace for the parameter. Only used with document bindings, where the parameter maps to an XML element. Defaults to the targetNamespace for the Web Service.

Parameters:
targetNamespace - the XML namespace for the parameter.

getMode

public int getMode()
Returns the direction in which the parameter is flowing. One of MODE_IN, MODE_OUT, or MODE_INOUT.

Returns:
the parameter mode.

setMode

public void setMode(int mode)
Sets the direction in which the parameter is flowing. The given parameter must be of MODE_IN, MODE_OUT, or MODE_INOUT.

Parameters:
mode - the new parameter mode.
Throws:
java.lang.IllegalArgumentException - if mode is not a valid mode.

isHeader

public boolean isHeader()
If true, the parameter is pulled from a message header rather then the message body.

Returns:
true if a header; false otherwise.

setHeader

public void setHeader(boolean header)
Determines whether this parameter is a header.

Parameters:
header - true if a header; false otherwise.


Copyright © 2004-2006 null. All Rights Reserved.