我試圖通過一個包含REST服務分號(保留符號)參數,但我有問題的Apache Tomcat分號與Apache CXF REST服務調用的參數2.3
REST服務使用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) {
...
}
然後我運行查詢http://localhost:8080/DevManager/services/rest/getCmBuildAreas/QLARIUS/QLARIUS%3AMAINLINE_JAVA_STR/ANT_JAVA_BUILD%3B8並收到此錯誤:
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:如果您需要任何額外的信息,請諮詢。
'/ getCmBuildConfigurations/{productName}/{projectName}'應該如何匹配'/ getCmBuildAreas/QLARIUS/QLARIUS%3AMAINLINE_JAVA_STR/ANT_JAVA_BUILD%3B8'? –
我注意到你的URL有'getCmBuildAreas',你的'@ Path'註解有'getCmBuildConfigurations' - 如果這些匹配? – Bringer128
一些錯誤,同時複製粘貼...固定 – Sansend