Yup, I'd agree with this. In your case, something like renderPDFFromReference and renderPDFFromValue? The upshot is that method overloading in web services is officially a bad thing and you'll save yourself a whole world of hurt if you don't do it :)

Cheers,

Tom

Srinath Perera wrote:
Hi Srinivas;

Personally I belive do not rely on the method overloading is better.

Axis does support method overloding but WSDL1.2 does remove it and
support for the method overloading might disapper form axis in the
future.


(IMO)Web service is exposing a interface but not exposing All OOP
concepts.

Unless you have good reason not to think axis do not support method
overloading and change  method signature.

e.g. for foo(a) and foo(a,b) use foo1(a) foo2(a,b)

the small flexibility given by the overloding can not compensate for
complexity at server and trouble you might go though supporting it.

Srinath



On Fri, 2003-11-07 at 05:44, I-Sampige, Srinivas wrote:


Then what would be your suggestion for getting around that? For example if I would like to render a pdf file from either a .fo file that Is passed in or from a URL to a .fo file passed in; I was thinking of having these methods -

//~~for these, debug Is false by default
public void renderPdf(String urlToFo); //accepts URL to a .fo file
public void renderPdf(DataHander dh); //accepts the datahandler containing the .fo file


                        //~~for these debug can be turned on(or off) by passing value 
explicitly
                        public void renderPdf(String urlToFo, boolean debugFlag);
                        public void renderPdf(DataHandler dh, boolean debugFlag);

Ideally in an object oriented sense if I were writing an API the above would work. That my intention when writing a web service also. Please quide me.

Thanks
Srinivas



-----Original Message-----
From: Tom Oinn [mailto:[EMAIL PROTECTED] Sent: Thursday, November 06, 2003 3:29 PM
To: [EMAIL PROTECTED]
Subject: Re: Method overloading



No, this is not allowed as of WSDL1.2 and rightly so, it causes immense confusion with dynamic systems such as workflow engines (our project). Under WSDL1.1 I believe it was allowed but fortunately someone saw sense and removed it.


Cheers,

Tom Oinn

http://taverna.sf.net

I-Sampige, Srinivas wrote:


Does SOAP support overloading? If I want to expose two methods-

      1.        sayHello(String firstName)
      2.        sayHello(String firstName, String lastName)     


Then how do I do it in AXIS. Can somebody point me to some samples and materials where I can learn more about this aspect of web services? I haven't been able to find much information about this on the web.


Thanks
Srinivas










Reply via email to