Nicolas,
I think you are using the tag "xml" instead of "bind-xml"
<xml name="REF_NA" reference="true" node="attribute" />
<xml node="attribute" />
--Jerome
-----Message d'origine-----
De : Nicolas Christian [mailto:[EMAIL PROTECTED]
Envoy� : mardi 23 mars 2004 11:10
� : '[EMAIL PROTECTED]'
Objet : [castor-dev] Marshalling problem using reference IDREFs
> Hi,
I am sorry, the first mail i have sent to the mailing-list was no
complete,
i sent it by mistake.
> Context:
> I try to marshall an "AddressBook" object containing a list of "Port"
> objects,
> each Port has an association with an "AtmNetworkAdaptor" object.
> An "AtmNetworkAdaptor" object could be shared by several "Port" objects.
> In order do not duplicate the same "AtmNetworkAdaptor" several times
> in the xml data, hence I have used a reference IDREF on it.
>
> UML
[Nicolas Christian] <<...OLE_Obj...>>
> Mapping file:
<mapping>
<class name="xms.xserver.fe.bus.call.addrBook.AddressBook"
auto-complete="true" >
<map-to xml="AddressBook"/>
</class>
<class name="xms.xserver.fe.bus.call.addrBook.Port" auto-complete="true" >
<map-to xml="Port"/>
<field name="scopable" type="boolean" transient="true"/>
<field name="networkAdapter"
type="xms.xserver.fe.bus.call.addrBook.AtmNetworkAdapter" >
<xml name="REF_NA" reference="true" node="attribute" />
</field>
</class>
<class name="xms.xserver.fe.bus.call.addrBook.AtmNetworkAdapter"
auto-complete="true" identity="SOID" >
<map-to xml="AtmNetworkAdapter"/>
<field name="SOID" type="long" >
<xml node="attribute" />
</field>
<field name="scopable" type="boolean" transient="true"/>
</class>
</mapping>
>
> XML data Resulting of the marshalling:
[<?xml version="1.0" encoding="UTF-8"?>
<AddressBook>
<name>The Address Book</name>
<SOID>293</SOID>
<entries>
<SOID>294</SOID>
<name>CM_AddressBook_ports</name>
<elements REF_NA="350" xsi:type="Port"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<name>port1</name>
<SOID>351</SOID>
<number>1</number>
<type>1</type>
</elements>
<elements REF_NA="350" xsi:type="Port"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<name>port11</name>
<SOID>352</SOID>
<number>11</number>
<type>3</type>
</elements>
</entries>
</AddressBook>
> My problem:
> In the XML data resulting of the marshalling, the xml description of the
> referenced "AtmNetworkAdaptor" objects is missing, I do not understand
> why.
>
I expected something like that:
<AddressBook>
<name>The Address Book</name>
<SOID>293</SOID>
<entries>
<SOID>294</SOID>
<name>CM_AddressBook_ports</name>
<elements REF_NA="350" xsi:type="Port"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<name>port1</name>
<SOID>351</SOID>
<number>1</number>
<type>1</type>
</elements>
<elements REF_NA="350" xsi:type="Port"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<name>port11</name>
<SOID>352</SOID>
<number>11</number>
<type>3</type>
</elements>
</entries>
<AtmNetworkAdapter SOID="350"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<site>site_2</site>
<name>name_2</name>
</AtmNetworkAdapter>
</AddressBook>
Have you any suggestion about my problem ?
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev