jQuery in Action, 2nd edition*
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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: 3825

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]
 
Don't get me started about those stupid light bulbs.
 
subject: Http 405: The specified HTTP method is not allowed for the requested resource (Request method 'POST'