PILLAI,RANJITH wrote:
> Now I am having problems when I have an xmlns usage in
> document like this <?xml version="1.0" encoding="UTF-8"?>
> <UsernameToken xmlns:wsse="http://www.w3.org/2001/XMLSchema">
> <wsse:Username
> type="user">Ranjith</wsse:Username>
> </UsernameToken>
>
> and Castor throws this exceptions ..
>
> org.xml.sax.SAXException: unable to find
> FieldDescriptor for 'Username' in Class Descriptor of
> UsernameToken
> at
> org.exolab.castor.xml.UnmarshalHandler.startElement(Unma
> rshalHandler.
> java:1249)
>
> -------------
> -------------
>
> Is it possible to unmarshall without Descriptors when
> there are namespace usages in document?
Yes, I think so.
I haven't done much with mapping files, but I found this example in a
regression tests.
Look at the ns-uri attribute of the <map-to> element.
Can somone else back me up on this?
<?xml version="1.0"?>
<mapping xmlns:xyz="http://www.acme.org/xyz">
<class name="Root">
<map-to xml="root" ns-prefix="xyz"
ns-uri="http://www.acme.org/xyz"/>
<field name="name" type="string">
<bind-xml name="xyz:name" node="attribute"/>
</field>
<field name="child" type="Child">
<bind-xml name="xyz:child" node="element"/>
</field>
</class>
<class name="Child">
<field name="content" type="string">
<bind-xml node="text"/>
</field>
</class>
</mapping>
--Erik
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev