aspose file tools
The moose likes Web Services and the fly likes Receiving HTTP 405 When trying to use Jersey Client to Process POST to Web Service Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Receiving HTTP 405 When trying to use Jersey Client to Process POST to Web Service" Watch "Receiving HTTP 405 When trying to use Jersey Client to Process POST to Web Service" New topic
Author

Receiving HTTP 405 When trying to use Jersey Client to Process POST to Web Service

James Dekker
Ranch Hand

Joined: Dec 09, 2006
Posts: 215
I am using JDK 1.6, Jersey, & Jersey Client to post a JSON String to a web service running on my local tomcat container.





What can I be doing wrong? Thank you for taking the time to read this...

-James
Emanuel Kadziela
Ranch Hand

Joined: Mar 24, 2005
Posts: 186
First, it seems that the code you listed does not match the output you listed. I don't see anywhere in the code where you print out the JSON String, yet this appears in the output "JSON String: {"qty":100,"name":"iPad 4"} ".

Secondly, 405 errors have to do with method mismatches (like trying to send a POST request to a server that only allows GET requests). Are you sure your server is set up to accept and process POST requests?
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Receiving HTTP 405 When trying to use Jersey Client to Process POST to Web Service
 
Similar Threads
Jersey RESTful web service - How to post XML file using jersey framework
Call to webservice returning with a response status 500 throws UniformInterfaceException
Jersey Client API Exception Handling issue
AJAX response to a Restful Jersey Resource
Obtaining JSON object using params in grails REST