aspose file tools*
The moose likes Web Services and the fly likes @ConsumeMime Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "@ConsumeMime" Watch "@ConsumeMime" New topic
Author

@ConsumeMime

Smari Oumaya
Greenhorn

Joined: Sep 29, 2010
Posts: 22
Hi,
I always find this notation in tutorials concerning web services REST :"@ConsumeMime("application/(employee)+xml") ". Can someone explain me how to use it.
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
It was not entirely easy, but I finally found the API documentation:
https://jersey.dev.java.net/nonav/apidocs/latest/jersey/javax/ws/rs/Consumes.html
By the way, I think the annotation has been renamed to @Consumes in the latest version of Jersey (the JAX-RS reference implementation). Correct me if I am wrong.
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
Smari Oumaya
Greenhorn

Joined: Sep 29, 2010
Posts: 22
Thanks, but i'm wondering about "employee", how can i define my classes to use them in the consumes annotation. I hope that my question is more clear now.
Smari Oumaya
Greenhorn

Joined: Sep 29, 2010
Posts: 22
please, i really need help!
i can't find how to define my classes in the clause of @consumes.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: @ConsumeMime