Can you please provide a reproducer? (zip file with java project with minimal example of this issue - deployment application and client application)

I'm unable to reproduce this issue, I tried this and it works as expected:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><customObject><a>5</a><b>5</b></customObject>

public static void main(String[] args) throws Exception {
    Client clientDetailsClient = ClientBuilder.newBuilder().build();
    Response res = clientDetailsClient.target(URL).request(MediaType.APPLICATION_XML).get(Response.class);
    System.out.println("Status = " + res.getStatus());
    System.out.println("Media Type:" + res.getMediaType());
    System.out.println(res.readEntity(CustomObject.class).getA());
}

@XmlRootElement
public class CustomObject {
    private Integer a;

    public Integer getA() {
        return a;
    }

    public CustomObject setA(Integer a) {
        this.a = a;
        return this;
    }
}

Thank you,

Marek

On 3/12/19 5:48 AM, Tony Herstell wrote:
I am using Wildfly and have this code:

Response xxxxDetailsResponse = clientDetailsClient.target(targetForxxxxDetailsService)
.queryParam(propertiesService.getSystemProperty("xxxx_details_including_xxxxxxx"), "true")
.request(MediaType.APPLICATION_XML)
.header("jwt", jWTObject.getJwt())
.get(Response.class);

int statusCode = xxxxDetailsResponse   .getStatus();
logger.info("Status = " + statusCode);
if (statusCode != 200) {
logger.severe( xxxxDetailsResponse  .getStatusInfo().getReasonPhrase());
logger.severe( xxxxDetailsResponse  .readEntity(String.class));
} else {
logger.info("Media Type:" + xxxxDetailsResponse   .getMediaType());
xxxxDetailsProfileWrapper xxxxDetailsProfileWrapper = xxxxDetailsResponse.readEntity(xxxxDetailsProfileWrapper.class);  

The problem is that the "spec" I inteact with has fields added over time (albeit optional)...

The unmarshalling fails and then I have to update the Entites I am unmarshalling into to add the new fields...

I can't seem to find an Annotation or a setting that says "Ignore unknown fields arriving in supplied Json"....

Please can you advise what I am missing here...

Thx


Virus-free. www.avast.com

_______________________________________________
resteasy mailing list
resteasy@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/resteasy