@Test public void testInvoke_soapClientMethod() throws Throwable { Object returnValue = new Object(); RemoteCallReturn callReturn = new RemoteCallReturn.Builder().withReturnValue(returnValue).build(); Method identityCallMethod = MockSoapClient.class.getMethod("identityCall", Object[].class); Object[] arg = new String[] {"arg1", "arg2"}; Object[] args = new Object[] {arg}; SoapCall<Object> soapCall = new SoapCall<Object>(identityCallMethod, soapClient, args); when(soapClientHandler.getSoapClientMethod(soapClient, identityCallMethod)) .thenReturn(identityCallMethod); when(soapClientHandler.invokeSoapCall(soapCall)).thenReturn(callReturn); Object result = soapServiceClient.invoke(null, identityCallMethod, args); assertEquals(returnValue, result); }
@Override public Object invoke(Object proxy, final Method method, final Object[] args) throws Throwable { try { return getClass().getMethod(method.getName(), method.getParameterTypes()) .invoke(this, args); } catch (NoSuchMethodException e) { } setHeaders(); RemoteCallReturn remoteCallReturn = callSoapClient( createSoapCall(soapClientHandler.getSoapClientMethod(soapClient, method), args)); logSoapCall(remoteCallReturn); return unwrapRemoteCallReturn(remoteCallReturn); }
SoapServiceClient implements InvocationHandler { @Override public Object invoke(Object proxy, final Method method, final Object[] args) throws Throwable { try { return getClass().getMethod(method.getName(), method.getParameterTypes()) .invoke(this, args); } catch (NoSuchMethodException e) { } setHeaders(); RemoteCallReturn remoteCallReturn = callSoapClient( createSoapCall(soapClientHandler.getSoapClientMethod(soapClient, method), args)); logSoapCall(remoteCallReturn); return unwrapRemoteCallReturn(remoteCallReturn); } }
SoapServiceClient implements InvocationHandler { @Override public Object invoke(Object proxy, final Method method, final Object[] args) throws Throwable { try { return getClass().getMethod(method.getName(), method.getParameterTypes()) .invoke(this, args); } catch (NoSuchMethodException e) { } setHeaders(); RemoteCallReturn remoteCallReturn = callSoapClient( createSoapCall(soapClientHandler.getSoapClientMethod(soapClient, method), args)); logSoapCall(remoteCallReturn); return unwrapRemoteCallReturn(remoteCallReturn); } protected  SoapServiceClient(SoapClientHandlerInterface<T> soapClientHandler,
      T soapClient); }
SoapServiceClient implements InvocationHandler { @Override public Object invoke(Object proxy, final Method method, final Object[] args) throws Throwable { try { return getClass().getMethod(method.getName(), method.getParameterTypes()) .invoke(this, args); } catch (NoSuchMethodException e) { } setHeaders(); RemoteCallReturn remoteCallReturn = callSoapClient( createSoapCall(soapClientHandler.getSoapClientMethod(soapClient, method), args)); logSoapCall(remoteCallReturn); return unwrapRemoteCallReturn(remoteCallReturn); } protected  SoapServiceClient(SoapClientHandlerInterface<T> soapClientHandler,
      T soapClient); @Override Object invoke(Object proxy, final Method method, final Object[] args); void setEndpointAddress(String endpointAddress); Object getSoapClient(); }
SoapServiceClient implements InvocationHandler { @Override public Object invoke(Object proxy, final Method method, final Object[] args) throws Throwable { try { return getClass().getMethod(method.getName(), method.getParameterTypes()) .invoke(this, args); } catch (NoSuchMethodException e) { } setHeaders(); RemoteCallReturn remoteCallReturn = callSoapClient( createSoapCall(soapClientHandler.getSoapClientMethod(soapClient, method), args)); logSoapCall(remoteCallReturn); return unwrapRemoteCallReturn(remoteCallReturn); } protected  SoapServiceClient(SoapClientHandlerInterface<T> soapClientHandler,
      T soapClient); @Override Object invoke(Object proxy, final Method method, final Object[] args); void setEndpointAddress(String endpointAddress); Object getSoapClient();  }