You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2003/07/29 15:02:21 UTC

DO NOT REPLY [Bug 21961] New: - axis can't deal with overloading methods in wsdd

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21961>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21961

axis can't deal with overloading methods in wsdd

           Summary: axis can't deal with overloading methods in wsdd
           Product: Axis
           Version: future (enh)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Deployment / Registries
        AssignedTo: axis-dev@ws.apache.org
        ReportedBy: hemapani@cse.mrt.ac.lk
                CC: hemapani@cse.mrt.ac.lk


the bug/feature is discribed by following mail in the mailing list

I have a patch the mail sent to axis-dev is pasted in the bottm it describes the
patch
#######################################################################
> --- susantha <su...@opensource.lk> wrote:
> > Hi all,
> > 
> > I have a class with a set of overloaded methods and I want to export few of
> > those methods as a web service
> > 
> > Ex:-
> > 
> > class MyClass
> > {
> > 	public int Add(int a, int b);         <---- method1
> > 	public Point Add(Point a, Point b);   <---- method2
> > 	public Square Add(Square a, Square b);<---- method3
> > }
> > 
> > say I want to export only method2 as a web service.
> > 
> > So in my wsdd file if I set AllowedMethods = "Add" all 3 methods will be
allowed.
> > How do I make only the method2 exported ?.
> > 
> > Thanks,
> > 
> > Susantha.
> > 
> > ---------------
> > Lanka Software Foundation  (http://www.opensource.lk.)
> > Promoting Open-Source Development in Sri Lanka.
> > ---------------

##############################################################################
On Tue, 2003-07-29 at 17:49, Davanum Srinivas wrote:
Srinath,
> 
> If it's not too much of a problem....Can you please add this as an
enchancement request in
> Bugzilla? So that we don't lose the code or the test case.
> 
> Thanks,
> dims
> 
Hi all
> > 
> >     This is regarding the susantha's qustion. It seems that dims like a
> > patch. I give it a try, So here it is, Please some commiter have a look
> > at the patch. this has the patch, test case(If patch is accepted does my
> > test case is good enough to add as the  test case for the senario).
> > 
> >     Actually this is my first patch (It take more time than write the
> > code than come pass the     fiewall and create the patch. Thanks for all
> > who helps me for that regards.)I hope the patch is correct, I follow
> > instruction in apache site pls let me if anthing worng.
> > 
> >     please let me know if there are much more better ways to do thing
> > (regarding code,comments anything).
> > 
> >   Any comment regarding this welcome. (I am on my toes to know what
> > happen to my first Patch)
> >   Thanks for your time
> >   regards
> > 
> >   Srinath
> > 
> >  rest of the mail is as follows.
> >  1) description of logic behind the patch
> >  2) annoted results about the patch
> >  3) comment about result 
> > 
> >  Description of logic behind the patch
> >  -------------------------------------
> >  User can specify the allowed methods add - that means any overloaded
> > method of add or add(II),add(III).....
> >  then they would come to the "List, allowedmethod" in the ServiceDesc 
> > without breaking anything. (That was a big relef).
> > 
> >  Then I make sure that only the allowed methods can enter the
> > method2OperationMap. I have private method
> >  "isAllowedMethod" to help decide whether it is the a
> > allowedMethod(using the allowedmethod list/ it
> >  will return true all methods if user specify as e.g. "add" to make sure
> > that this is backward compatible).
> > 
> >  Then I cover the all the places that you put() on to the hashmap
> > method2OperationMap with the condition to to make
> >  sure only methods we need are inside the hash map. (it is at
> > setTypeMappingRegistry(TypeMappingRegistry tmr) and
> >  and createOperationForMethod(Method method)).
> > 
> > 
> >  The effect of that code seem to be the methods that is not specified is
> > practially act as they do
> >  not exists in the original code of service. That what we need I belive
> > !!!!!!!!!!!!!!
> >  * to run the test please refer to the comment on the test class

comments on test -(test case and more info at the attachment  )
> ========
> 1) the error Nullpointer seem not aceptable but if you call that test on
> the unaltered axis with the
> multiply(III) in the service removed you get the same result. effect of
> my patch is to remove the
> method from the class (make it invisible). So it seems at least I do not
> break anything.
> 
> I have a mail on axis-dev regarding that possible error in exising axis.
> 
> 2) 1) the error Nullpointer seem not aceptable but if you call that test
> on the unaltered axis with the
> multiply([Llang.String) in the service removed you get the same result.
> It seems the axis engine called
> multiply([Llang.String[Llang.String) with the other parameter null.
> effect of my patch is to remove the
> method from the class (make it invisible). So it seems at least I do not
> break anything.
> 
> I have a mail on axis-dev regarding that possible error in exising axis.
>