Title: Message
Didn't get any response on user list so sending it to dev. Any suggestions?
 
-----Original Message-----
From: Soti, Dheeraj [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 06, 2005 1:37 PM
To: '[email protected]'
Subject: Which is a better approach to avoid polymorphism and inheritance

Hi,

I have class structure like as shown below. I am using doc/literal wrapped style and I don't want to expose concepts like polymorphism, inheritance and overloading in my service methods. There are two ways to handle this:

  • Define two different complex elements for each type of content. The advantage is its very clear and simple. The disadvantage is that there are many calls like findById, findByHouseId, findByName etc. So I'll end up writing duplicate set of calls for each type of content
  • Define a single complex element with union of the fields from both and introduce a field to store type. The advantage is that I only need single set of calls. The disadvantage is the additional type. There is a saying that "Adding type means killing your object".

I understand that this is not really axis related question but I will highly appreciate if some would like to share his experience with me.

Thanks

Dheeraj Soti


                          Content
                             |
           -----------------------------------------
           |                                       |
         CommercialContent              ProgramContent

Reply via email to