• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 231
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic