Daniel Spiess

+ Follow
since Sep 04, 2012
Daniel likes ...
Objective C Java Google App Engine
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Daniel Spiess

It's the other way around. POST is for creation, and PUT is for update.
5 years ago
I'm not so sure a POST is the right solution here. Ultimately the resource you're changing is the user. You're making the user go from a not validated state to a validated state. In both states, the user exists. POST is used for creating a resource, and you're supposed to include the entire resource.

I think what you want is some type of PUT.

PUT user/{id} with XML including the validation code. The call would return a user in the validated state if the code works, and an error otherwise.

My $0.02
5 years ago
I''ve run into an error that I'm struggling to address. Basically the web application is a REST application that takes data in as a large POST, stores it in a database, and returns the stored data to the user in the response as XML using JAX-RS. This is repeated thousands of times. The data is stored, and the client gets the full response.

Other than the JBoss server logs getting spammed with the following warnings/errors, there are no problems. Both the web application and client do not report errors, and run fine.

It sounds like this error often happens when the client ends the conversation by clicking "back" or canceling a download. Since this conversation is all automated and I'm not sure where the conversation is getting cut abruptly, I don't feel comfortable ignoring this error.

I'm returning XML via JAX-RS using the following call

The client is calling the REST service with Jersey using this code

Very quickly after starting the process I get the following warnings in my JBoss AS7 logs:

the warnings quickly turn to errors and return

Any ideas on how to fix this?
8 years ago