Thanks Cezar.

I think this could be perfect for me.

I have a problem, though.

I get a [xmlbean] error: Colliding methods when I try to use this to
accomplish what I want.

I have a heirarchy of XmlObjects A extends B extends C.

I want all three objects to have a method do(), but I want to do it
polymorphically. In other words, C.do() really invokes A.do()'s
handler if the real object behind the C reference is an A object.

If I define a different handler for each of A, B and C that all
implement the same interface, then I get the colloding error.


Any idea how I can accomplish a polymorphic extension?

I really do appreciate how you've taken time out to help.

Best,

Ed



On 1/20/06, Cezar Andrei <[EMAIL PROTECTED]> wrote:
> You should be using the Interface Extension Feature:
> http://wiki.apache.org/xmlbeans/ExtensionInterfacesFeature
> This way the custom code lives in a separate file that will not be lost
> when you regenerate the sources when you change the schema.
>
> Cezar
>
> > -----Original Message-----
> > From: Edward Frederick [mailto:[EMAIL PROTECTED]
> > Sent: Friday, January 20, 2006 10:32 AM
> > To: [email protected]
> > Subject: Extending generated XMLBeans classes without 'Extensions'
> >
> > Hello,
> >
> > First, let me say that XMLBeans is pretty fantastic. It just works.
> >
> > I have a problem, though.
> >
> > I need to add methods to my objects--and they must be added directly
> > to the types, as I'm using polymorphism extensively.
> >
> > However, this is a problem in terms of rapid development. There's no
> > way to quickly change the schema and regenerate source without
> > overwriting my 'additions'.
> >
> > How are you folks doing this?
> >
> > Thanks so much,
> >
> > Ed
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to