users@jersey.java.net

[Jersey] Using MessageBodyReader for multiple parameters

From: Luis Javier de la Garza Trevino <delagarza_at_gmail.com>
Date: Sat, 11 Jun 2011 16:12:19 +0200

The following method does not allow my servlet container to start:

<pre>
@PUT
public String upload(final Customer customer, final Control control) {
  // ...
}
</pre>

I get, not surprisingly:

<pre>
    SEVERE: Missing dependency for method ... at index 0
    SEVERE: Missing dependency for method ... index 1
    SEVERE: Method, ..., is not recognized as valid resource method.
</pre>

I have implemented MessageBodyReaders for each type. Removing any of
the parameters enables the servlet container to start gracefully, so I
suspect there must be a restriction on the number of parameters that
will be resolved via Entity-Providers.

The problem is that I <i>NEED</i> these two parameters, since I am
providing both SOAP and REST support, and of course, I am not in the
liberty of changing method signatures, and I also do not want to
create one specific Jersey method and one specific JAX-WS method as
entry points.

I'm using Jersey 1.7.

-- 
Luis Javier de la Garza Treviņo