Quantcast
Channel: Web services
Viewing all articles
Browse latest Browse all 2361

java.lang.RuntimeException: Failed : HTTP error code : 415

$
0
0
by manjunath shenoy.  

hi all i am trying to develop REST webservice. I am using the code from [url]"http://examples.javacodegeeks.com/enterprise-java/rest/jersey/json-example-with-jersey-jackson/"[/url].

I have exactly same code . I have deployed this service on tomcat7. I get an exception when it tries to invoke the service

ClientResponse response = webResource.accept("application/json") .type("application/json").post(ClientResponse.class, st);

 

 

I get an excpetion which says [quote] "java.lang.RuntimeException: Failed : HTTP error code : 415"[/quote] I tried some other egample as well ( i think from mykong site) and got the same exception. Please help


Viewing all articles
Browse latest Browse all 2361

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>