Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTTP Status 405 - Restful webservice

 
Bharat Rajan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am using RESTful web service for my API.
I would pass a call as below:

http://localhost:8085/outbound/login?&username=zzz&password=ttt&passwordtype=plaintext.

this generates a security token for me which i will use for further services. "login" in the API call is my service command
I am using Tomcat 6 for this.

when i pass the wrong service command,
http://localhost:8085/outbound/lon?&
i will return an error message caught from my method. It is working as expected.

Issue I am facing is when i dont pass the service command in the URL like

http://localhost:8085/outbound/?

I am getting the error as:

HTTP Status 405 -
--------------------------------------------------------------------------------
type Status report
message
description The specified HTTP method is not allowed for the requested resource ().
--------------------------------------------------------------------------------
Apache Tomcat/6.0.20

It is not even getting into my class, and so I am not able to debug.

Someone please help me understand the concept of why and where it is getting wrong. Thanks in advance
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic