|
Java EE 5 SDK 深圳电信培训中心.徐海蛟老师. |
||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造器 | 方法 | 详细信息: 字段 | 构造器 | 方法 |
javax.xml.rpc Interface Call
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.
- 版本:
- 1.0
- 作者:
- Rahul Sharma
字段摘要 | |
---|---|
static String |
ENCODINGSTYLE_URI_PROPERTY
Standard property for encoding Style: Encoding style specified as a namespace URI. |
static String |
OPERATION_STYLE_PROPERTY
Standard property for operation style. |
static String |
PASSWORD_PROPERTY
Standard property: Password for authentication Type: java.lang.String |
static 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 String |
SOAPACTION_URI_PROPERTY
Standard property for SOAPAction. |
static String |
SOAPACTION_USE_PROPERTY
Standard property for SOAPAction. |
static String |
USERNAME_PROPERTY
Standard property: User name for authentication Type: java.lang.String |
方法摘要 | |
---|---|
void |
addParameter(String paramName,
QName xmlType,
Class javaType,
ParameterMode parameterMode)
Adds a parameter type and mode for a specific operation. |
void |
addParameter(String paramName,
QName xmlType,
ParameterMode parameterMode)
Adds a parameter type and mode for a specific operation. |
QName |
getOperationName()
Gets the name of the operation to be invoked using this Call instance. |
Map |
getOutputParams()
Returns a Map of {name, value} for the output parameters of
the last invoked operation. |
List |
getOutputValues()
Returns a List values for the output parameters
of the last invoked operation. |
QName |
getParameterTypeByName(String paramName)
Gets the XML type of a parameter by name |
QName |
getPortTypeName()
Gets the qualified name of the port type. |
Object |
getProperty(String name)
Gets the value of a named property. |
Iterator |
getPropertyNames()
Gets the names of configurable properties supported by this Call object. |
QName |
getReturnType()
Gets the return type for a specific operation |
String |
getTargetEndpointAddress()
Gets the address of a target service endpoint. |
Object |
invoke(Object[] inputParams)
Invokes a specific operation using a synchronous request-response interaction mode. |
Object |
invoke(QName operationName,
Object[] inputParams)
Invokes a specific operation using a synchronous request-response interaction mode. |
void |
invokeOneWay(Object[] inputParams)
Invokes a remote method using the one-way interaction mode. |
boolean |
isParameterAndReturnSpecRequired(QName 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(String name)
Removes a named property. |
void |
setOperationName(QName 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(String name,
Object value)
Sets the value for a named property. |
void |
setReturnType(QName xmlType)
Sets the return type for a specific operation. |
void |
setReturnType(QName xmlType,
Class javaType)
Sets the return type for a specific operation. |
void |
setTargetEndpointAddress(String address)
Sets the address of the target service endpoint. |
字段详细信息 |
---|
USERNAME_PROPERTY
static final String USERNAME_PROPERTY
- Standard property: User name for authentication
Type:
java.lang.String
- 另请参见:
- 常量字段
PASSWORD_PROPERTY
static final String PASSWORD_PROPERTY
- Standard property: Password for authentication
Type:
java.lang.String
- 另请参见:
- 常量字段
OPERATION_STYLE_PROPERTY
static final String OPERATION_STYLE_PROPERTY
- Standard property for operation style. This property is
set to "rpc" if the operation style is rpc; "document"
if the operation style is document.
Type:
java.lang.String
- 另请参见:
- 常量字段
SOAPACTION_USE_PROPERTY
static final String SOAPACTION_USE_PROPERTY
- Standard property for SOAPAction. This boolean property
indicates whether or not SOAPAction is to be used. The
default value of this property is false indicating that
the SOAPAction is not used.
Type:
java.lang.Boolean
- 另请参见:
- 常量字段
SOAPACTION_URI_PROPERTY
static final String SOAPACTION_URI_PROPERTY
- Standard property for SOAPAction. Indicates the SOAPAction
URI if the
javax.xml.rpc.soap.http.soapaction.use
property is set totrue
.Type:
java.lang.String
- 另请参见:
- 常量字段
ENCODINGSTYLE_URI_PROPERTY
static final String ENCODINGSTYLE_URI_PROPERTY
- Standard property for encoding Style: Encoding style specified
as a namespace URI. The default value is the SOAP 1.1 encoding
http://schemas.xmlsoap.org/soap/encoding/
Type:
java.lang.String
- 另请参见:
- 常量字段
SESSION_MAINTAIN_PROPERTY
static final 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. If this property is set to
true, the service client indicates that it wants the session
to be maintained. If set to false, the session is not maintained.
The default value for this property is
false
.Type:
java.lang.Boolean
- 另请参见:
- 常量字段
方法详细信息 |
---|
isParameterAndReturnSpecRequired
boolean isParameterAndReturnSpecRequired(QName operationName)
- Indicates whether
addParameter
andsetReturnType
methods are to be invoked to specify the parameter and return type specification for a specific operation. - 参数:
operationName
- Qualified name of the operation- 返回:
- 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.
- 抛出异常:
IllegalArgumentException
- If invalid operation name is specified
addParameter
void addParameter(String paramName, QName xmlType, ParameterMode parameterMode)
- Adds a parameter type and mode for a specific operation.
Note that the client code may not call any
addParameter
andsetReturnType
methods before calling theinvoke
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. - 参数:
paramName
- Name of the parameterxmlType
- XML type of the parameterparameterMode
- Mode of the parameter-whetherParameterMode.IN
,ParameterMode.OUT
, orParameterMode.INOUT
,- 抛出异常:
javax.xml.rpc.JAXRPCException:
- This exception may be thrown if the methodisParameterAndReturnSpecRequired
returnsfalse
for this operation.IllegalArgumentException
- If any illegal parameter name or XML type is specified- 另请参见:
isParameterAndReturnSpecRequired(javax.xml.namespace.QName)
addParameter
void addParameter(String paramName, QName xmlType, Class javaType, ParameterMode 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.
- 参数:
paramName
- Name of the parameterxmlType
- XML type of the parameterjavaType
- Java class of the parameterparameterMode
- Mode of the parameter-whether ParameterMode.IN, OUT or INOUT- 抛出异常:
JAXRPCException
-- This exception may be thrown if this method is
invoked when the method
isParameterAndReturnSpecRequired
returnsfalse
. - If specified XML type and Java type mapping
is not valid. For example,
TypeMappingRegistry
has no serializers for this mapping.
- This exception may be thrown if this method is
invoked when the method
IllegalArgumentException
- If any illegal parameter name or XML type is specifiedUnsupportedOperationException
- If this method is not supported- 另请参见:
isParameterAndReturnSpecRequired(javax.xml.namespace.QName)
getParameterTypeByName
QName getParameterTypeByName(String paramName)
- Gets the XML type of a parameter by name
- 参数:
paramName
- Name of the parameter- 返回:
- Returns XML type for the specified parameter
setReturnType
void setReturnType(QName xmlType)
- Sets the return type for a specific operation. Invoking
setReturnType(null)
removes the return type for this Call object. - 参数:
xmlType
- XML data type of the return value- 抛出异常:
JAXRPCException
- This exception may be thrown when the methodisParameterAndReturnSpecRequired
returnsfalse
.IllegalArgumentException
- If an illegal XML type is specified
setReturnType
void setReturnType(QName xmlType, Class javaType)
- Sets the return type for a specific operation.
- 参数:
type
- XML data type of the return valuejavaType
- Java Class of the return value- 抛出异常:
JAXRPCException
-- This exception may be thrown if this method is
invoked when the method
isParameterAndReturnSpecRequired
returnsfalse
. - If XML type and Java type cannot be mapped using the standard type mapping or TypeMapping registry
- This exception may be thrown if this method is
invoked when the method
UnsupportedOperationException
- If this method is not supportedIllegalArgumentException
- If an illegal XML type is specified
getReturnType
QName getReturnType()
- Gets the return type for a specific operation
- 返回:
- Returns the XML type for the return value
removeAllParameters
void removeAllParameters()
- Removes all specified parameters from this
Call
instance. Note that this method removes only the parameters and not the return type. ThesetReturnType(null)
is used to remove the return type. - 抛出异常:
JAXRPCException
- This exception may be thrown If this method is called when the methodisParameterAndReturnSpecRequired
returnsfalse
for this Call's operation.
getOperationName
QName getOperationName()
- Gets the name of the operation to be invoked using this
Call
instance. - 返回:
- Qualified name of the operation
setOperationName
void setOperationName(QName operationName)
- Sets the name of the operation to be invoked using this
Call
instance. - 参数:
operationName
- QName of the operation to be invoked using the Call instance
getPortTypeName
QName getPortTypeName()
- Gets the qualified name of the port type.
- 返回:
- Qualified name of the port type
setPortTypeName
void setPortTypeName(QName portType)
- Sets the qualified name of the port type.
- 参数:
portType
- Qualified name of the port type
setTargetEndpointAddress
void setTargetEndpointAddress(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. - 参数:
address
- Address of the target service endpoint; specified as an URI
getTargetEndpointAddress
String getTargetEndpointAddress()
- Gets the address of a target service endpoint.
- 返回:
- Address of the target service endpoint as an URI
setProperty
void setProperty(String name, 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. - 参数:
name
- Name of the propertyvalue
- Value of the property- 抛出异常:
JAXRPCException
-- 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.
- If an optional standard property name is
specified, however this
getProperty
Object getProperty(String name)
- Gets the value of a named property.
- 参数:
name
- Name of the property- 返回:
- Value of the named property
- 抛出异常:
JAXRPCException
- if an invalid or unsupported property name is passed.
removeProperty
void removeProperty(String name)
- Removes a named property.
- 参数:
name
- Name of the property- 抛出异常:
JAXRPCException
- if an invalid or unsupported property name is passed.
getPropertyNames
Iterator getPropertyNames()
- Gets the names of configurable properties supported by
this
Call
object. - 返回:
- Iterator for the property names
invoke
Object invoke(Object[] inputParams) throws RemoteException
- Invokes a specific operation using a synchronous request-response
interaction mode.
- 参数:
inputParams
- Object[]--Parameters for this invocation. This includes only the input params- 返回:
- Returns the return value or
null
- 抛出异常:
RemoteException
- if there is any error in the remote method invocationSOAPFaultException
- Indicates a SOAP faultJAXRPCException
-- If there is an error in the configuration of the
Call
object - If
inputParams
do not match the required parameter set (as specified through theaddParameter
invocations or in the corresponding WSDL) - If parameters and return type are incorrectly specified
- If there is an error in the configuration of the
invoke
Object invoke(QName operationName, Object[] inputParams) throws RemoteException
- Invokes a specific operation using a synchronous request-response
interaction mode.
- 参数:
operationName
- QName of the operationinputParams
- Object[]--Parameters for this invocation. This includes only the input params.- 返回:
- Return value or null
- 抛出异常:
RemoteException
- if there is any error in the remote method invocation.SOAPFaultException
- Indicates a SOAP faultJAXRPCException
-- If there is an error in the configuration of the
Cal
l object - If
inputParam
s do not match the required parameter set (as specified through theaddParameter
invocations or in the corresponding WSDL) - If parameters and return type are incorrectly specified
- If there is an error in the configuration of the
invokeOneWay
void invokeOneWay(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. - 参数:
inputParams
- Object[]--Parameters for this invocation. This includes only the input params.- 抛出异常:
JAXRPCException
- if there is an error in the configuration of theCall
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
getOutputParams
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 typejava.lang.String
. - 返回:
- Map Output parameters for the last
Call.invoke()
. EmptyMap
is returned if there are no output parameters. - 抛出异常:
JAXRPCException
- If this method is invoked for a one-way operation or is invoked before anyinvoke
method has been called.
getOutputValues
List getOutputValues()
- Returns a
List
values for the output parameters of the last invoked operation. - 返回:
- java.util.List Values for the output parameters. An
empty
List
is returned if there are no output values. - 抛出异常:
JAXRPCException
- If this method is invoked for a one-way operation or is invoked before anyinvoke
method has been called.
|
Java EE 5 SDK 深圳电信培训中心.徐海蛟老师. |
||||||||
上一个类 下一个类 | 框架 无框架 | ||||||||
摘要: 嵌套 | 字段 | 构造器 | 方法 | 详细信息: 字段 | 构造器 | 方法 |
提交错误或意见
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。深圳电信培训中心.徐海蛟老师教学参考.