Hello,

FYI I've fixed my marshalling problem by specifying mappings explicitly and setting to auto-complete="false".

Damon van Opdorp wrote:


Hello,

I'm seeing some weird behaviour when marshalling. Here is a snippet of my marshalled xml:

<default-email-address disabled="false" id="0" empty-object="true" empty-object="true">
<valid>true</valid>
<use-order-creation>false</use-order-creation>
<no-marketing-content>false</no-marketing-content>
<_default>false</_default>
<use-owner-display-name>true</use-owner-display-name>
<use-shipping-creation>false</use-shipping-creation>
<use-order-consignment>false</use-order-consignment>
<entity-complexity empty-object="true"/>
</default-email-address>


Notice that the defaul-email-address node has two empty-object attributes. This means that the snippet is not well-formed xml as duplicate attributes are not allowed. All the nodes that contain children that have an empty-object attribute have two or three empty-object attributes.

I'm using a mapping file, all my class mapping entries look like this, where I'm leaving the mapping of the emptyObject field in the java class up to Castor.

<!-- Mapping for a DefaultEmailAddress object -->
<class name="com.ibizaar.marketplace.entity.email.DefaultEmailAddress" auto-complete="true">
<map-to xml="default-email-address" />
...
<!-- boolean isEmptyObject -->
...
</class>


In the java class itself, the accessor and declaration occur in a base class as follows:

public boolean isEmptyObject() {
..
}

however there is no emptyObject field, ie the beans are not strict javabeans.

Any suggestions or commentary welcome

Cheers,

Damon



----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user



----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user

Reply via email to