From: Bill B. <bb...@re...> - 2011-01-19 16:54:51
|
{param} only matches to one segment. If you have "/" in your path param, you must change the expression to: {param:.*} The error message bothers me though as it should be more informative. What version of RESTEasy? thanks. On 1/19/11 11:37 AM, Neil Chaudhuri wrote: > I have a REST endpoint marked with @Path("/messages /{id}"). > > When I make the call with the path parameter id having the value > “MES/482bda7284054dbf-4654d73f00000000” (note the “/” buried in there), > I get the following exception: > > org.jboss.resteasy.plugins.providers.jaxb.JAXBMarshalException: Could > not find JAXBContextFinder for media type: text/html > > org.jboss.resteasy.plugins.providers.jaxb.AbstractJAXBProvider.findJAXBContext(AbstractJAXBProvider.java:50) > > org.jboss.resteasy.plugins.providers.jaxb.AbstractJAXBProvider.getMarshaller(AbstractJAXBProvider.java:127) > > org.jboss.resteasy.plugins.providers.jaxb.AbstractJAXBProvider.writeTo(AbstractJAXBProvider.java:103) > > org.jboss.resteasy.core.ServerResponse.writeTo(ServerResponse.java:178) > > org.jboss.resteasy.core.SynchronousDispatcher.writeJaxrsResponse(SynchronousDispatcher.java:574) > > org.jboss.resteasy.core.SynchronousDispatcher.writeFailure(SynchronousDispatcher.java:411) > > org.jboss.resteasy.core.SynchronousDispatcher.executeExactExceptionMapper(SynchronousDispatcher.java:274) > > org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:194) > > org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:124) > > org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:200) > > org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:48) > > org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:43) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > > When I make the call with the “/” character URL-encoded, I get a 400 Bad > Request. > > Can you please provide some insight into how to handle a path parameter > containing a slash? > > Thanks. > > > > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > > > > _______________________________________________ > Resteasy-developers mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-developers -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |