javax.microedition.xml.rpc
Class Operation

java.lang.Object
  extended by javax.microedition.xml.rpc.Operation

public class Operation
extends Object

The JAX-RPC subset runtime SPI (Service Provider Interface) is used by generated stubs to execute RPC calls. The SPI is defined by the Type, Element, ComplexType, and Operation classes.

The Operation class is used by a Stub instance to describe an RPC invocation to the runtime. The following steps are carried out in this class:

  1. set properties that are needed to invoke an RPC;
  2. set up an Http connection;
  3. call the encoder to encode the input parameter values;
  4. retrieve the SOAP response message from the Http connection;
  5. call the decoder to decode the SOAP response message.

The class corresponds to a wsdl:operation defined for a target service end point (see WSDL 1.1, Chapter 3).

See Type, Element, ComplexType.

Since:
BlackBerry API 4.3.0

Field Summary
static String SOAPACTION_URI_PROPERTY
          The URI for the Http SOAPAction header.
 
Constructor Summary
protected Operation()
           
 
Method Summary
 Object invoke(Object input)
          Invokes the RPC service end point.
static Operation newInstance(QName qname, Element input, Element output)
          Creates an Operation object representing an invocation of an RPC.
static Operation newInstance(QName qname, Element input, Element output, FaultDetailHandler faultDetailHandler)
          Creates an Operation object representing an invocation of an RPC.
 void setProperty(String name, String value)
          Sets properties that are needed to invoke an RPC.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Field Detail

SOAPACTION_URI_PROPERTY

public static final String SOAPACTION_URI_PROPERTY
The URI for the Http SOAPAction header.

See Also:
Constant Field Values
Since:
BlackBerry API 4.3.0


Constructor Detail

Operation

protected Operation()
Since:
BlackBerry API 4.3.0


Method Detail

newInstance

public static Operation newInstance(QName qname,
                                    Element input,
                                    Element output)
Creates an Operation object representing an invocation of an RPC.

Parameters:
qname - the qualified name of this Operation.
input - the Element describing the input parameter. null if no input is needed.
output - the Element describing the output parameter. null if there is no return value.
Returns:
a new Operation object.
Since:
BlackBerry API 4.3.0

newInstance

public static Operation newInstance(QName qname,
                                    Element input,
                                    Element output,
                                    FaultDetailHandler faultDetailHandler)
Creates an Operation object representing an invocation of an RPC. An implementation of the FaultDetailHandler interface is provided, and is used by the runtime to retrieve a description of the SOAP fault detail.

Parameters:
qname - the qualified name of this Operation.
input - the Element describing the input parameter. null if no input is needed.
output - the Element describing the output parameter. null is there is no return value.
faultDetailHandler - the FaultDetailHandler to handle the SOAP fault detail.
Returns:
a new Operation object.
Since:
BlackBerry API 4.3.0

invoke

public Object invoke(Object input)
              throws JAXRPCException
Invokes the RPC service end point. A stub executes an operation using the invoke method passing it an Object array storing the input values, or null if the operation does not take any input parameter.

Parameters:
input - an Object array storing the input values.
Returns:
an Object array storing the output values.
Throws:
JAXRPCException - if an error occurs during the execution of this Operation.
Since:
BlackBerry API 4.3.0

setProperty

public void setProperty(String name,
                        String value)
                 throws IllegalArgumentException
Sets properties that are needed to invoke an RPC. The setProperty method of the Operation is called by a generated stub to set property values for an RPC invocation. The stub is responsible for converting the property value into the appropriate string format.

Parameters:
name - the name of the property.
value - the value the property.
Throws:
IllegalArgumentException - if the supplied property is not supported.
Since:
BlackBerry API 4.3.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal