Hi,

I have below method defined so I can use form post to Restful webmethod. 
But the service cannot map the path to any matching method.  Other methods
which are not form consumers work fine.

does not work for url in form action:
"/mkyong_webapp/services/rest/product/product_id".  I have even tried
changing to @Path("/form/product_id") and corresponding action to
"/mkyong_webapp/services/rest/product/form/product_id" but they do not match
any method.  am I missing some thing ?

@Path("/product_id")
@POST
@Produces("application/xml")
@Consumes("application/x-www-form-unrlencoded")
public Product getProductForm(@FormParam("product_id") int id) {
        // TODO Auto-generated method stub
        return productBo.getProduct(id);
}


example working method is for url
http://localhost:8080/mkyong_webapp/services/rest/product/list:
@GET
@Path("/list")
@Produces("application/xml")
public ProductContainer getProducts() {
        // TODO Auto-generated method stub
        ProductContainer pc = new ProductContainer();
        pc.p = productBo.getProducts();
        return pc;
}


Regards,

Miten.



--
View this message in context: 
http://cxf.547215.n5.nabble.com/form-post-to-restful-service-not-finding-matching-method-tp5667389p5667389.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to