cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anand Hemmige <anan...@gmail.com>
Subject Re: How to customize output based on content-type in header.
Date Wed, 22 Feb 2012 21:23:26 GMT
Thank you Glen,
I will try that ..

On Wed, Feb 22, 2012 at 12:47 PM, Glen Mazza <gmazza@talend.com> wrote:

> I recently converted Jersey's jacksonjsonprovider sample to run on CXF,
> it's available here:
> https://github.com/gmazza/**jersey-samples-on-cxf/tree/**
> master/jacksonjsonprovider<https://github.com/gmazza/jersey-samples-on-cxf/tree/master/jacksonjsonprovider>
>
> The README.html for this sample shows how the client can use open-source
> cURL to provide the desired content type as a header (extra parameter)
> instead of within the URL; also the sample itself has root resources
> providing content in various formats: XML, JSON, and JSONP.
>
> HTH,
> Glen
>
>
> On 02/22/2012 03:17 PM, anand sridhar wrote:
>
>> Hi,
>> I am developing REST services using CXF and am exposing each service to
>> provide output in multiple content types  viz , application./xml,
>> application/json, text/html etc...
>> To determine what content type every request should request for, I managed
>> to work out that I can use cxf extensions to provide the content type as
>> extension.
>>
>> like /api/service.xml, /api/service.json  and so on.
>>
>> However, I would like to know if it is possible to provide the content
>> type
>> through request header and how in CXF I can read and provide output in
>> suitable content type.
>>
>> Thanks,
>> Anand
>>
>>
>
> --
> Glen Mazza
> Talend Community Coders
> coders.talend.com
> blog: www.jroller.com/gmazza
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message