You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Christofer Dutz (JIRA)" <ji...@apache.org> on 2009/03/05 10:53:58 UTC

[jira] Created: (CXF-2088) Wrong serialisation order of elements when using Aegis databinding.

Wrong serialisation order of elements when using Aegis databinding.
-------------------------------------------------------------------

                 Key: CXF-2088
                 URL: https://issues.apache.org/jira/browse/CXF-2088
             Project: CXF
          Issue Type: Bug
          Components: Aegis Databinding
    Affects Versions: 2.1.4
            Reporter: Christofer Dutz


In my current case I hava 
* an abstract Java class "AbstractDatabaseObject" defining a property "id".
* an abstract Java class "Credential" which extends "AbstractDatabaseObject" and defines a property "name"
* a concrete Java class "UsernamePasswordCredential" which extends "Credential" and defines properties "username" and "password"

All schemas are created to my greates satisfaction (Great Job!).
Unfortunately the serialisation order when using Aegis databinding (don't know if its the same using others) is the wrong way around.
Instead of getting:
<cred>
    <id>306ce816-01b7-11de-8d92-8d4df6b73eb1</id>
    <name>dsfgsdfgs</name>
    <password>dsfsfdg</password>
    <username>sdsdfgsdfg</username>
</cred>

I get:
<cred>
    <password>dsfsfdg</password>
    <username>sdsdfgsdfg</username>
    <name>dsfgsdfgs</name>
    <id>306ce816-01b7-11de-8d92-8d4df6b73eb1</id>
</cred>

Which my Flex client complains about.

I'll try to whip up a patch fixing this issue today.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-2088) Wrong serialisation order of elements when using Aegis databinding.

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12679431#action_12679431 ] 

Benson Margulies commented on CXF-2088:
---------------------------------------

Are you sure we want to run the extension code between the attributes and the elements? I guess attribute order doesn't matter.

> Wrong serialisation order of elements when using Aegis databinding.
> -------------------------------------------------------------------
>
>                 Key: CXF-2088
>                 URL: https://issues.apache.org/jira/browse/CXF-2088
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.1.4
>            Reporter: Christofer Dutz
>            Assignee: Benson Margulies
>         Attachments: BeanType.java
>
>
> In my current case I hava 
> * an abstract Java class "AbstractDatabaseObject" defining a property "id".
> * an abstract Java class "Credential" which extends "AbstractDatabaseObject" and defines a property "name"
> * a concrete Java class "UsernamePasswordCredential" which extends "Credential" and defines properties "username" and "password"
> All schemas are created to my greates satisfaction (Great Job!).
> Unfortunately the serialisation order when using Aegis databinding (don't know if its the same using others) is the wrong way around.
> Instead of getting:
> <cred>
>     <id>306ce816-01b7-11de-8d92-8d4df6b73eb1</id>
>     <name>dsfgsdfgs</name>
>     <password>dsfsfdg</password>
>     <username>sdsdfgsdfg</username>
> </cred>
> I get:
> <cred>
>     <password>dsfsfdg</password>
>     <username>sdsdfgsdfg</username>
>     <name>dsfgsdfgs</name>
>     <id>306ce816-01b7-11de-8d92-8d4df6b73eb1</id>
> </cred>
> Which my Flex client complains about.
> I'll try to whip up a patch fixing this issue today.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-2088) Wrong serialisation order of elements when using Aegis databinding.

Posted by "Christofer Dutz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12679142#action_12679142 ] 

Christofer Dutz commented on CXF-2088:
--------------------------------------

All that has to be done to resonve this issue, is to change the order of two code fragments in the method writeObjectInternal

Here the blocks:

for (Iterator itr = inf.getElements(); itr.hasNext();) {
    ...
}

and

if (inf.isExtension()) {
    ...
}

simply have to be swapped to output the extended type first.


> Wrong serialisation order of elements when using Aegis databinding.
> -------------------------------------------------------------------
>
>                 Key: CXF-2088
>                 URL: https://issues.apache.org/jira/browse/CXF-2088
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.1.4
>            Reporter: Christofer Dutz
>         Attachments: BeanType.java
>
>
> In my current case I hava 
> * an abstract Java class "AbstractDatabaseObject" defining a property "id".
> * an abstract Java class "Credential" which extends "AbstractDatabaseObject" and defines a property "name"
> * a concrete Java class "UsernamePasswordCredential" which extends "Credential" and defines properties "username" and "password"
> All schemas are created to my greates satisfaction (Great Job!).
> Unfortunately the serialisation order when using Aegis databinding (don't know if its the same using others) is the wrong way around.
> Instead of getting:
> <cred>
>     <id>306ce816-01b7-11de-8d92-8d4df6b73eb1</id>
>     <name>dsfgsdfgs</name>
>     <password>dsfsfdg</password>
>     <username>sdsdfgsdfg</username>
> </cred>
> I get:
> <cred>
>     <password>dsfsfdg</password>
>     <username>sdsdfgsdfg</username>
>     <name>dsfgsdfgs</name>
>     <id>306ce816-01b7-11de-8d92-8d4df6b73eb1</id>
> </cred>
> Which my Flex client complains about.
> I'll try to whip up a patch fixing this issue today.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CXF-2088) Wrong serialisation order of elements when using Aegis databinding.

Posted by "Christofer Dutz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christofer Dutz updated CXF-2088:
---------------------------------

    Attachment: BeanType.java

> Wrong serialisation order of elements when using Aegis databinding.
> -------------------------------------------------------------------
>
>                 Key: CXF-2088
>                 URL: https://issues.apache.org/jira/browse/CXF-2088
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.1.4
>            Reporter: Christofer Dutz
>         Attachments: BeanType.java
>
>
> In my current case I hava 
> * an abstract Java class "AbstractDatabaseObject" defining a property "id".
> * an abstract Java class "Credential" which extends "AbstractDatabaseObject" and defines a property "name"
> * a concrete Java class "UsernamePasswordCredential" which extends "Credential" and defines properties "username" and "password"
> All schemas are created to my greates satisfaction (Great Job!).
> Unfortunately the serialisation order when using Aegis databinding (don't know if its the same using others) is the wrong way around.
> Instead of getting:
> <cred>
>     <id>306ce816-01b7-11de-8d92-8d4df6b73eb1</id>
>     <name>dsfgsdfgs</name>
>     <password>dsfsfdg</password>
>     <username>sdsdfgsdfg</username>
> </cred>
> I get:
> <cred>
>     <password>dsfsfdg</password>
>     <username>sdsdfgsdfg</username>
>     <name>dsfgsdfgs</name>
>     <id>306ce816-01b7-11de-8d92-8d4df6b73eb1</id>
> </cred>
> Which my Flex client complains about.
> I'll try to whip up a patch fixing this issue today.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CXF-2088) Wrong serialisation order of elements when using Aegis databinding.

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp updated CXF-2088:
-----------------------------

    Fix Version/s:     (was: 2.2)
                   2.1.5

> Wrong serialisation order of elements when using Aegis databinding.
> -------------------------------------------------------------------
>
>                 Key: CXF-2088
>                 URL: https://issues.apache.org/jira/browse/CXF-2088
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.1.4
>            Reporter: Christofer Dutz
>            Assignee: Benson Margulies
>             Fix For: 2.1.5
>
>         Attachments: BeanType.java
>
>
> In my current case I hava 
> * an abstract Java class "AbstractDatabaseObject" defining a property "id".
> * an abstract Java class "Credential" which extends "AbstractDatabaseObject" and defines a property "name"
> * a concrete Java class "UsernamePasswordCredential" which extends "Credential" and defines properties "username" and "password"
> All schemas are created to my greates satisfaction (Great Job!).
> Unfortunately the serialisation order when using Aegis databinding (don't know if its the same using others) is the wrong way around.
> Instead of getting:
> <cred>
>     <id>306ce816-01b7-11de-8d92-8d4df6b73eb1</id>
>     <name>dsfgsdfgs</name>
>     <password>dsfsfdg</password>
>     <username>sdsdfgsdfg</username>
> </cred>
> I get:
> <cred>
>     <password>dsfsfdg</password>
>     <username>sdsdfgsdfg</username>
>     <name>dsfgsdfgs</name>
>     <id>306ce816-01b7-11de-8d92-8d4df6b73eb1</id>
> </cred>
> Which my Flex client complains about.
> I'll try to whip up a patch fixing this issue today.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-2088) Wrong serialisation order of elements when using Aegis databinding.

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12679574#action_12679574 ] 

Benson Margulies commented on CXF-2088:
---------------------------------------

If you are in a hurry, and will work with trunk, I'll make a snapshot. If you need 2.1.x, someone will have to do a merge down first.

> Wrong serialisation order of elements when using Aegis databinding.
> -------------------------------------------------------------------
>
>                 Key: CXF-2088
>                 URL: https://issues.apache.org/jira/browse/CXF-2088
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.1.4
>            Reporter: Christofer Dutz
>            Assignee: Benson Margulies
>             Fix For: 2.2
>
>         Attachments: BeanType.java
>
>
> In my current case I hava 
> * an abstract Java class "AbstractDatabaseObject" defining a property "id".
> * an abstract Java class "Credential" which extends "AbstractDatabaseObject" and defines a property "name"
> * a concrete Java class "UsernamePasswordCredential" which extends "Credential" and defines properties "username" and "password"
> All schemas are created to my greates satisfaction (Great Job!).
> Unfortunately the serialisation order when using Aegis databinding (don't know if its the same using others) is the wrong way around.
> Instead of getting:
> <cred>
>     <id>306ce816-01b7-11de-8d92-8d4df6b73eb1</id>
>     <name>dsfgsdfgs</name>
>     <password>dsfsfdg</password>
>     <username>sdsdfgsdfg</username>
> </cred>
> I get:
> <cred>
>     <password>dsfsfdg</password>
>     <username>sdsdfgsdfg</username>
>     <name>dsfgsdfgs</name>
>     <id>306ce816-01b7-11de-8d92-8d4df6b73eb1</id>
> </cred>
> Which my Flex client complains about.
> I'll try to whip up a patch fixing this issue today.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (CXF-2088) Wrong serialisation order of elements when using Aegis databinding.

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benson Margulies reassigned CXF-2088:
-------------------------------------

    Assignee: Benson Margulies

> Wrong serialisation order of elements when using Aegis databinding.
> -------------------------------------------------------------------
>
>                 Key: CXF-2088
>                 URL: https://issues.apache.org/jira/browse/CXF-2088
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.1.4
>            Reporter: Christofer Dutz
>            Assignee: Benson Margulies
>         Attachments: BeanType.java
>
>
> In my current case I hava 
> * an abstract Java class "AbstractDatabaseObject" defining a property "id".
> * an abstract Java class "Credential" which extends "AbstractDatabaseObject" and defines a property "name"
> * a concrete Java class "UsernamePasswordCredential" which extends "Credential" and defines properties "username" and "password"
> All schemas are created to my greates satisfaction (Great Job!).
> Unfortunately the serialisation order when using Aegis databinding (don't know if its the same using others) is the wrong way around.
> Instead of getting:
> <cred>
>     <id>306ce816-01b7-11de-8d92-8d4df6b73eb1</id>
>     <name>dsfgsdfgs</name>
>     <password>dsfsfdg</password>
>     <username>sdsdfgsdfg</username>
> </cred>
> I get:
> <cred>
>     <password>dsfsfdg</password>
>     <username>sdsdfgsdfg</username>
>     <name>dsfgsdfgs</name>
>     <id>306ce816-01b7-11de-8d92-8d4df6b73eb1</id>
> </cred>
> Which my Flex client complains about.
> I'll try to whip up a patch fixing this issue today.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-2088) Wrong serialisation order of elements when using Aegis databinding.

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12679332#action_12679332 ] 

Benson Margulies commented on CXF-2088:
---------------------------------------

Could you post your fix as a patch, please? (diff -u)

> Wrong serialisation order of elements when using Aegis databinding.
> -------------------------------------------------------------------
>
>                 Key: CXF-2088
>                 URL: https://issues.apache.org/jira/browse/CXF-2088
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.1.4
>            Reporter: Christofer Dutz
>            Assignee: Benson Margulies
>         Attachments: BeanType.java
>
>
> In my current case I hava 
> * an abstract Java class "AbstractDatabaseObject" defining a property "id".
> * an abstract Java class "Credential" which extends "AbstractDatabaseObject" and defines a property "name"
> * a concrete Java class "UsernamePasswordCredential" which extends "Credential" and defines properties "username" and "password"
> All schemas are created to my greates satisfaction (Great Job!).
> Unfortunately the serialisation order when using Aegis databinding (don't know if its the same using others) is the wrong way around.
> Instead of getting:
> <cred>
>     <id>306ce816-01b7-11de-8d92-8d4df6b73eb1</id>
>     <name>dsfgsdfgs</name>
>     <password>dsfsfdg</password>
>     <username>sdsdfgsdfg</username>
> </cred>
> I get:
> <cred>
>     <password>dsfsfdg</password>
>     <username>sdsdfgsdfg</username>
>     <name>dsfgsdfgs</name>
>     <id>306ce816-01b7-11de-8d92-8d4df6b73eb1</id>
> </cred>
> Which my Flex client complains about.
> I'll try to whip up a patch fixing this issue today.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CXF-2088) Wrong serialisation order of elements when using Aegis databinding.

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benson Margulies resolved CXF-2088.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2

Fix applied to trunk.

> Wrong serialisation order of elements when using Aegis databinding.
> -------------------------------------------------------------------
>
>                 Key: CXF-2088
>                 URL: https://issues.apache.org/jira/browse/CXF-2088
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.1.4
>            Reporter: Christofer Dutz
>            Assignee: Benson Margulies
>             Fix For: 2.2
>
>         Attachments: BeanType.java
>
>
> In my current case I hava 
> * an abstract Java class "AbstractDatabaseObject" defining a property "id".
> * an abstract Java class "Credential" which extends "AbstractDatabaseObject" and defines a property "name"
> * a concrete Java class "UsernamePasswordCredential" which extends "Credential" and defines properties "username" and "password"
> All schemas are created to my greates satisfaction (Great Job!).
> Unfortunately the serialisation order when using Aegis databinding (don't know if its the same using others) is the wrong way around.
> Instead of getting:
> <cred>
>     <id>306ce816-01b7-11de-8d92-8d4df6b73eb1</id>
>     <name>dsfgsdfgs</name>
>     <password>dsfsfdg</password>
>     <username>sdsdfgsdfg</username>
> </cred>
> I get:
> <cred>
>     <password>dsfsfdg</password>
>     <username>sdsdfgsdfg</username>
>     <name>dsfgsdfgs</name>
>     <id>306ce816-01b7-11de-8d92-8d4df6b73eb1</id>
> </cred>
> Which my Flex client complains about.
> I'll try to whip up a patch fixing this issue today.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-2088) Wrong serialisation order of elements when using Aegis databinding.

Posted by "Christofer Dutz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-2088?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12679562#action_12679562 ] 

Christofer Dutz commented on CXF-2088:
--------------------------------------

I haven't had a real deep look into how data is processed. The main problem was that the order was simply not schema valid.

I guss to make it really fool-proof it would be necessary to do a two-phase processing ... 
1. Process attributes of current- and parent-types
2. Process the elements of the parents and then of the current type

Tanks for patching :-)
When will with be available as compiled maven-artifact?
I am curently using a local artifact of version 2.1.4 with the applied patch, as I sort of had problems building a 2.1.4.1 version ...

> Wrong serialisation order of elements when using Aegis databinding.
> -------------------------------------------------------------------
>
>                 Key: CXF-2088
>                 URL: https://issues.apache.org/jira/browse/CXF-2088
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.1.4
>            Reporter: Christofer Dutz
>            Assignee: Benson Margulies
>             Fix For: 2.2
>
>         Attachments: BeanType.java
>
>
> In my current case I hava 
> * an abstract Java class "AbstractDatabaseObject" defining a property "id".
> * an abstract Java class "Credential" which extends "AbstractDatabaseObject" and defines a property "name"
> * a concrete Java class "UsernamePasswordCredential" which extends "Credential" and defines properties "username" and "password"
> All schemas are created to my greates satisfaction (Great Job!).
> Unfortunately the serialisation order when using Aegis databinding (don't know if its the same using others) is the wrong way around.
> Instead of getting:
> <cred>
>     <id>306ce816-01b7-11de-8d92-8d4df6b73eb1</id>
>     <name>dsfgsdfgs</name>
>     <password>dsfsfdg</password>
>     <username>sdsdfgsdfg</username>
> </cred>
> I get:
> <cred>
>     <password>dsfsfdg</password>
>     <username>sdsdfgsdfg</username>
>     <name>dsfgsdfgs</name>
>     <id>306ce816-01b7-11de-8d92-8d4df6b73eb1</id>
> </cred>
> Which my Flex client complains about.
> I'll try to whip up a patch fixing this issue today.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.