Hi this is a question for the users list...

On Tue, Aug 31, 2010 at 11:38 AM, Muhammad Sheraz Siddiqi <
[email protected]> wrote:

> Hi,
>
> I want to expose a webmethod like this:
>
> @WebMethod
> public List<CustonBean> test(String output)
> {
>        If(output == "xml")
>        {
>                //use XML Provider i.e. output XML
>        }
>        Else if(output == "json")
>        {
>                //use JSON Provider i.e. output JSON
>        }
> }
>
> I do not want to use @Produces or rely on "Accept" request header.
>
> Any help please ?
>
>
>
I'm presuming you're using JAXRS. So how are you going to decide if it's
JSON or XML that needs to be returned ?

cheers, Sergey

Reply via email to