Hi all,
I'm using castor 0.9.5.3rc1 to unmarshall and validate
against a xsd schema xml files without namespace. To
do this I set the following properties:

org.exolab.castor.parser.validation=true
org.exolab.castor.parser.namespaces=true
org.exolab.castor.marshalling.validation=true
org.exolab.castor.sax.features=http://apache.org/xml/features/validation/schema

but it doesn't work for xml files (and xsd files) with
a namespace!

I get the following error:

org.xml.sax.SAXException: unable to find
FieldDescriptor for 'username' in ClassDescriptor of
import-parameters

(xml file)

<?xml version="1.0" encoding="UTF-8"?>
<import-parameters xmlns="http://rmv3";
xsi:schemaLocation="http://rmv3 WSParameters.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
   <username>a</username>
   <password>a</password>
   <cod-shop>devel</cod-shop>
   <object-type>catalogue</object-type>
</import-parameters>

(xsd file)

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
targetNamespace="http://rmv3"; xmlns="http://rmv3";
elementFormDefault="qualified">    
<xs:element name="import-parameters">
  <xs:complexType>
    <xs:sequence>
            <xs:element name="username" type="xs:string"/>
            <xs:element name="password" type="xs:string"/>
            <xs:element name="cod-shop" type="xs:string"/>
            <xs:element name="object-type" type="xs:string"/>
    </xs:sequence>
  </xs:complexType>
</xs:element> 
</xs:schema>

Thanks for your precious help!!
Dario


______________________________________________________________________
Yahoo! Mail: 6MB di spazio gratuito, 30MB per i tuoi allegati, l'antivirus, il filtro 
Anti-spam
http://it.yahoo.com/mail_it/foot/?http://it.mail.yahoo.com/

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

Reply via email to