wood burning stoves*
The moose likes Web Services and the fly likes Http 405: The specified HTTP method is not allowed for the requested resource (Request method 'POST' Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Http 405: The specified HTTP method is not allowed for the requested resource (Request method Watch "Http 405: The specified HTTP method is not allowed for the requested resource (Request method New topic
Author

Http 405: The specified HTTP method is not allowed for the requested resource (Request method 'POST'

chandeep arora
Greenhorn

Joined: Sep 24, 2013
Posts: 1
I have a Rest Web service used to add items in database.. The architecture goes like this:

Request generated from UI with the items in json format to add items in DB --> Controller: converts json to xml for rest web service --> Rest web service: takes the xml and extracts data and adds into db.

Now.. the request generated from UI is a get request to controller so to pass data to controller.

UI Simulator Code:



CONTROLLER:



WEB SERVICE:



NOW i am getting the error:


Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3817

First of all why do you need a controller to convert JSON -> XML as the backend accepts XML anyway?


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Http 405: The specified HTTP method is not allowed for the requested resource (Request method 'POST'
 
Similar Threads
Controller redirect to another Controller?
Spring MVC using @requestbody for Jsons request not working saying "Method not allowed"
GWT RPC with Spring 3 backend
Create a new object in db using Post with Spring3 RestTemplate
Marshalling plumbing - off base