Anne,
        Why should you avoid abstract types? Is it because of
interoperability with other Web Service implementations? I have implemented
a service that uses GML (Geographic Markup Language) to pass Spatial objects
around. The GML specification uses abstract types heavily and I can't avoid
that (without implementing my own). I have tested my service from an Axis
client and it works fine as is, so I was wondering why abstract types should
be avoided.



-- 
Steven Smith <[EMAIL PROTECTED]>
Software Developer / Analyst

        
Telephone        :       03 6223 1999    
Facsimile        :       03 6223 1988    
Web      :       www.geometry.com.au     
Address  :       31 Salamanca Square, Battery Point, TAS 7004, Australia

Postal   :       PO Box 844, Sandy Bay, TAS 7006, Australia      
                

-----Original Message-----
From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 21 June 2005 6:28 AM
To: [email protected]
Subject: Re: Does Axis support polymorphism?

Avoid polymorphism and abstract types. Flatten your objects.

Anne

On 6/20/05, Amihai Fuks <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> I am new to Axis (and SOAP in general...). Does Axis support 
> polymorphism in the service's methods? I'll give an example: is it a 
> good practice to expose a method like:
> 
> public void addShape(Shape shape);
> 
> Where Shape is an abstract type and there are several implementations 
> for the type like: Square and Rectangle (as you may guess).
> 
> Or maybe try avoid it through flattening my objects resulting in 
> duplication of logic applied to all Shapes and having as much Shapes I 
> have addShape methods.
> 
> Notice that I have no idea who my clients are and how they handle the 
> SOAP on their side.
> 
> Thanks, Amihai
>


Reply via email to