cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dieter Freismuth (JIRA)" <j...@apache.org>
Subject [jira] Created: (CXF-2697) REST and web methods taking arguments called without argument leads to IllegalArgumentException: wrong number of arguments exception
Date Mon, 08 Mar 2010 10:36:27 GMT
REST and web methods taking arguments called without argument leads to IllegalArgumentException:
wrong number of arguments exception
------------------------------------------------------------------------------------------------------------------------------------

                 Key: CXF-2697
                 URL: https://issues.apache.org/jira/browse/CXF-2697
             Project: CXF
          Issue Type: Bug
          Components: JAX-WS Runtime, JAXB Databinding
    Affects Versions: 2.2.5
         Environment: using JAXD Databinding, JAX-WS with REST
            Reporter: Dieter Freismuth


if an @WebMethod taking an @WebParam argument is called without the argument via REST the
IllegalArgumentException is thrown.
WebMethod:
 public String sayHi(@WebParam(name="text") String text, @WebParam(name="text2") String text2);

this works if only one (text or text2) parameter is given within the HTTP GET Rest call and
the second parameter is missing.
Does not work if both parameters are missing!

The Reason can be found within URIMappingInterceptor.keepInOrder method' s first line:
if (params == null || params.size() == 0) {
  return params;
}

should be replaced by:
if (params == null) {
  return params;
}

this change will add all required 'null' values for all missing parameters given within wsdl.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message