camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamalissimo <roman.janu...@gmail.com>
Subject Re: File upload
Date Mon, 08 Jul 2013 12:30:39 GMT
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.

Mime
View raw message