|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
WaspCall is an extension of javax.xml.rpc.Call
offering mainly the API for asynchronous invocations. This
class can be instantiated by following ways:
import javax.xml.rpc.ServiceFactory; import javax.xml.rpc.Service; ... ServiceFactory factory = ServiceFactory.newInstance(); Service service = factory.createService(new URL("http://localhost:6060/HelloWorld"), new QName("http://my.org","HelloWorldService")); WaspCall waspCall = (WaspCall)service.createCall(new QName("http://my.org","getHello")); ...or
import org.systinet.wasp.webservice.ServiceClient; ... ServiceClient sc = ServiceClient.create("http://localhost:6060/HelloWorld"); WaspCall call = sc.createCall("getHello"); ...The latter way is suitable, when you need further, WSO2 SOA Enablement Server specific configuration of client side(f.e. interceptors etc)
Field Summary | |
static java.lang.String |
UNWRAPPED_PROPERTY
Instruct invocation framework how to parse WSDL. |
Fields inherited from interface javax.xml.rpc.Call |
ENCODINGSTYLE_URI_PROPERTY, OPERATION_STYLE_PROPERTY, PASSWORD_PROPERTY, SESSION_MAINTAIN_PROPERTY, SOAPACTION_URI_PROPERTY, SOAPACTION_USE_PROPERTY, USERNAME_PROPERTY |
Method Summary | |
AsyncConversation |
beginInvoke(java.lang.Object[] inputParams)
Starts asynchronous communication using supplied parameters. |
AsyncConversation |
beginInvoke(QName operationName,
java.lang.Object[] inputParams)
Starts asynchronous communication using supplied parameters for invocation of given service operation. |
java.lang.Object |
endInvoke(AsyncConversation asyncResult)
Finishes asynchronous communication, identified by given AsyncConversation . |
java.util.Map |
getOutputParams(AsyncConversation asyncResult)
This method works the same way as getOutputValues(AsyncConversation async) ,
except it returns key-value pairs of out parameters and their current values. |
java.util.List |
getOutputValues(AsyncConversation asyncResult)
This method retrieves a list of all out values received in asynchronous communication identified by given AsyncConversation. |
void |
release()
This method is for optimization purposes. |
Methods inherited from interface javax.xml.rpc.Call |
addParameter, addParameter, getOperationName, getOutputParams, getOutputValues, getParameterTypeByName, getPortTypeName, getProperty, getPropertyNames, getReturnType, getTargetEndpointAddress, invoke, invoke, invokeOneWay, isParameterAndReturnSpecRequired, removeAllParameters, removeProperty, setOperationName, setPortTypeName, setProperty, setReturnType, setReturnType, setTargetEndpointAddress |
Field Detail |
public static final java.lang.String UNWRAPPED_PROPERTY
Boolean.TRUE
, else set it to Boolean.FALSE
. If not specified,
default value from configuration is used.
Method Detail |
public AsyncConversation beginInvoke(java.lang.Object[] inputParams) throws java.rmi.RemoteException
Call.setOperationName(javax.xml.namespace.QName)
.
This method is non-blocking.
Returns AsyncConversation
, which acts as a handle to
this communication. For further details about AsyncConversation
class see AsyncConversation
.
inputParams
- parameters of operation
AsyncConversation
handle of started communication
java.rmi.RemoteException
- when any exception occures during
communication with servicepublic AsyncConversation beginInvoke(QName operationName, java.lang.Object[] inputParams) throws java.rmi.RemoteException
AsyncConversation
, which acts as a handle to
this communication. For further details about AsyncConversation
class see AsyncConversation
.
operationName
- operation to be invokedinputParams
- parameters of operation
AsyncConversation
handle of started communication
java.rmi.RemoteException
- when any exception occures during
communication with servicepublic java.lang.Object endInvoke(AsyncConversation asyncResult) throws java.rmi.RemoteException
AsyncConversation
.
This method blocks until response is ready. Usual invocation is from within
AsyncCallback.onResponse(org.systinet.wasp.async.AsyncConversation)
, however it is possible
to call this method directly. It retuns return value of the method or null. Out
and in/out parameters can be read by getOutputParams(AsyncConversation result)
or getOutputValues(AsyncConversation result)
asyncResult
- handle to asynchronous invocation
java.rmi.RemoteException
- when any exception occures during service invocation.
TimeoutException
- when timeout of AsyncConversation
occures. See AsyncConversation.setTimeout(long)
.public java.util.List getOutputValues(AsyncConversation asyncResult) throws java.rmi.RemoteException
endInvoke(org.systinet.wasp.async.AsyncConversation)
to
retrieve valid data.
asyncResult
- handle to asynchronous invocation
java.rmi.RemoteException
- when any exception occures during service invocation.public java.util.Map getOutputParams(AsyncConversation asyncResult) throws java.rmi.RemoteException
getOutputValues(AsyncConversation async)
,
except it returns key-value pairs of out parameters and their current values.
asyncResult
- handle to asynchronous invocation
java.rmi.RemoteException
- when any exception occures during service invocation.public void release()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |