Hi,

The method expects a form payload but the log shows the content type is 'application/x-www-form-urlencoded'... Please consider asking on CXF users list when a route does not work due to a CXF specific exception...

Thanks, Sergey

On 08/07/13 13:30, jamalissimo wrote:
Hello Sergey,

thanks for the tip. I am still experimenting and so far I can see from the
log, that I am receiving the request, but I am not able create a condition
for choice definition.

This is the REST part:

        @POST
        @Consumes(MediaType.MULTIPART_FORM_DATA)
        @Path("/upload")
        @Produces(MediaType.APPLICATION_JSON)
        public Response uploadTest (InputStream is) throws IOException {
                return null;
        }

And here is beginning of the route:

from("cxfrs:bean:myServer")
   .routeId("myMainRoute")
    .choice()           
     .when(header(Exchange.HTTP_PATH).isEqualTo("/upload"))
      ......

The karaf.log says, that it can not find any matching operation nor method

2013-07-08 12:42:31,594 | DEBUG | upload | JAXRSUtils |
apache.cxf.jaxrs.utils.JAXRSUtils  516 | 139 -
org.apache.cxf.cxf-rt-frontend-jaxrs - 2.7.4 | No method match, method name
: upload, request path : /upload, method @Path : /upload, HTTP Method :
POST, method HTTP Method : POST, ContentType :
application/x-www-form-urlencoded, method @Consumes : multipart/form-data,,
Accept : text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8,,
method @Produces : application/json


-Br, Roman



--
View this message in context: 
http://camel.465427.n5.nabble.com/File-upload-tp5735172p5735284.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to