title: Unsupported Media Type issue when including Apache Wink Client in my WAR
body: <p>I'm hitting the following issue when doing a POSTing a JSON message to my REST service in WebSphere Liberty.</p>
  
  <p>This <strong>ONLY happens</strong> when I bundle the Apache Wink Client jars inside my WAR.</p>
  
  <pre><code>[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
  </code></pre>
  
  <p>The dependencies I'm adding:</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;org.apache.wink&lt;/groupId&gt;
      &lt;artifactId&gt;wink-client&lt;/artifactId&gt;
      &lt;version&gt;1.4&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.apache.wink&lt;/groupId&gt;
      &lt;artifactId&gt;wink-client-apache-httpclient&lt;/artifactId&gt;
      &lt;version&gt;1.4&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>Liberty version:</p>
  
  <pre><code>WebSphere Application Server 8.5.5.1 (wlp-1.0.4.cl50120131011-1639)
  </code></pre>
  
  <p>Is there a way to work around this issue?</p>
  
  <h1>Fixed</h1>
  
  <p>Following Anton's link below I changed my <code>wink-client</code> dependency scope to <code>&lt;scope&gt;provided&lt;/scope&gt;</code> and added the following to the WAS Liberty <code>server.xml</code>:</p>
  
  <pre><code>&lt;application location="C:\myproject\target\myapp.war" type="war"&gt;
      &lt;classloader apiTypeVisibility="spec,ibm-api,api,third-party"/&gt;
  &lt;/application&gt;
  </code></pre>