title: java.lang.reflect.Method invoke() argument Type mismatch exception
body: <p>I am dynamically consuming a webservice by JAX-WS API. Instantiating service class and invoking by web service by reflection API.</p>
  
  <p>Though the expected and actual argument is same its getting "Argument type mismatch" Exception.</p>
  
  <p>Quick help is appreciated.</p>
  
  <pre><code>Class&lt;?&gt;[] paramTypes = serviceClassMethod.getParameterTypes();
  System.out.println("Expected Param Class : "+paramTypes[0].getName());
  System.out.println("Actual Param Class : "+reqVals[0].getClass());
  System.out.println("Expected number : "+paramTypes.length);
  System.out.println("Actual number : "+reqVals.length);
  Object wsResponse = serviceClassMethod.invoke(service, reqVals);
  System.out.println("Invocation successful...");
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>Expected Param Class : com.bla.bla.ws.User
  Actual Param Class : class com.bla.bla.ws.User
  Expected number : 1
  Actual number : 1
  </code></pre>