You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@syncope.apache.org by Colm O hEigeartaigh <co...@apache.org> on 2020/05/26 09:07:09 UTC

2.1.x XML regression?

Hi all,

I'm just migrating some test-cases from Syncope 2.0.13 to 2.1.6. I've
noticed what seems like a regression. I'm creating a group called "boss" in
Syncope. With 2.0.X I can query the REST API as follows:

curl -H "Accept: application/xml" -u "admin:password"
http://localhost:9080/syncope/rest/groups -
v

and I see:

<?xml version="1.0" encoding="UTF-8"
standalone="yes"?><syncope2:pagedResult xmlns:syncope2="
http://syncope.apache.org/2.0"><page>1</page><result><item xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xsi:type="syncope2:groupTO"><creationDate>2020-05-26T09:57:32.237+01:00</creationDate><creator>admin</creator><lastChangeDate>2020-05-26T09:57:32.237+01:00</lastChangeDate><lastModifier>admin</lastModifier><auxClasses/><derAttrs/><discriminator>org.apache.syncope.common.lib.to.GroupTO</discriminator><dynRealms/><key>374fdc23-9aad-455d-8fdc-239aada55d34</key><plainAttrs/><realm>/</realm><resources/><type>GROUP</type><virAttrs/><adynMembershipConds/><dynamicAnyObjectMembershipCount>0</dynamicAnyObjectMembershipCount><dynamicUserMembershipCount>0</dynamicUserMembershipCount><name>boss</name><staticAnyObjectMembershipCount>0</staticAnyObjectMembershipCount><staticUserMembershipCount>0</staticUserMembershipCount><typeExtensions/></item></result><size>1</size><totalCount>1</totalCount></syncope2:pagedResult>

However, with 2.1.6 I only see:

<?xml version="1.0" encoding="UTF-8"
standalone="yes"?><syncope21:pagedResult xmlns:syncope21="
http://syncope.apache.org/2.1
"><page>1</page><result><item/></result><size>1</size><totalCount>1</totalCount></syncope21:pagedResult>

With JSON in 2.1.6 it's OK:

{"prev":null,"next":null,"page":1,"size":1,"totalCount":1,"result":[{"@class":"org.apache.syncope.common.lib.to.GroupTO","@class":"org.apache.syncope.common.lib.to.GroupTO","key":"5cc6e67e-5321-46c4-86e6-7e532176c4ba","type":"GROUP","realm":"/","name":"boss","creator":"admin","creationDate":"2020-05-26T09:03:23.911+0000","lastModifier":"admin","lastChangeDate":"2020-05-26T09:03:23.911+0000","status":null,"userOwner":null,"groupOwner":null,"udynMembershipCond":null,"staticUserMembershipCount":0,"dynamicUserMembershipCount":0,"staticAnyObjectMembershipCount":0,"dynamicAnyObjectMembershipCount":0,"adynMembershipConds":{},"dynRealms":[],"auxClasses":[],"plainAttrs":[],"derAttrs":[],"virAttrs":[],"resources":[],"typeExtensions":[]}]}

Should I create a JIRA for this, or am I making a mistake somewhere?

Colm.

Re: 2.1.x XML regression?

Posted by Colm O hEigeartaigh <co...@apache.org>.
I committed the fix yesterday on 2_1_X for
>
> https://issues.apache.org/jira/browse/SYNCOPE-1565
>
> If you run the curl command as above against 2.1.7-SNAPSHOT it will work
> as expected, as you can see for example by
>
> curl -H "Accept: application/xml" -u "admin:password"
> https://syncope-vm.apache.org/syncope/rest/groups


Thanks Francesco!

Colm.


>
>
> Regards.
>
> --
> Francesco Chicchiriccò
>
> Tirasa - Open Source Excellence
> http://www.tirasa.net/
>
> Member at The Apache Software Foundation
> Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
> http://home.apache.org/~ilgrosso/
>
>

Re: 2.1.x XML regression?

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 26/05/20 11:07, Colm O hEigeartaigh wrote:
> Hi all,
>
> I'm just migrating some test-cases from Syncope 2.0.13 to 2.1.6. I've
> noticed what seems like a regression. I'm creating a group called "boss" in
> Syncope. With 2.0.X I can query the REST API as follows:
>
> curl -H "Accept: application/xml" -u "admin:password"
> http://localhost:9080/syncope/rest/groups -
> v
>
> and I see:
>
> <?xml version="1.0" encoding="UTF-8"
> standalone="yes"?><syncope2:pagedResult xmlns:syncope2="
> http://syncope.apache.org/2.0"><page>1</page><result><item xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"
> xsi:type="syncope2:groupTO"><creationDate>2020-05-26T09:57:32.237+01:00</creationDate><creator>admin</creator><lastChangeDate>2020-05-26T09:57:32.237+01:00</lastChangeDate><lastModifier>admin</lastModifier><auxClasses/><derAttrs/><discriminator>org.apache.syncope.common.lib.to.GroupTO</discriminator><dynRealms/><key>374fdc23-9aad-455d-8fdc-239aada55d34</key><plainAttrs/><realm>/</realm><resources/><type>GROUP</type><virAttrs/><adynMembershipConds/><dynamicAnyObjectMembershipCount>0</dynamicAnyObjectMembershipCount><dynamicUserMembershipCount>0</dynamicUserMembershipCount><name>boss</name><staticAnyObjectMembershipCount>0</staticAnyObjectMembershipCount><staticUserMembershipCount>0</staticUserMembershipCount><typeExtensions/></item></result><size>1</size><totalCount>1</totalCount></syncope2:pagedResult>
>
> However, with 2.1.6 I only see:
>
> <?xml version="1.0" encoding="UTF-8"
> standalone="yes"?><syncope21:pagedResult xmlns:syncope21="
> http://syncope.apache.org/2.1
> "><page>1</page><result><item/></result><size>1</size><totalCount>1</totalCount></syncope21:pagedResult>
>
> With JSON in 2.1.6 it's OK:
>
> {"prev":null,"next":null,"page":1,"size":1,"totalCount":1,"result":[{"@class":"org.apache.syncope.common.lib.to.GroupTO","@class":"org.apache.syncope.common.lib.to.GroupTO","key":"5cc6e67e-5321-46c4-86e6-7e532176c4ba","type":"GROUP","realm":"/","name":"boss","creator":"admin","creationDate":"2020-05-26T09:03:23.911+0000","lastModifier":"admin","lastChangeDate":"2020-05-26T09:03:23.911+0000","status":null,"userOwner":null,"groupOwner":null,"udynMembershipCond":null,"staticUserMembershipCount":0,"dynamicUserMembershipCount":0,"staticAnyObjectMembershipCount":0,"dynamicAnyObjectMembershipCount":0,"adynMembershipConds":{},"dynRealms":[],"auxClasses":[],"plainAttrs":[],"derAttrs":[],"virAttrs":[],"resources":[],"typeExtensions":[]}]}
>
> Should I create a JIRA for this, or am I making a mistake somewhere?
Hi Colm,
I committed the fix yesterday on 2_1_X for

https://issues.apache.org/jira/browse/SYNCOPE-1565

If you run the curl command as above against 2.1.7-SNAPSHOT it will work as expected, as you can see for example by

curl -H "Accept: application/xml" -u "admin:password" https://syncope-vm.apache.org/syncope/rest/groups

Regards.

-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/