Hello, I'm currently implementing xfire with castor in my project. my xml schema look like this
<?xml version="1.0" encoding="UTF-8"?> <xs:schema targetNamespace="http://xfire.codehaus.org/CastorService" xmlns:tns="http://xfire.codehaus.org/CastorService" xmlns:xs=" http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:element name="MReunionProtocol"> <xs:annotation> <xs:documentation>Comment describing your root element</xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element name="ToR" type="xs:int"/> <xs:element name="Messages" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> <xs:element name="Data" minOccurs="0"> <xs:complexType> <xs:choice> <xs:element name="Contact" maxOccurs="unbounded"> <xs:complexType> <xs:all> <xs:element name="contactId" type="xs:int"/> <xs:element name="User"> <xs:complexType> <xs:all> <xs:element name="userId" type="xs:int"/> <xs:element name="userProfile" type="xs:string"/> </xs:all> </xs:complexType> </xs:element> <xs:element name="firstName" type="xs:string"/> <xs:element name="lastName" type="xs:string"/> </xs:all> </xs:complexType> </xs:element> <xs:element name="SynchRequest"> <xs:complexType> <xs:sequence> <xs:element name="Contact" maxOccurs="unbounded"> <xs:complexType> <xs:all> <xs:element name="contactId" type="xs:int"/> <xs:element name="User"> <xs:complexType> <xs:all> <xs:element name="userId" type="xs:int"/> <xs:element name="userProfile" type="xs:string"/> </xs:all> </xs:complexType> </xs:element> <xs:element name="firstName" type="xs:string"/> <xs:element name="lastName" type="xs:string"/> </xs:all> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> </xs:element> <xs:element name="Version" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> and i use Castor to generate the java class. My first problem is, the Contact element from my schema is a hibernate generated POJO class. How can i make generated class to use this class, instead generating a new contact class? My second problem is Castor generated an isValid() method for each java class. Somehow xfire need both getter/setter for each property of a class. I've managed to hack this by creating a setValid(boolean valid) for each class. I was wondering whether there any other way i can avoid this without have to manually add setValid method for each class. Thanks in Advance - abangkis -

