Hi,

 

There appears to be a problem in XMLBeans with handling of default values for attributes.  I have an attribute in my schema that has a type of enumeration and also has a default value

 

             <xs:attribute name="method" type="com:HTTPMethod" default="POST"/>

 

       <xs:simpleType name="HTTPMethod">

             <xs:restriction base="xs:string">

                    <xs:enumeration value="GET"/>

                    <xs:enumeration value="POST"/>

             </xs:restriction>

       </xs:simpleType>

 

When I create my document using XMLBeans and serialize it via save(OutputStream), I end up with the method attribute having an empty value.  However, if I make a call to getMethod(), I’m getting the expected default value.  What am I doing wrong?

 

Thank you,

 

Artem

Reply via email to