[Resteasy-users] @POST vs @GET

2012-12-31 Thread Nuwan Bandara
Hi, I'm new to Resteasy $ Webservices. I'm in the process of exposing one of my stateless session bean remote interface as a resteasy web service. Application configuration is done and able to expose the methods as web services. Here are my questions: 1. I have a method that is suppose to

Re: [Resteasy-users] @POST vs @GET

2013-01-02 Thread Nuwan Bandara
Thank you for all the inputs. With the help of your inputs and Resteasy documentation's help I've decided to use @PUT and @MatrixParam to accept and map the client parameters. On Wed, Jan 2, 2013 at 6:25 AM, Bill Burke bbu...@redhat.com wrote: On 12/31/2012 12:42 PM, Nuwan Bandara wrote: Hi

[Resteasy-users] How to Handle RESTeasy Exceptions using ExceptionMapper interface?

2013-01-31 Thread Nuwan Bandara
Hi, I have a session bean exposed as a RESTeasy web service. I am using @Produces({application/xml}) to produce the response. Regardless of the outcome, I bundled success, failure, or application exception message into the xml and send back to the client. I know this is not the best way to handle

Re: [Resteasy-users] How to Handle RESTeasy Exceptions using ExceptionMapper interface?

2013-01-31 Thread Nuwan Bandara
Thanks for the replay. This is what I have but my app does not return the output specified in the ExceptionMapper. Instead it throws HTTP Status 500 html error. Any Idea why this happen? Am I suppose to do anything else except that I have done so far? Like web.xml configuration? @Provider public

Re: [Resteasy-users] How to Handle RESTeasy Exceptions using ExceptionMapper interface?

2013-01-31 Thread Nuwan Bandara
Hi Guys, I fixed it. I was missing the following in the web.xml context-param param-nameresteasy.providers/param-name param-valuecom.company.x.wer.exception.DefaultExceptionMapper/param-value /context-param Thanks, Nuwan On Thu, Jan 31, 2013 at 2:26 PM, Nuwan Bandara mail.nu

Re: [Resteasy-users] Unable to find a MessageBodyReader of content-type text/html; charset=utf-8

2013-02-22 Thread Nuwan Bandara
the server as the response body contains HTML, not the requested JSON you put in the accep theader. Check the status to see if it is 200. If it is an error status, its probably HTML from the server s error msg On 2/22/2013 2:04 PM, Nuwan Bandara wrote: Hi, Thanks for your reply. Here's my

[Resteasy-users] POST method always returns Error status 401 Unauthorized

2013-10-11 Thread Nuwan Bandara
Hi, I use the following code to call a web service using POST and always get POST method always returns Error status 401 Unauthorized Can someone help me to figure out what I do wrong in the bellow code? Thanks in advance, Nuwan *FYI: webServiceUrl:

Re: [Resteasy-users] POST method always returns Error status 401 Unauthorized

2013-10-14 Thread Nuwan Bandara
Can someone help me on this? Thanks. On Fri, Oct 11, 2013 at 1:15 PM, Nuwan Bandara mail.nu...@gmail.com wrote: Hi, I use the following code to call a web service using POST and always get POST method always returns Error status 401 Unauthorized Can someone help me to figure out what I