cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chaitanya" <>
Subject Some queries regarding JSON support in cxf-2.2.4
Date Thu, 29 Oct 2009 08:39:17 GMT

I have been evaluating cxf-2.2.4.jar and I need some help for the following issues.

Issue 1 :
Is there any support for getting JSON in Badgerfish and Jettison-Mapped notations in cxf-2.2.4?
If yes, please tell me the configuration to get JSON any one of these notations.
If no, by when do you plan to suport these notations.

Issue 2 :
Marshalling and unmarshalling of a list containing objects of a subclass of the Type of the
In this example Client is a subclass of Customer.

public class CustomerService {

    public MyObject getCustomerList() {
        List<Customer> list = new ArrayList<Customer>();

        Client client = new Client();

        Customer c = new Customer();

        MyObject m = new MyObject();
        return m;

The JSON for the list given by cxf is :

where as the JSON given by jersey-bundle-1.0.2.jar is :

The JSON given by jersey-bundle-1.0.2.jar is more helpful in some cases. Can you please provide
similar support in cxf too.

Java classes for the above example 

public class MyObject {

    List<Customer> list = new ArrayList<Customer>();

    public List<Customer> getList() {
        return list;

    public void setList(List<Customer> list) {
        this.list = list;

public class Customer {
    private long id;
    private String name;
 public Customer() {}
 public Customer(String name, long id) { = name; = id;

    public long getId() {
        return id;
    public void setId(long id) { = id;
    public String getName() {
  return name;
    public void setName(String name) { = name;

public class Client extends Customer {
    private String clientId;

    public String getClientId() {
        return clientId;
    public void setClientId(String clientId) {
        this.clientId = clientId;

Thank you.
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message