[EMAIL PROTECTED] wrote:
>
> Keith,
>
> I have used your instructions to do this before (thanks).
> Is it true that the method you suggest here
> doesn't get you marshalling for
> the user defined class?
>
If the class can't be easily introspected, then you'll need to use
a mapping file.
> I thought I've read one of your other comments
> that says it is difficult to mix the SourceGenerator
> and the mapping mechanisim.
It's difficult to mix it when you are trying to use a mapping file for
certain generated classes, such as type-safe enumerations.
But for this case, it should work properly.
Thanks,
--Keith
>
> -----Original Message-----
> From: Keith Visco [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 06, 2002 1:44 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [castor-dev] SourceGenerator using existing Class as type
>
> I've given a number of examples on the past on how to do this.
>
> A simple search on "using source generator with existing class" seems to
> do the
> the trick:
>
> http://www.mail-archive.com/[email protected]/msg05371.html
>
> --Keith
>
> Andi Kuhn wrote:
> >
> > Hi,
> >
> > i have a problem using the SourceGenerator with alreasy existing
> types.
> > I want to create a class e.g. Person that uses some other existing
> class as
> > attribute and not just a primitive string or integer.
> >
> > public class Person
> > {
> > private com.mycompany.MyExistingClass myAttribute;
> >
> > public void setMyAttribute( com.mycompany.MyExistingClass att )
> > {
> > myAttribute = att;
> > }
> > public com.mycompany.MyExistingClass getMyAttribute()
> > {
> > return myAttribute;
> > }
> > }
> >
> > If i'd use primitve string instead of MyExisingClass schema would be
> > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >
> > <xs:element name="Person">
> > <xs:complexType>
> > <xs:sequence>
> > <xs:element name="myAttribute" type="xs:string"/>
> > </xs:sequence>
> > </xs:complexType>
> > </xs:element>
> > </xs:schema>
> >
> > I tried something like
> > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >
> > <xs:element name="Person">
> > <xs:complexType>
> > <xs:sequence>
> > <xs:element name="myAttribute">
> > <xs:complexType/>
> > </xs:element>
> > </xs:sequence>
> > </xs:complexType>
> > </xs:element>
> > </xs:schema>
> >
> > Which already is near what i want, but creates a class MyAttribute,
> that i
> > don't want.
> > What do i have to do to tell the generator that the type should be my
> > existing class and also not creating this class ?
> >
> > Thanks for help,
> > Andi
> > --
> > Andreas Kuhn Syngenio AG
> > Tel: +49 711 4903-490 Badstr. 9
> > Fax: +49 711 4903-500 70372 Stuttgart
> > mailto:[EMAIL PROTECTED] http://www.syngenio.de
> >
> > The answer to 'can emacs...?' is always 'yes'
> >
> > -----------------------------------------------------------
> > 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
>
> -----------------------------------------------------------
> 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