javax.xml.rpc
Interface Call


public interface Call

The javax.xml.rpc.Call interface provides support for dynamic invocation of a service port. The javax.xml.rpc.Service interface acts as a factory for the creation of Call instances. Once a Call instance is created, various setter and getter methods may be used to configure this Call instance. The properties configured on a Call instance include the following:


Field Summary
static int PARAM_MODE_IN
           
static int PARAM_MODE_INOUT
           
static int PARAM_MODE_OUT
           
 
Method Summary
 void addParameter(java.lang.String paramName, QName xmlType, int parameterMode)
          Adds a parameter type and mode for a specific operation.
 java.lang.String getOperationName()
          Gets the name of the operation to be invoked using this Call instance.
 QName getPortTypeName()
          Gets the qualified name of the port type.
 java.lang.Object getProperty(java.lang.String name)
          Gets the value of a named property.
 java.lang.String getTargetEndpointAddress()
          Gets the endpoint address of a target service port.
 java.lang.Object invoke(java.lang.Object[] parameters)
          Invokes a specific operation using a synchronous request-response interaction mode.
 void invokeOneWay(java.lang.Object[] parameters)
          Invokes a remote method using the one-way interaction mode.
 void removeAllParameters()
          Removes all specified parameters from this Call instance.
 void removeProperty(java.lang.String name)
          Removes a named property.
 void setOperationName(java.lang.String operationName)
          Sets the name of the operation to be invoked using this Call instance.
 void setPortTypeName(QName portType)
          Sets the qualified name of the port type.
 void setProperty(java.lang.String name, java.lang.Object value)
          Sets the value for a named property.
 void setReturnType(QName xmlType)
          Sets the return type for a specific operation.
 void setTargetEndpointAddress(java.lang.String address)
          Sets the endpoint address of the target service port.
 

Field Detail

PARAM_MODE_IN

public static final int PARAM_MODE_IN

PARAM_MODE_OUT

public static final int PARAM_MODE_OUT

PARAM_MODE_INOUT

public static final int PARAM_MODE_INOUT
Method Detail

addParameter

public void addParameter(java.lang.String paramName,
                         QName xmlType,
                         int parameterMode)
Adds a parameter type and mode for a specific operation. Note that the client code is not required to call any addParameter and setReturnType methods before calling the invoke method. A Call implementation class can determine the parameter types by using the Java reflection and configured type mapping registry.
Parameters:
paramName - Name of the parameter
xmlType - XML datatype of the parameter
parameterMode - Mode of the parameter-whether PARAM_MODE_IN, PARAM_MODE_OUT or PARAM_MODE_INOUT
Throws:
java.lang.IllegalArgumentException -  

setReturnType

public void setReturnType(QName xmlType)
Sets the return type for a specific operation.
Parameters:
type - XML data type of the return value
Throws:
java.lang.IllegalArgumentException -  

removeAllParameters

public void removeAllParameters()
Removes all specified parameters from this Call instance.

getOperationName

public java.lang.String getOperationName()
Gets the name of the operation to be invoked using this Call instance.
Returns:
Name of the operation

setOperationName

public void setOperationName(java.lang.String operationName)
Sets the name of the operation to be invoked using this Call instance.
Parameters:
operationName - Name of the operation to be invoked using the Call instance

getPortTypeName

public QName getPortTypeName()
Gets the qualified name of the port type.
Returns:
Qualified name of the port type

setPortTypeName

public void setPortTypeName(QName portType)
Sets the qualified name of the port type.
Parameters:
portType - Qualified name of the port type

setTargetEndpointAddress

public void setTargetEndpointAddress(java.lang.String address)
Sets the endpoint address of the target service port. This address must correspond to the transport specified in the binding for this Call instance.
Parameters:
address - Endpoint address of the target service port; specified as URI
Throws:
java.lang.IllegalArgumentException - if address is invalid

getTargetEndpointAddress

public java.lang.String getTargetEndpointAddress()
Gets the endpoint address of a target service port.
Returns:
Endpoint address of the target service port as an URI

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
                 throws JAXRPCException
Sets the value for a named property. JAX-RPC 1.0 specification specifies a standard set of properties that may be passed to the Call.setProperty method. The properties include:
Parameters:
name - Name of the property
value - Value of the property
Throws:
java.lang.IllegalArgumentException - If invalid or unsupported property is specified
JAXRPCException - If Call does not allow setting of a valid standard property

getProperty

public java.lang.Object getProperty(java.lang.String name)
Gets the value of a named property.
Parameters:
name - Name of the property
Returns:
Value of the named property
Throws:
java.lang.IllegalArgumentException - If invalid or unsupported property name is specified

removeProperty

public void removeProperty(java.lang.String name)
Removes a named property.
Parameters:
name - Name of the property
Returns:
Value of the named property
Throws:
java.lang.IllegalArgumentException - If invalid or unsupported property name is specified

invoke

public java.lang.Object invoke(java.lang.Object[] parameters)
                        throws java.rmi.RemoteException
Invokes a specific operation using a synchronous request-response interaction mode. The invoke method takes as parameters the object values corresponding to these defined parameter types. Implementation of the invoke method must check whether the passed parameter values correspond to the number, order and types of parameters specified in the corresponding operation specification.
Parameters:
Object[] - Parameters for this invocation
Throws:
java.rmi.RemoteException - if there is any error in the remote method invocation or if the Call object is not configured properly.

invokeOneWay

public void invokeOneWay(java.lang.Object[] parameters)
                  throws JAXRPCException
Invokes a remote method using the one-way interaction mode. The client thread does not block waiting for the completion of the server processing for this remote method invocation. This method must not throw any remote exceptions. This method may throw a JAXRPCException during the processing of the one-way remote call.
Parameters:
Object[] - Parameters for this invocation
Throws:
JAXRPCException - if there is an error in the configuration of the Call object (example: a non-void return type has been incorrectly specified for the one-way call) or if there is any error during the invocation of the one-way remote call