xmlbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Massimiliano Romano" <massimoroman...@gmail.com>
Subject Document to element
Date Sun, 01 Feb 2009 18:56:29 GMT

Hello everybody, I'm using xmlbeans to develop wsdl web services.
I have some classes with attributes of type Element, so i need to initialize 
them.

In my xsd file I define this simple type:

<xsd:simpleType name="MySimpleType">
    <xsd:restriction base="xsd:integer">
        <xsd:minInclusive value="1"/>
        <xsd:maxInclusive value="999"/>
    </xsd:restriction>
</xsd:simpleType>

<xsd:element name="MySimpleType"        type="iel:MySimpleType"/>

Then I generate the jar from the xsd

Then, in my java code I write:
    MySimpleTypeDocument sdoc = MySimpleTypeDocument.Factory.newInstance();
    sdoc.setMySimpleType(new BigInteger("1"));
    Element _MySimpleType = 
sdoc.getDomNode().getOwnerDocument().getDocumentElement();

at last line I get a nullPointerException, getOwnerDocument() return NULL.

Could you help me?? Where I was wrong? Thanks

Max



__________ Information from ESET NOD32 Antivirus, version of virus signature database 3798
(20090125) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


__________ Information from ESET NOD32 Antivirus, version of virus signature database 3798
(20090125) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

Mime
View raw message