com.sun.xml.ws.client.sei
Class SyncMethodHandler

java.lang.Object
  extended by com.sun.xml.ws.client.sei.MethodHandler
      extended by com.sun.xml.ws.client.sei.SEIMethodHandler
          extended by com.sun.xml.ws.client.sei.SyncMethodHandler

final class SyncMethodHandler
extends SEIMethodHandler

MethodHandler that handles synchronous method invocations.

This class mainly performs the following two tasks:

  1. Accepts Object[] that represents arguments for a Java method, and creates JAXBMessage that represents a request message.
  2. Takes a Message] that represents a response, and extracts the return value (and updates {@link Holder}s.)

Creating {@link JAXBMessage}

At the construction time, we prepare {@link BodyBuilder} and {@link MessageFiller}s that know how to move arguments into a {@link Message}. Some arguments go to the payload, some go to headers, still others go to attachments.


Field Summary
 
Fields inherited from class com.sun.xml.ws.client.sei.SEIMethodHandler
checkedExceptions, isOneWay, javaMethod, soapAction
 
Fields inherited from class com.sun.xml.ws.client.sei.MethodHandler
owner
 
Constructor Summary
SyncMethodHandler(SEIStub owner, JavaMethodImpl method)
           
 
Method Summary
(package private)  ValueGetterFactory getValueGetterFactory()
           
(package private)  Object invoke(Object proxy, Object[] args)
          Performs the method invocation.
(package private)  Object invoke(Object proxy, Object[] args, RequestContext rc, ResponseContextReceiver receiver)
          Invokes synchronously, but with the given RequestContext and ResponseContextReceiver.
 
Methods inherited from class com.sun.xml.ws.client.sei.SEIMethodHandler
buildResponseBuilder, createRequestMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SyncMethodHandler

SyncMethodHandler(SEIStub owner,
                  JavaMethodImpl method)
Method Detail

invoke

Object invoke(Object proxy,
              Object[] args)
        throws Throwable
Description copied from class: MethodHandler
Performs the method invocation.

Specified by:
invoke in class MethodHandler
Parameters:
proxy - The proxy object exposed to the user. Must not be null.
args - The method invocation arguments. To handle asynchroonus method invocations without array reallocation, this aray is allowed to be longer than the actual number of arguments to the method. Additional array space should be simply ignored.
Returns:
a return value from the method invocation. may be null.
Throws:
javax.xml.ws.WebServiceException - If used on the client side, a WebServiceException signals an error during the service invocation.
Throwable - some faults are reported in terms of checked exceptions.

invoke

Object invoke(Object proxy,
              Object[] args,
              RequestContext rc,
              ResponseContextReceiver receiver)
        throws Throwable
Invokes synchronously, but with the given RequestContext and ResponseContextReceiver.

Parameters:
rc - This RequestContext is used for invoking this method. We take this as a separate parameter because of the async invocation handling, which requires a separate copy.
Throws:
Throwable

getValueGetterFactory

ValueGetterFactory getValueGetterFactory()
Specified by:
getValueGetterFactory in class SEIMethodHandler