camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Satguru Srivastava (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-10144) Salesforce keeps breaking backward compatibility by adding fields to older API versions
Date Tue, 26 Jul 2016 19:56:20 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-10144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15394438#comment-15394438
] 

Satguru Srivastava commented on CAMEL-10144:
--------------------------------------------

Never looked into RestResources. Let me check why that works. I suspect something to do with
XStream VS Jackson processing
Now what I did look into and tested, was user generated DTO . So, for example, if I create
a DTO for say Account sObject and then somebody, later on, adds a new,  say, a custom field,
to Account, the deserialization fails. If the annotation is added to the generated class rather
then the base class, deserialization  passes.

> Salesforce keeps breaking backward compatibility by adding fields to older API versions
> ---------------------------------------------------------------------------------------
>
>                 Key: CAMEL-10144
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10144
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-salesforce
>    Affects Versions: 2.17.2, 2.18.0
>            Reporter: Dhiraj Bokde
>            Assignee: Dhiraj Bokde
>             Fix For: 2.17.3, 2.18.0
>
>
> Salesforce adds fields to org.apache.camel.component.salesforce.api.dto.RestResources
even after an API has been released. This needs to be handled in the component by ignoring
unknown properties for that type. 
> XStream doesn't support doing this for an single DTO, but it can be done for all types
by using XStream.ignoreUknownProperties(). It will make it ignore all unknown properties for
all inbuilt DTOs as wells user generated ones. But since the XML payload is less popular,
hopefully this behavior won't be an issue. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message