I don't see a type definition ( nor a reference to a type ) for Descriptor in your Schema. I get similar errors and its usually because of a change in my schema. I would add a definition for Descriptor
-----Original Message----- From: Chris Newland [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 14, 2002 5:40 PM To: [EMAIL PROTECTED] Subject: [castor-dev] SourceGenerator produces incorrect parameter types? Hi, Perhaps I've misunderstood the behaviour of the SourceGenerator, but it seems to be ignoring the element type and using the element name as the method parameter type: <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.foo.com"> <!-- ============================================== --> <!-- ============================================== --> <element name="Profile"> <complexType> <sequence> <element name="Descriptor" type="Descriptor" maxOccurs="unbounded"/> <element name="FooDescriptor" type="Descriptor" maxOccurs="unbounded"/> </sequence> </complexType> </element> <!-- ============================================== --> <!-- ============================================== --> <element name="EntityDescriptor"> <complexType> <sequence> <element name="entityID" type="string"/> <element name="profileLocation" type="string"/> </sequence> </complexType> </element> </schema> This produces the following methods in the Profile.java code: public void addDescriptor(foo.Descriptor vDescriptor) throws java.lang.IndexOutOfBoundsException { _DescriptorList.add(vDescriptor); } public void addFooDescriptor(foo.FooDescriptor vFooDescriptor) throws java.lang.IndexOutOfBoundsException { _FooDescriptorList.add(vFooDescriptor); } When I was expecting: public void addDescriptor(foo.Descriptor vDescriptor) throws java.lang.IndexOutOfBoundsException { _DescriptorList.add(vDescriptor); } public void addFooDescriptor(foo.Descriptor vDescriptor) throws java.lang.IndexOutOfBoundsException { _FooDescriptorList.add(vDescriptor); } Although I could have a mistake in my schema as the SourceGenerator gives the following errors: Type not found for element: Descriptor Type not found for element: FooDescriptor Can anybody explain why the types are not found when they are all top level elements in the same schema? Thanks for your help, Chris mailto:[EMAIL PROTECTED] emorphia Ltd, Mill House, Station Approach, Harlow Mill, Harlow, Essex, CM20 2EL, UK. Tel: +44 (0) 1279 450100 Fax: +44 (0) 1279 450102 http://www.emorphia.com Registered in England � 4133002 This message may contain information proprietary to emorphia so any unauthorised disclosure, copying or distribution of its contents is strictly prohibited. ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
