javax.xml.rpc
Interface Call

All Known Implementing Classes:
Call (src)

public interface Call

The javax.xml.rpc.Call interface provides support for the dynamic invocation of a service endpoint. 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.


Field Summary
static java.lang.String ENCODINGSTYLE_URI_PROPERTY
          Standard property for encoding Style: Encoding style specified as a namespace URI.
static java.lang.String OPERATION_STYLE_PROPERTY
          Standard property for operation style.
static java.lang.String PASSWORD_PROPERTY
          Standard property: Password for authentication Type: java.lang.String
static java.lang.String SESSION_MAINTAIN_PROPERTY
          Standard property: This boolean property is used by a service client to indicate whether or not it wants to participate in a session with a service endpoint.
static java.lang.String SOAPACTION_URI_PROPERTY
          Standard property for SOAPAction.
static java.lang.String SOAPACTION_USE_PROPERTY
          Standard property for SOAPAction.
static java.lang.String USERNAME_PROPERTY
          Standard property: User name for authentication Type: java.lang.String
 
Method Summary
 void addParameter(java.lang.String paramName, QName (src)  xmlType, java.lang.Class javaType, ParameterMode (src)  parameterMode)
          Adds a parameter type and mode for a specific operation.
 void addParameter(java.lang.String paramName, QName (src)  xmlType, ParameterMode (src)  parameterMode)
          Adds a parameter type and mode for a specific operation.
 QName (src) getOperationName()
          Gets the name of the operation to be invoked using this Call instance.
 java.util.Map getOutputParams()
          Returns a Map of {name, value} for the output parameters of the last invoked operation.
 java.util.List getOutputValues()
          Returns a List values for the output parameters of the last invoked operation.
 QName (src) getParameterTypeByName(java.lang.String paramName)
          Gets the XML type of a parameter by name.
 QName (src) 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.util.Iterator getPropertyNames()
          Gets the names of configurable properties supported by this Call object.
 QName (src) getReturnType()
          Gets the return type for a specific operation
 java.lang.String getTargetEndpointAddress()
          Gets the address of a target service endpoint.
 java.lang.Object invoke(java.lang.Object[] inputParams)
          Invokes a specific operation using a synchronous request-response interaction mode.
 java.lang.Object invoke(QName (src)  operationName, java.lang.Object[] inputParams)
          Invokes a specific operation using a synchronous request-response interaction mode.
 void invokeOneWay(java.lang.Object[] inputParams)
          Invokes a remote method using the one-way interaction mode.
 boolean isParameterAndReturnSpecRequired(QName (src)  operationName)
          Indicates whether addParameter and setReturnType methods are to be invoked to specify the parameter and return type specification for a specific operation.
 void removeAllParameters()
          Removes all specified parameters from this Call instance.
 void removeProperty(java.lang.String name)
          Removes a named property.
 void setOperationName(QName (src)  operationName)
          Sets the name of the operation to be invoked using this Call instance.
 void setPortTypeName(QName (src)  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 (src)  xmlType)
          Sets the return type for a specific operation.
 void setReturnType(QName (src)  xmlType, java.lang.Class javaType)
          Sets the return type for a specific operation.
 void setTargetEndpointAddress(java.lang.String address)
          Sets the address of the target service endpoint.
 

Field Detail

ENCODINGSTYLE_URI_PROPERTY

public static final java.lang.String ENCODINGSTYLE_URI_PROPERTY
Standard property for encoding Style: Encoding style specified as a namespace URI.

See Also:
Constant Field Values (src)

OPERATION_STYLE_PROPERTY

public static final java.lang.String OPERATION_STYLE_PROPERTY
Standard property for operation style.

See Also:
Constant Field Values (src)

PASSWORD_PROPERTY

public static final java.lang.String PASSWORD_PROPERTY
Standard property: Password for authentication Type: java.lang.String

See Also:
Constant Field Values (src)

SESSION_MAINTAIN_PROPERTY

public static final java.lang.String SESSION_MAINTAIN_PROPERTY
Standard property: This boolean property is used by a service client to indicate whether or not it wants to participate in a session with a service endpoint.

See Also:
Constant Field Values (src)

SOAPACTION_URI_PROPERTY

public static final java.lang.String SOAPACTION_URI_PROPERTY
Standard property for SOAPAction.

See Also:
Constant Field Values (src)

SOAPACTION_USE_PROPERTY

public static final java.lang.String SOAPACTION_USE_PROPERTY
Standard property for SOAPAction.

See Also:
Constant Field Values (src)

USERNAME_PROPERTY

public static final java.lang.String USERNAME_PROPERTY
Standard property: User name for authentication Type: java.lang.String

See Also:
Constant Field Values (src)
Method Detail

removeAllParameters

public void removeAllParameters()
Removes all specified parameters from this Call instance. Note that this method removes only the parameters and not the return type. The setReturnType(null) is used to remove the return type.

Throws:
JAXRPCException (src) - This exception may be thrown If this method is called when the method isParameterAndReturnSpecRequired returns false for this Call's operation.

invokeOneWay

public void invokeOneWay(java.lang.Object[] inputParams)
Invokes a remote method using the one-way interaction mode. The client thread does not normally block waiting for the completion of the server processing for this remote method invocation. When the protocol in use is SOAP/HTTP, this method should block until an HTTP response code has been received or an error occurs. This method must not throw any remote exceptions. This method may throw a JAXRPCException during the processing of the one-way remote call.

Parameters:
inputParams - Object[]--Parameters for this invocation. This includes only the input params.
Throws:
JAXRPCException (src) - 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

getTargetEndpointAddress

public java.lang.String getTargetEndpointAddress()
Gets the address of a target service endpoint.

Returns:
Address of the target service endpoint as an URI

removeProperty

public void removeProperty(java.lang.String name)
Removes a named property.

Parameters:
name - Name of the property
Throws:
JAXRPCException (src) - if an invalid or unsupported property name is passed.

setTargetEndpointAddress

public void setTargetEndpointAddress(java.lang.String address)
Sets the address of the target service endpoint. This address must correspond to the transport specified in the binding for this Call instance.

Parameters:
address - Address of the target service endpoint; specified as an URI

getPropertyNames

public java.util.Iterator getPropertyNames()
Gets the names of configurable properties supported by this Call object.

Returns:
Iterator for the property names

getOutputValues

public java.util.List getOutputValues()
Returns a List values for the output parameters of the last invoked operation.

Returns:
java.util.List Values for the output parameters. An empty List is returned if there are no output values.
Throws:
JAXRPCException (src) - If this method is invoked for a one-way operation or is invoked before any invoke method has been called.

getOutputParams

public java.util.Map getOutputParams()
Returns a Map of {name, value} for the output parameters of the last invoked operation. The parameter names in the returned Map are of type java.lang.String.

Returns:
Map Output parameters for the last Call.invoke(). Empty Map is returned if there are no output parameters.
Throws:
JAXRPCException (src) - If this method is invoked for a one-way operation or is invoked before any invoke method has been called.

getOperationName

public QName (src)  getOperationName()
Gets the name of the operation to be invoked using this Call instance.

Returns:
Qualified name of the operation

getPortTypeName

public QName (src)  getPortTypeName()
Gets the qualified name of the port type.

Returns:
Qualified name of the port type

getReturnType

public QName (src)  getReturnType()
Gets the return type for a specific operation

Returns:
Returns the XML type for the return value

setOperationName

public void setOperationName(QName (src)  operationName)
Sets the name of the operation to be invoked using this Call instance.

Parameters:
operationName - QName of the operation to be invoked using the Call instance

setPortTypeName

public void setPortTypeName(QName (src)  portType)
Sets the qualified name of the port type.

Parameters:
portType - - Qualified name of the port type

isParameterAndReturnSpecRequired

public boolean isParameterAndReturnSpecRequired(QName (src)  operationName)
Indicates whether addParameter and setReturnType methods are to be invoked to specify the parameter and return type specification for a specific operation.

Parameters:
operationName - Qualified name of the operation
Returns:
Returns true if the Call implementation class requires addParameter and setReturnType to be invoked in the client code for the specified operation. This method returns false otherwise.
Throws:
java.lang.IllegalArgumentException - If invalid operation name is specified

setReturnType

public void setReturnType(QName (src)  xmlType)
Sets the return type for a specific operation. Invoking setReturnType(null) removes the return type for this Call object.

Parameters:
xmlType - XML data type of the return value
Throws:
JAXRPCException (src) - This exception may be thrown when the method isParameterAndReturnSpecRequired returns false.
java.lang.IllegalArgumentException - If an illegal XML type is specified

setReturnType

public void setReturnType(QName (src)  xmlType,
                          java.lang.Class javaType)
Sets the return type for a specific operation.

Parameters:
xmlType - XML data type of the return value
javaType - Java Class of the return value
Throws:
JAXRPCException (src) -
  • This exception may be thrown if this method is invoked when the method isParameterAndReturnSpecRequired returns false.
  • If XML type and Java type cannot be mapped using the standard type mapping or TypeMapping registry
java.lang.UnsupportedOperationException - If this method is not supported
java.lang.IllegalArgumentException - If an illegal XML type is specified

invoke

public java.lang.Object invoke(java.lang.Object[] inputParams)
                        throws java.rmi.RemoteException
Invokes a specific operation using a synchronous request-response interaction mode.

Parameters:
inputParams - Object[]--Parameters for this invocation. This includes only the input params
Returns:
Returns the return value or null
Throws:
java.rmi.RemoteException - if there is any error in the remote method invocation
SOAPFaultException (src) - Indicates a SOAP fault
JAXRPCException (src) -
  • If there is an error in the configuration of the Call object
  • If inputParams do not match the required parameter set (as specified through the addParameter invocations or in the corresponding WSDL)
  • If parameters and return type are incorrectly specified

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:
JAXRPCException (src) - if an invalid or unsupported property name is passed.

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
Sets the value for a named property. JAX-RPC specification specifies a standard set of properties that may be passed to the Call.setProperty method.

Parameters:
name - Name of the property
value - Value of the property
Throws:
JAXRPCException (src) -
  • If an optional standard property name is specified, however this Call implementation class does not support the configuration of this property.
  • If an invalid (or unsupported) property name is specified or if a value of mismatched property type is passed.
  • If there is any error in the configuration of a valid property.

getParameterTypeByName

public QName (src)  getParameterTypeByName(java.lang.String paramName)
Gets the XML type of a parameter by name.

Parameters:
paramName - - Name of the parameter
Returns:
Returns XML type for the specified parameter

invoke

public java.lang.Object invoke(QName (src)  operationName,
                               java.lang.Object[] inputParams)
                        throws java.rmi.RemoteException
Invokes a specific operation using a synchronous request-response interaction mode.

Parameters:
operationName - QName of the operation
inputParams - Object[]--Parameters for this invocation. This includes only the input params.
Returns:
Return value or null
Throws:
java.rmi.RemoteException - if there is any error in the remote method invocation.
SOAPFaultException (src) - - Indicates a SOAP fault
JAXRPCException (src) -
  • If there is an error in the configuration of the Call object
  • If inputParams do not match the required parameter set (as specified through the addParameter invocations or in the corresponding WSDL)
  • If parameters and return type are incorrectly specified

addParameter

public void addParameter(java.lang.String paramName,
                         QName (src)  xmlType,
                         ParameterMode (src)  parameterMode)
Adds a parameter type and mode for a specific operation. Note that the client code may not call any addParameter and setReturnType methods before calling the invoke method. In this case, the Call implementation class determines the parameter types by using reflection on parameters, using the WSDL description and configured type mapping registry.

Parameters:
paramName - Name of the parameter
xmlType - XML type of the parameter
parameterMode - Mode of the parameter-whether ParameterMode.IN, ParameterMode.OUT, or ParameterMode.INOUT
Throws:
JAXRPCException (src) - This exception may be thrown if the method isParameterAndReturnSpecRequired returns false for this operation.
java.lang.IllegalArgumentException - If any illegal parameter name or XML type is specified

addParameter

public void addParameter(java.lang.String paramName,
                         QName (src)  xmlType,
                         java.lang.Class javaType,
                         ParameterMode (src)  parameterMode)
Adds a parameter type and mode for a specific operation. This method is used to specify the Java type for either OUT or INOUT parameters.

Parameters:
paramName - Name of the parameter
xmlType - XML type of the parameter
javaType - Java class of the parameter
parameterMode - Mode of the parameter-whether ParameterMode.IN, ParameterMode.OUT, or ParameterMode.INOUT
Throws:
JAXRPCException (src) -
  • This exception may be thrown if the method isParameterAndReturnSpecRequired returns false for this operation.
  • If specified XML type and Java type mapping is not valid. For example, TypeMappingRegistry has no serializers for this mapping.
java.lang.IllegalArgumentException - If any illegal parameter name or XML type is specified
java.lang.UnsupportedOperationException - If this method is not supported