JBoss Wise API

org.jboss.wise.core.client.impl.reflection
Class WSMethodImpl

java.lang.Object
  extended by org.jboss.wise.core.client.impl.reflection.WSMethodImpl
All Implemented Interfaces:
WSMethod

@ThreadSafe
@Immutable
public class WSMethodImpl
extends java.lang.Object
implements WSMethod

Represent a webservice operation invocation

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

Constructor Summary
WSMethodImpl(java.lang.reflect.Method method, WSEndpoint endpoint)
           
 
Method Summary
 WSEndpoint getEndpoint()
           
 java.lang.reflect.Method getMethod()
           
 java.util.Map<java.lang.String,WebParameterImpl> getWebParams()
          Gets the map of WebParameters for a selected method
 InvocationResult invoke(java.lang.Object args)
          Invokes this method with the provided arguments
 InvocationResultImpl invoke(java.lang.Object args, WiseMapper mapper)
          Invokes this method with the provided arguments applying provided mapper
 boolean isOneWay()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WSMethodImpl

public WSMethodImpl(java.lang.reflect.Method method,
                    WSEndpoint endpoint)
             throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException
Method Detail

invoke

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

Specified by:
invoke in interface WSMethod
Parameters:
args -
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:
InvocationResultImpl
Throws:
InvocationException
java.lang.IllegalArgumentException
MappingException

invoke

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

Specified by:
invoke in interface WSMethod
Parameters:
args - the arguments to call operation. 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.
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
See Also:
WSMethod.invoke(java.lang.Object)

getWebParams

public java.util.Map<java.lang.String,WebParameterImpl> getWebParams()
Gets the map of WebParameters for a selected method

Specified by:
getWebParams in interface WSMethod
Returns:
a map representing valide webparameters

isOneWay

public boolean isOneWay()
Specified by:
isOneWay in interface WSMethod
Returns:
true if operation is defined as OneWay in wsdl

getMethod

public java.lang.reflect.Method getMethod()

getEndpoint

public WSEndpoint getEndpoint()
Specified by:
getEndpoint in interface WSMethod
Returns:
the endpoint on which this method is attached.

JBoss Wise API

Copyright © 2008-2009 Jboss.org. All Rights Reserved.