404 Error Rest Web Service
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company 404 error in rest api Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs
Web Service 404 Not Found Error
Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, rest web service error handling just like you, helping each other. Join them; it only takes a minute: Sign up REST API 404: Bad URI, or Missing Resource? up vote 95 down vote favorite 24 I'm building a REST API, but I've
Web Service 403 Error
encountered a problem. It seems that accepted practice in designing a REST API is that if the resource requested doesn't exist, a 404 is returned. However, to me, this adds unnecessary ambiguity. HTTP 404 is more traditionally associated with a bad URI. So in effect we're saying "Either you got to the right place, but that specific record does not exist, or there's no such location on the Internets! I'm really not sure which web service 401 error one.." Consider the following URI: http://mywebsite/api/user/13 If I get a 404 back, is that because User 13 does not exist? Or is it because my URL should have been: http://mywebsite/restapi/user/13 In the past, I've just returned a NULL result with an HTTP 200 OK response code if the record doesn't exist. It's simple, and in my opinion very clean, even if its not necessarily accepted practice. But is there a better way to do this? web-services http rest share|improve this question asked Mar 29 '12 at 17:50 Brian Lacy 8,20353264 Probably a duplicate. stackoverflow.com/questions/3821663/… –Spencer Kormos Mar 29 '12 at 17:57 3 The other question seems to be related to URI Query string formats. The discussion on 404 there is not sufficient to answer my question, which is whether there's a more appropriate or useful way to determine what a 404 actually means. I reviewed that one before posting. –Brian Lacy Mar 29 '12 at 19:13 Is it normal when browser concole consist the errors 404? When i do regular operations with correct uri but resource not found. –Vasiliy Mazhekin Dec 3 '14 at 13:27 1 404 does not indicate a bad URI, it indicates a resource Not Found. That might be because there is no user '13', or it might be because th
here for a quick overview of the site
Web Service 500 Error
Help Center Detailed answers to any questions you might have
Web Service 400 Error
Meta Discuss the workings and policies of this site About Us Learn more about soa 404 Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges http://stackoverflow.com/questions/9930695/rest-api-404-bad-uri-or-missing-resource Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Simple Rest Webservice returning http status 404 up vote 3 down vote favorite http://stackoverflow.com/questions/21633070/simple-rest-webservice-returning-http-status-404 I have been trying to get this tutorial to work: Link I am using Apache Tomcat 7.0 and the Jersey 2.0 libraries. This is my service: package org.arpit.javapostsforlearning.webservice; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; @Path("ConversionService") public class FeetToInchAndInchToFeetConversionService { @GET @Path("/InchToFeet/{i}") @Produces(MediaType.TEXT_XML) public String convertInchToFeet(@PathParam("i") int i) { int inch=i; double feet = 0; feet =(double) inch/12; return " Java JSRs Mobile https://coderanch.com/t/570630/Web-Services/java/Run-Simple-Jersey-REST-Webservice Certification Databases Caching Books Engineering Languages Frameworks Products This Site Careers Other all forums Forum: Web Services Cant Run Simple Jersey REST Webservice Example Rajesh Khan Ranch Hand Posts: 230 posted 4 years ago So I web service am trying to run a very simple example from http://www.ibm.com/developerworks/web/library/wa-aj-tomcat/#download of building a REST Jersey Webservice Here is what i did -Named the project Jersey (Dynamic Web Project) -Created a package "sample.hello.resources" -Added a class called "HelloResource" -The rest web service code of the class HelloResource is package sample.hello.resources; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; @Path("/hello") public class HelloResource { @GET @Produces(MediaType.TEXT_PLAIN) public String sayHello() { return "Hello Jersey"; } } -Changed the web.xml file to the following