org.jboss.wise.core.client
Interface WSMethod

All Known Implementing Classes:
WSMethodImpl

@ThreadSafe
public interface WSMethod

It Represents a webservice operation(action) invocation and it always refer to a specific endpoint.

Since:
23-Aug-2007
Author:
stefano.maestri@javalinux.it

Method Summary
 WSEndpoint getEndpoint()
           
 java.util.Map<java.lang.String,? extends WebParameter> getWebParams()
          Gets the map of WebParameter for the webserice method represented by instance of this type
 InvocationResult invoke(java.lang.Object args, WiseMapper mapper)
          Invokes this method with the provided arguments applying provided mapper
 boolean isOneWay()
           
 void setEndpoint(WSEndpoint endpoint)
           
 

Method Detail

invoke

InvocationResult invoke(java.lang.Object args,
                        WiseMapper mapper)
                        throws InvocationException,
                               java.lang.IllegalArgumentException,
                               MappingException
Invokes this method with the provided arguments applying provided mapper

Parameters:
args - the arguments to call operation. It could be a generic Object to be passed to provided mapper. If mapper is null args must be a Map. This Map have to contain entries for all needed parameters, keys have to reflect operation parameter name as defined in wsdl. Keys which names are not defined in wsdls will be simply ignored. Implementation will take care values nullability will reflect "nillable" properties defined in wsdl. order isn't important since WSMethod implementation will take care of reorder parameters in right position to make operation call. If it isn't a Map or keys don't contain all parameters name an IllegalArgumentException is thrown.
mapper - if null no mappings are applied method will be invoked using args directly. in this case the keys of the map gotta be the parameters names as defined in wsdl/wsconsume generated classes
Returns:
return an InvocationResult object populated with returned values (implementation will process both directed returned values and OUT parameters as defined in wsdl)
Throws:
InvocationException
java.lang.IllegalArgumentException
MappingException

getWebParams

java.util.Map<java.lang.String,? extends WebParameter> getWebParams()
Gets the map of WebParameter for the webserice method represented by instance of this type

Returns:
a Map representing valid webparameters where keys contain symbolic names as defined by wsdl. It may be null in case of selected operation haven't parameter.

isOneWay

boolean isOneWay()
Returns:
true if operation is defined as OneWay in wsdl

getEndpoint

WSEndpoint getEndpoint()
Returns:
the endpoint on which this method is attached.

setEndpoint

void setEndpoint(WSEndpoint endpoint)
Parameters:
endpoint - set the endpoint on which this method is attached.