406 error in the Java code
<p>i am writing java code for calling REST API's .</p>

<p>i am getting 406 error with the following code</p>

<pre><code> public List&lt;BlogBean&gt;  view_blogsbytagXml(String tag,String limit) {
    final String VIEW_BLOGSBYTAG1="api/blogs/tag/"+tag+".xml?limit="+limit+"";

 return webResource.path(VIEW_BLOGSBYTAG1).header(ConfigurationUtil.AUTHENTICATION_HEADER, authentication)
    .accept(MediaType.APPLICATION_XML_TYPE).get(new GenericType&lt;List&lt;BlogBean&gt;&gt;(){});
   }
</code></pre>

<p>The connections are ,
private final WebResource webResource;
         private final String authentication;</p>

<pre><code>authentication = ConfigurationUtil.getAuthenticationKey();

    ClientConfig config = new DefaultClientConfig();

    Client client = Client.create(config);

    webResource = client.resource(ConfigurationUtil.BaseURI);
</code></pre>

<p>i am getting 406 error in the above code</p>

<p>but when i gave the String as</p>

<pre><code>    final String VIEW_BLOGSBYTAG="api/blogs/tag/"+tag+".xml"; 
</code></pre>

<p>it doesnt show the error for me .. </p>
