Semicolon in parameter of REST service call with Apache CXF 2.3
I'm try to pass parameter that contains semicolon(reserved symbol) in REST service, but I have problem with Apac开发者_如何学编程he Tomcat
REST services wrote using Apache CXF 2.3
@GET
@Path("/getCmBuildAreas/{productName}/{projectName}/{buildConfiguration}")
@Produces(MediaType.APPLICATION_JSON)
public CmBuildAreas getCmBuildAreas(@PathParam("buildConfiguration") String buildConfiguration, @PathParam("productName") String productName, @PathParam("projectName") String projectName) {
...
}
Then I run query http://localhost:8080/DevManager/services/rest/getCmBuildAreas/QLARIUS/QLARIUS%3AMAINLINE_JAVA_STR/ANT_JAVA_BUILD%3B8 and received this error:
Jul 18, 2011 1:57:53 PM org.apache.cxf.jaxrs.utils.JAXRSUtils findTargetMethod
WARNING: No operation matching request path /DevManager/services/rest/getCmBuildAreas/QLARIUS/QLARIUS%3AAMAINLINE_JAVA_STR/ANT_JAVA_BUILD%3B8 is found, HTTP Method : GET, ContentType : */*, Accept : image/jpeg,application/x-ms-application,image/gif,application/xaml+xml,image/pjpeg,application/x-ms-xbap,application/vnd.ms-excel,application/vnd.ms-powerpoint,application/msword,*/*,.
Jul 18, 2011 1:57:53 PM org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper toResponse
WARNING: WebApplicationException has been caught : no cause is available
PS: if you need any additional information, ask.
The fact that Apache CXF 2.3 is not handling correctly encoded semicolons is due to a BUG in that version. It is fixed in versions 2.4, 2.3.4.
精彩评论