2011-07-18 52 views
1

我試圖通過一個包含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:如果您需要任何額外的信息,請諮詢。

+0

'/ getCmBuildConfigurations/{productName}/{projectName}'應該如何匹配'/ getCmBuildAreas/QLARIUS/QLARIUS%3AMAINLINE_JAVA_STR/ANT_JAVA_BUILD%3B8'? –

+0

我注意到你的URL有'getCmBuildAreas',你的'@ Path'註解有'getCmBuildConfigurations' - 如果這些匹配? – Bringer128

+0

一些錯誤,同時複製粘貼...固定 – Sansend

回答

2

Apache CXF 2.3未處理正確編碼分號的事實歸因於該版本中的BUG。它在版本2.4,2.3.4中是固定的。

+0

的一個參數非常重要,它在cxf 3.1.6中被破壞... – mirabilos