Hi !

     In my mapping file if i provide the following tag

    <map-to xml="GOODS__REQUEST"/>

   for the class name and if the XML that i need to unmarshall

    using castor looks like below

<GOODS__REQUEST > <x></x><y></y> </GOODS__REQUEST>

  it works. However if i give

<JUNK> <x></x><y></y> </JUNK>

then also it works.

Is there any way i can disallow the input to have any other name except the

name provided in the map-to element ?

 

 

 

 

 

<?xml version="1.0"?>

<mapping>

<description>A mapping file for our Address Book application</description>

<class name="Addressbook.Person">

<field name="name" type="string">

<bind-xml name="name" node="attribute" />

</field>

<field name="address" type="string" >

<bind-xml name="address" node="element" />

</field>

<field name="ssn" type="string" required="false" />

<field name="email" type="string" />

<field name="homePhone" type="string" />

<field name="workPhone" type="string" />

</class>

<class name="Addressbook.Addressbook">

<field name="header" handler="Addressbook.MyFieldHandler" type="java.lang.String">

<bind-xml name="header" node="element"/>

</field>

<field name="name" type="string">

<bind-xml name="name" node="attribute" />

</field>

<field name="persons" type="Addressbook.Person" collection="collection" />

</class>

</mapping>



Keith Visco <[EMAIL PROTECTED]> wrote:

The .castor.cdr files are Castor's ClassDescriptorResolverImpl
class=descriptor mappings which were introduced in 0.9.7 to fix a bug
with the binding framework and provides the ability to move descriptors
to a different package.

If you use a binding file to change class names, I wouldn't delete them,
otherwise you can probably delete them without causing harm. However, by
deleting them you will probably slow Castor down slightly, especially if
you are not caching descriptors at all, as Castor will have to search
for the descriptor classes.

--Keith

Tysnes Are Thobias wrote:
> Hello!
>
> Just migrated castor from 0.9.6 to 0.9.7 and everythings looks fine..
> But I notice some .castor.cdr files in my catalog structure..
>
> Is this something which can be deleted !? What's it purpose !?
>
> Cheers,
> Are T. Tysnes


-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------


Discover Yahoo!
Have fun online with music videos, cool games, IM & more. Check it out!

Reply via email to