Details
-
Bug
-
Resolution: Done
-
Major
-
2.3.4.Final
-
None
-
None
-
Low
Description
the pb is the following: I have an interface for declaring REST methods.
the interface is itself annoted with @Path, but only some methods are associated with REST annotations. Other methods are NOT associated with any REST annotation.
One error appears during the "delegate" creation phase, just at the line:
return org.jboss.resteasy.client.ProxyFactory.create(IService.class, some_conf_as_second_arg);
0.05 sec <<< FAILURE!
testFiltres(ServiceRestTest) Time elapsed: 0.013 sec <<< ERROR!
java.lang.RuntimeException: You must use at least one, but no more than one http method annotation on: public abstract void fr.xxx.service.IService.uploadDeclarationOpeRawDataReinjectee(java.lang.String,java.lang.String,fr.xxx.dto.OpeRawDataDto) throws com.xxx.exception.ErreurInterneException,com.xxx.exception.IllegalParametreException
at org.jboss.resteasy.client.ProxyFactory.createClientInvoker(ProxyFactory.java:86)
at org.jboss.resteasy.client.ProxyBuilder.createProxy(ProxyBuilder.java:144)
at org.jboss.resteasy.client.ProxyBuilder.now(ProxyBuilder.java:124)
at org.jboss.resteasy.client.ProxyFactory.create(ProxyFactory.java:68)
at org.jboss.resteasy.client.ProxyFactory.create(ProxyFactory.java:63)
at org.jboss.resteasy.client.ProxyFactory.create(ProxyFactory.java:58)
at org.jboss.resteasy.client.ProxyFactory.create(ProxyFactory.java:41)
The "uploadDeclarationOpeRawDataReinjectee" is one of the method without any REST annotation.
Note that the IService interface has a @Path("/") annotation.
Our use case is the following: the interface IService is used both for REST method declaration and for defining EJB methods (the IService interface has also a @Local annotation).
So, the methods without any REST annotation are the ones declared only as being EJB methods. I expect RestEasy not taking into account the methods without any REST annotation, even if the interface itself has a @Path annotation.