2014-01-29 4 views
0

WebSphere Liberty에서 내 REST 서비스에 대한 JSON 메시지를 POST 할 때 다음과 같은 문제가 발생합니다.내 WAR에 Apache Wink Client를 포함 할 때 지원되지 않는 미디어 유형 문제

내 WAR 내에 Apache Wink Client jar를 번들 경우에만이 발생합니다.

[29/01/14 18:52:57:634 GMT] 00000027 org.apache.wink.server.internal.RequestProcessor    I The following error occurred during the invocation of the handlers chain: WebApplicationException (415 - Unsupported Media Type) with message 'null' while processing POST request sent to http://host:9080/my-war/myrest/req 

종속성 내가 추가 해요 :

<dependency> 
    <groupId>org.apache.wink</groupId> 
    <artifactId>wink-client</artifactId> 
    <version>1.4</version> 
</dependency> 
<dependency> 
    <groupId>org.apache.wink</groupId> 
    <artifactId>wink-client-apache-httpclient</artifactId> 
    <version>1.4</version> 
</dependency> 

자유 버전 :

WebSphere Application Server 8.5.5.1 (wlp-1.0.4.cl50120131011-1639) 

는이 문제를 해결하는 방법이 있습니까?

<application location="C:\myproject\target\myapp.war" type="war"> 
    <classloader apiTypeVisibility="spec,ibm-api,api,third-party"/> 
</application> 

답변

1

내가 개발에 관련 게시물을 발견했습니다 포털 작동 : 안톤의 링크를

고정

는 나는 자유 server.xml WAS에 다음 <scope>provided</scope>wink-client 종속 범위를 변경하고 추가 아래. 도움이 될 것입니다.

Developerworks forum

관련 문제