Hi, the following is a somewhat simplified excerpt from an xsd-file from OTA (the "Open Travel Alliance", an international standards organization in the travel industry):
<?xml version="1.0" encoding="UTF-8"?> <xs:schema targetNamespace="http://www.interes.com/test" xmlns="http://www.interes.com/test" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:element name="SpecialServiceRequests"> <xs:complexType> <xs:sequence> <xs:element name="SpecialServiceRequest" maxOccurs="unbounded"> <xs:complexType> <xs:complexContent> <xs:extension base="SpecialServiceRequestType"> <xs:attribute name="TravelerRefNumberRPHList" type="ListOfRPH" use="optional"/> <xs:attribute name="FlightRefNumberRPHList" type="ListOfRPH" use="optional"/> </xs:extension> </xs:complexContent> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:complexType name="SpecialServiceRequestType"> <xs:sequence> <xs:element name="Airline" type="xs:string" minOccurs="0"/> <xs:element name="Text" type="xs:string" minOccurs="0"/> </xs:sequence> </xs:complexType> <xs:simpleType name="ListOfRPH"> <xs:list itemType="RPH_Type"/> </xs:simpleType> <xs:simpleType name="RPH_Type"> <xs:restriction base="xs:string"> <xs:pattern value="[0-9]{1,8}"/> </xs:restriction> </xs:simpleType> </xs:schema> Obviously the Castor source generator has problems with this code because I'm not able to compile the resulting classes. The classes created by the Source generator are: SpecialServiceRequest.java, SpecialServiceRequestDescriptor.java, SpecialServiceRequests.java, SpecialServiceRequestsDescriptor.java, SpecialServiceRequestType.java and SpecialServiceRequestTypeDescriptor.java The class "SpecialServiceRequest" tries to use "ListOfRPH" as a method parameter or a return value, see the following code: package test; public class SpecialServiceRequest extends test.SpecialServiceRequestType implements java.io.Serializable { private java.util.Vector _travelerRefNumberRPHListList; private java.util.Vector _flightRefNumberRPHListList; ... public void addFlightRefNumberRPHList(ListOfRPH vFlightRefNumberRPHList) throws java.lang.IndexOutOfBoundsException { _flightRefNumberRPHListList.addElement(vFlightRefNumberRPHList); } public ListOfRPH getFlightRefNumberRPHList(int index) throws java.lang.IndexOutOfBoundsException { if ((index < 0) || (index > _flightRefNumberRPHListList.size())) { throw new IndexOutOfBoundsException("getFlightRefNumberRPHList: Index value '"+index+"' not in range [0.."+_flightRefNumberRPHListList.size()+ "]"); } return (ListOfRPH) _flightRefNumberRPHListList.elementAt(index); } ... } However, "ListOfRPH" is not created by the source generator. I tried this with the Castor versions 0.9.7 and 0.9.9M2, but the resulting code is the same. Any ideas how I could fix this problem - or is it simply a Castor bug ? Thanks in advance Michael Michael Hoffmann - InteRes GmbH Rheinstrasse 44-46 64283 Darmstadt www.interes.com [EMAIL PROTECTED] ------------------------------------------------- If you wish to unsubscribe from this list, please send an empty message to the following address: [EMAIL PROTECTED] -------------------------------------------------

