You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by John-M Baker <jo...@db.com> on 2008/05/14 12:55:02 UTC
CXF & REST
Hello,
If a client does not specify Accepts application/xml, JSON is used to
encode a response. Is there a way to force an XML response regardless of
whether the client passes application/xml?
Thanks,
John Baker
--
Web SSO
IT Infrastructure
Deutsche Bank London
URL: http://websso.cto.gt.intranet.db.com
---
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.
Re: CXF & REST
Posted by Sergey Beryozkin <se...@iona.com>.
Hi
Add @ProduceMime("application/xml") to your method, it should fix it
Cheers, Sergey
> Hello,
>
> If a client does not specify Accepts application/xml, JSON is used to
> encode a response. Is there a way to force an XML response regardless of
> whether the client passes application/xml?
>
> Thanks,
>
>
> John Baker
> --
> Web SSO
> IT Infrastructure
> Deutsche Bank London
>
> URL: http://websso.cto.gt.intranet.db.com
>
>
> ---
>
> This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this
> e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution
> of the material in this e-mail is strictly forbidden.
>
> Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.
----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland