This is because you mistyped the type of the parameter, the 2nd parameter should be annotated with @PathParam instead

Sergey
On 13/05/13 14:45, takidean wrote:
Hi
i use to send many parameters in my url but i find that message body catch
only the first parameters

this is my code:

MessageResource

@GET
@Path("/id/{type}")
@Produces("text/xml")
public String getCustomer(@QueryParam("id") String n,@QueryParam("type")
String s) {
        
     return "ok";
}

/** route ***/
  <camelContext xmlns="http://camel.apache.org/schema/spring";>
     <route>
         <from uri="cxfrs://bean://cc"/>
         <convertBodyTo type="java.lang.String"/>
         <process ref="abc"/>
     </route>
</camelContext>
/***Abc**/
public class Abc implements Processor{

        @Override
        public void process(Exchange exchange) throws Exception {
                // TODO Auto-generated method stub
                String m =(String) exchange.getIn().getBody();
                System.out.println("mssage ="+m);
        }

}
/*******test***/
when i send this url http://localhost:9090/cc/MessageResource/id?id=1&type=1
it only show me the id 1





--
View this message in context: 
http://camel.465427.n5.nabble.com/rest-webservice-can-t-read-parameteres-tp5732407.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to