Hi all. I have a problem using xmlbeans 2.3.0. I tested for 2.2.0 and 2.1.0
and the problem still occurs that because I suppose the problem it´s in my
xsd code or java generated pojos with "scomp".

I get a ClassCastException when I call Factory.parse().
My schema is:
--------------------------
<?xml version="1.0" encoding="iso-8859-1"?>
<xs:schema xmlns:platino="http://platino.com/servicios/registro";
               xmlns:xs="http://www.w3.org/2001/XMLSchema";
                   xmlns:tns="http://platino.com/servicios/registro";
               targetNamespace="http://platino.com/servicios/registro";
               elementFormDefault="qualified"
               attributeFormDefault="unqualified">
<xs:attribute name="codigo" type="xs:integer">
        <xs:annotation>
          <xs:documentation>
            Código.
          </xs:documentation>
        </xs:annotation>
 </xs:attribute>

<xs:element name="Asunto" type="platino:Asunto"/>
<xs:complexType name="Asunto" mixed="true">
        <xs:annotation>
          <xs:documentation>
            Asunto
          </xs:documentation>
        </xs:annotation>
        <xs:sequence/>
        <xs:attribute ref="platino:codigo" use="optional"/>
</xs:complexType>
--------------------------

The that I execute is:
--------------------------
DOMResult dst = new DOMResult();
Source s = new StreamSource(new File("p:\\example.xml"));
TransformerFactory.newInstance().newTransformer().transform(s, dst);
AsuntoDocument dd = AsuntoDocument.Factory.parse(dst.getNode());
Asunto d = dd.getAsunto();
--------------------------

And the file that I parse is "example.xml":
--------------------------
<reg:Asunto codigo="12" xmlns:reg="http://platino.com/servicios/registro";>
</reg:Asunto>
--------------------------

I use to compile the schema --> scomp -out reg-xmlbeans.jar reg.xsd
reg.xsdconfig -debug -verbose

Any ideas, thanks in advance.
-- 
View this message in context: 
http://www.nabble.com/ClassCastException%3A-org.apache.xmlbeans.impl.values.XmlComplexContentImpl-tp14502217p14502217.html
Sent from the Xml Beans - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to