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

ASF GitHub Bot commented on TOMEE-2232:
---------------------------------------

GitHub user jgallimore opened a pull request:

    https://github.com/apache/tomee/pull/258

    TOMEE-2232

    These changes should resolve the itest failures, but Daniel's new 
additional tests still pass.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jgallimore/tomee cli-fix

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/tomee/pull/258.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #258
    
----
commit 28d042e2efb4ba0522742aeeea8673752ce53575
Author: Jonathan Gallimore <jgallimore@...>
Date:   2018-12-06T12:40:03Z

    TOMEE-2322 WIP attempting to fix classpath setup for iTests

commit 156cbe512fd2ed8cc4fbf8ba345dcac5c38ea182
Author: Jonathan Gallimore <jgallimore@...>
Date:   2018-12-06T14:23:34Z

    TOMEE-2322 Still WIP, but these failover tests pass now

commit 14e5a2b429b6311d6f6c0afde1e92e471beb0e9c
Author: Jonathan Gallimore <jgallimore@...>
Date:   2018-12-06T14:26:31Z

    TOME-2322 removing debug

commit 3c8038a32a0c06eefdbbc0b1e7cd17a3c61fbe69
Author: Jonathan Gallimore <jgallimore@...>
Date:   2018-12-06T15:09:10Z

    TOMEE-2322 restore previous classloader at the end

commit 1436a36870ea617fa203b29a8657868a0dcac7a6
Author: Jonathan Gallimore <jgallimore@...>
Date:   2018-12-06T15:27:50Z

    TOMEE-2322 add missing jar

----


> TomEE doesn't honor @XMLElement() name when deserializing JSON
> --------------------------------------------------------------
>
>                 Key: TOMEE-2232
>                 URL: https://issues.apache.org/jira/browse/TOMEE-2232
>             Project: TomEE
>          Issue Type: Bug
>    Affects Versions: 7.0.5
>            Reporter: Jonathan S Fisher
>            Priority: Critical
>              Labels: pull-request-available
>
> We encountered a strange limitation while working with salesforce. We're 
> hitting their login OAUTH endpoint and it returns a JSON string like this:
> {code:json}
> {  
>    "access_token":"onebiglongstring",
>    "instance_url":"https://ab67.salesforce.com";,
>    "id":"https://test.salesforce.com/id/sfid/sifd";,
>    "token_type":"Bearer",
>    "issued_at":"1536415016572",
>    "signature":"morebase64"
> }
>  {code}
> So naturally we constructed the following Java class:
> {code:java}
> @Data
> public class SalesforceLoginToken {
>       @XmlElement(name = "access_token")
>       private String accessToken;
>       @XmlElement(name = "instance_url")
>       private String instanceUrl;
>       @XmlElement
>       private String id;
>       @XmlElement(name = "token_type")
>       private String tokenType;
>       @XmlElement(name = "issued_at")
>       private String issuedAt;
>       @XmlElement
>       private String signature;
> }
> {code}
> However, TomEE will not deserialize any of the fields where the name is 
> specified in the XMLElement. A [head-desking] workaround we're using is to 
> break javabean convention and write our variables like this:
> {code:java}
>       @XmlElement
>       private String token_type;
> {code}
> because this won't work. TomEE simply fills out null every time:
> {code:java}
>       @XmlElement(name = "token_type")
>       private String tokenType;
> {code}
> I believe this used to work in TomEE 1.7.5, I haven't tested on master or 
> anything else.
> Anyway thanks,
> -Jonathan



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to