title: Adapter deployment failed: HTTP 415 - Unsupported Media Type
body: <p>I'm developing a small app on Worklight using eclipse Kepler SR2.
  I have developed an adapter and it was functional. then without doing any changes, I'm getting this error:
  "Adapter deployment failed: HTTP 415 - Unsupported Media Type"</p>
  
  <p>Adapter.js:</p>
  
  <pre class="lang-js prettyprint-override"><code>var data;
  function onAuthRequired(headers, errorMessage){
  errorMessage = errorMessage ? errorMessage : null;
  
  return {
      authRequired: true,
      errorMessage: errorMessage
  };
  }
  
  function StoreData(Data)
  {
  var activeUser = WL.Server.getActiveUser('mySecurityRealm');
  
  activeUser.attributes = {
          data : Data
  };
  WL.Logger.info("Data stored");
  WL.Logger.info(activeUser);
  }
  
  function RetrieveData()
  {
  
  var activeUser = WL.Server.getActiveUser();
  WL.Logger.info(activeUser);
  WL.Logger.info(activeUser.attributes['data']);
  return {
      data : activeUser.attributes.data
  };
  }
  </code></pre>
  
  <p>Adapter.xml:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;wl:adapter name="DataManagementAdapter"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xmlns:wl="http://www.worklight.com/integration"
  xmlns:http="http://www.worklight.com/integration/http"&gt;
  
  &lt;displayName&gt;DataManagementAdapter&lt;/displayName&gt;
  &lt;description&gt;DataManagementAdapter&lt;/description&gt;
  &lt;connectivity&gt;
      &lt;connectionPolicy xsi:type="http:HTTPConnectionPolicyType"&gt;
          &lt;protocol&gt;http&lt;/protocol&gt;
          &lt;domain&gt;rss.cnn.com&lt;/domain&gt;
          &lt;port&gt;80&lt;/port&gt; 
          &lt;!-- Following properties used by adapter's key manager for choosing specific            certificate from key store  
          &lt;sslCertificateAlias&gt;&lt;/sslCertificateAlias&gt; 
          &lt;sslCertificatePassword&gt;&lt;/sslCertificatePassword&gt;
          --&gt;     
      &lt;/connectionPolicy&gt;
      &lt;loadConstraints maxConcurrentConnectionsPerNode="2" /&gt;
  &lt;/connectivity&gt;
  
  &lt;procedure name="StoreData" securityTest="mySecurityTest"/&gt;
  
  &lt;procedure name="RetrieveData" securityTest="mySecurityTest"/&gt;
  
  &lt;/wl:adapter&gt;
  </code></pre>