Hello,

I have the following schema that defines a complex type:
<xsd:complexType name="customer">
     ...
        <xsd:element name="email" type="cm:emailType" nillable="true"/>
     ...
</xsd:complexType>
Where the emailType defined as following:
<xsd:simpleType name="emailType">
                <xsd:restriction base="xsd:string">
                        <xsd:pattern
value="([a-zA-Z0-9])[EMAIL PROTECTED]([a-zA-Z0-9.])+"/>
                </xsd:restriction>
        </xsd:simpleType>

As You see the email element have a 'nillable' attribute with true value.
Because of the nillable attribute value the client generate 
the following XML:
<customer>
   ...
   <email/>
  ...
</customer>

The current Castor unmarshaller behavior is that the Customer.email data
member 
initialized to an empty string and can't pass 
validation because of the pattern restriction.

The question is :is there any way to determine on the complex types and 
primitive types wrappers if the 'null' has actually been set by the user or
simply initialized by the JVM because it simply doesn't appear in the XML?

Thanks a lot for cooperation,
Alex.



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

Reply via email to