As far as a Jettison-based JSONProvider is concerned: I can not reproduce the reported issue, it does not matter whether the object is returned directly or as a Response entity. Perhaps some of the configuration you applied to JSONProvider may've affected it.

Note that a 'dropRootElement' property will make sure JSONProvider will produce a root-less sequence.

Please consider providing a test or war file to get the issue sorted out

Cheers, Sergey

On 16/05/12 15:30, jsicotte wrote:
In my code I not returning a User object, that was just an example. If you
want an example class tough, below is the class for an application error:

        @XmlRootElement
         public class ErrorResponse {
             private ErrorCode code;
            private String summary;
             private String description;

             public ErrorCode getCode() {return code;}
            public void setCode(ErrorCode code) {this.code = code;}
            public String getSummary() {return summary;}
            public void setSummary(String summary) {this.summary = summary;}
            public String getDescription() {return description;}
            public void setDescription(String description) {this.description =
description;}
       }

As you an see, it is pretty straight forward with simple getters and
setters.

--
View this message in context: 
http://cxf.547215.n5.nabble.com/Using-Response-entity-returns-different-JSON-tp5707943p5707972.html
Sent from the cxf-user mailing list archive at Nabble.com.


--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Reply via email to