hi,
i am new to castor. i am using rad tool. however validation code is not
generated properly.
i have made the following entry in the castor.property file;
org.exolab.castor.indent=true
org.exolab.castor.parser.namespaces=true
org.exolab.castor.sax.features=http://xml.org/sax/features/validation,\
http://apache.org/xml/features/validation/schema,\
http://apache.org/xml/features/validation/schema-full-checking
should i change it since we r using websphere server?
my xml schema document is as follows:
i am new to castor. i am using rad tool. however validation code is not
generated properly.
i have made the following entry in the castor.property file;
org.exolab.castor.indent=true
org.exolab.castor.parser.namespaces=true
org.exolab.castor.sax.features=http://xml.org/sax/features/validation,\
http://apache.org/xml/features/validation/schema,\
http://apache.org/xml/features/validation/schema-full-checking
should i change it since we r using websphere server?
my xml schema document is as follows:
<?xml version="1.0"?>
<xs:schema xmlns:xs= http://www.w3.org/2001/XMLSchema
targetNamespace=http://www.w3schools.com
xmlns=http://www.w3schools.com
elementFormDefault="qualified"><xs:element name="note">
<xs:complexType>
<xs:sequence>
<xs:element name="to" >
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="8"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="from" type="xs:string"/>
<xs:element name="heading" type="xs:string"/>
<xs:element name="body" type="xs:int"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
however i am getting the validate function as follows, but no there is no
chech for the length condition in it.
public boolean isValid()
{
try {
validate();
}
catch (org.exolab.castor.xml.ValidationException vex) {
return false;
}
return true;
} /
public void validate()
throws org.exolab.castor.xml.ValidationException
{
org.exolab.castor.xml.Validator validator = new
org.exolab.castor.xml.Validator();
validator.validate(this);
} /
also when i run the code, there is no validation done. can anyone help me in
this?
chech for the length condition in it.
public boolean isValid()
{
try {
validate();
}
catch (org.exolab.castor.xml.ValidationException vex) {
return false;
}
return true;
} /
public void validate()
throws org.exolab.castor.xml.ValidationException
{
org.exolab.castor.xml.Validator validator = new
org.exolab.castor.xml.Validator();
validator.validate(this);
} /
also when i run the code, there is no validation done. can anyone help me in
this?

