You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Dieter Freismuth (JIRA)" <ji...@apache.org> on 2010/03/08 11:36:27 UTC

[jira] Created: (CXF-2697) REST and web methods taking arguments called without argument leads to IllegalArgumentException: wrong number of arguments exception

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.


[jira] Resolved: (CXF-2697) REST and web methods taking arguments called without argument leads to IllegalArgumentException: wrong number of arguments exception

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-2697.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2.7

> 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
>            Assignee: Daniel Kulp
>             Fix For: 2.2.7
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> 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.


[jira] Assigned: (CXF-2697) REST and web methods taking arguments called without argument leads to IllegalArgumentException: wrong number of arguments exception

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp reassigned CXF-2697:
--------------------------------

    Assignee: Daniel Kulp

> 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
>            Assignee: Daniel Kulp
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> 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.