axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "R J Scheuerle Jr" <sc...@us.ibm.com>
Subject RE: Re : Lightweight Skeletons
Date Wed, 16 Jan 2002 16:39:51 GMT
Yes to the part about placing the initialization in a static block.

However, we still need a non-static method for getParameterName so that we
can put it in the Skeleton interface.
(An alternative is to generate the code as you suggest and  change the
Skeleton interface to be just a "marker".
The assume that anything implementing the marker interface has a method
named getParameterName.)

Russell, what do you think.  Russell, would you like to make this change?

Rich Scheuerle
XML & Web Services Development
512-838-5115  (IBM TL 678-5115)


                                                                                         
                                        
                      Cédric Chabanois                                                  
                                         
                      <CChabanois@cogni        To:       "'axis-dev@xml.apache.org'" <axis-dev@xml.apache.org>
                   
                      case.fr>                 cc:                                    
                                           
                                               Subject:  RE: Re : Lightweight Skeletons  
                                        
                      01/16/2002 08:55                                                   
                                        
                      AM                                                                 
                                        
                      Please respond to                                                  
                                        
                      axis-dev                                                           
                                        
                                                                                         
                                        
                                                                                         
                                        



Concerning Skeleton generation, wouldn't it be better if the generated code
was :

"
package thepackage;

public class MyTestSoapBindingSkeleton implements thepackage.MyTest,
    org.apache.axis.wsdl.Skeleton {
    private thepackage.MyTest impl;
    private static org.apache.axis.wsdl.SkeletonImpl skel;

    static {
        skel = new org.apache.axis.wsdl.SkeletonImpl();
        skel.add("eCHO",
                 new String[] {
                 "return",
                 "in0",
                 });
     }

    public MyTestSoapBindingSkeleton() {
        this.impl = new localhost.MyTestSoapBindingImpl();
    }

    public MyTestSoapBindingSkeleton(thepackage.MyTest impl) {
        this.impl = impl;
    }

    public static String getParameterName(String opName, int i) {
        return skel.getParameterName(opName, i);
    }

[...]
"
?


- No more Init method necessary (replaced by a static block)
- only one getParameterName function.
I don't understand why 2 getParameterName functions are necessary as only
one (static) should be enough.

Cédric Chabanois

> I just made changes to Java2WSDL to use getParameterNames()
> to generate the
> wsdl part names.  If it can't use
> getParameterNames(), it defaults to using the debug
> information as before.
>
> As far as the runtime is concerned....
>
> The skeleton code was necessary to glue to output of the axis server
> runtime to the implementation code.
> For example, the skeleton was responsible for constructing
> Holder objects
> and passing back the output parameters
> in an implementation defined manner.
>
> I simplified the skeleton code by moving most of this work
> directly into
> the runtime.  The only piece that was remaining
> was actually obtaining the output parameter names to pass
> back over the
> wire.  The getParameterNames() method provides this piece.
> We could change the runtime to use the debug information just like
> Java2WSDL...but I think its wrong to have the runtime have
> behavior that
> is dependent on debug information.
>
> Rich Scheuerle
> XML & Web Services Development
> 512-838-5115  (IBM TL 678-5115)
>
>
>
>
>                       Cédric Chabanois
>
>                       <CChabanois@cogni        To:
> "'axis-dev@xml.apache.org'" <axis-dev@xml.apache.org>
>
>                       case.fr>                 cc:
>
>                                                Subject:  RE:
> Re : Lightweight Skeletons
                      01/14/2002 10:25

>                       AM
>
>                       Please respond to
>
>                       axis-dev
>
>
>
>
>
>
>
>
>
> Thanks,
>
> I understand better now !
>
> I still have questions concerning this point :
> - if implementation class was compiled with -g, we know the
> names of the
> output parameters, don't we ?
> So skeletton should not be necessary
>
> - if implementation class was not compiled with -g,
> getParametersNames is
> used to get the names of the output parameters.
> But the client (written in Delphi, MS.NET ...) has been
> created using the
> wsdl, so it may be waiting for inout# parameters as the wsdl
> does not have
> correct parameter names (because implementation class not
> compiled with -g
> ...)
>
> So I think that if skeleton is present, getParameterNames
> should be used to
> create the wsdl parameter names.
>
> Cédric
>
>
> > The getParameterNames(...) method is used by the AXIS runtime
> > so that it
> > can get the names of the output parameters to pass back.  This
> > functionality used to be embedded in the skeleton methods.
> >
> > You are pointing out that the getParameterNames(...) method
> > could also be
> > used by Java2WSDL to get the parameter names for the wsdl file.
> > You are correct, but I have not added this code yet.
> >
> > Rich Scheuerle
> > XML & Web Services Development
> > 512-838-5115  (IBM TL 678-5115)
> >
> >
> >
> >
> >                       Cédric Chabanois
> >
> >                       <CChabanois@cogni        To:
> > axis-dev@xml.apache.org
> >
> >                       case.fr>                 cc:
> >
> >                                                Subject:  Re :
> > Lightweight Skeletons
> >                       01/14/2002 09:36
> >
> >                       AM
> >
> >                       Please respond to
> >
> >                       axis-dev
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > I think this is good news but I don't know if I have well
> > understood the
> > consequences.
> >
> > Say I have a web service (2 classes : the interface and the impl)
> >
> > 1) If I compile it with -g, parameter names are available so
> > the skeleton
> > is
> > not necessary. Am I right ?
> > The ?wsdl will have correct parameters (not in0, inout0 ...)
> >
> > 2) If I don't compile it with -g, parameter names are not available.
> > Skeleton can be useful in this case because I can implement
> > getParameterName
> > and init functions that will tell the parameter names.
> >
> > Personnaly, I have made a skeleton (and added it in the wsdd
> > file) but I
> > still don't have correct parameter names in the generated
> > wsdl (?wsdl).
> >
> > Why ?
> >
> >
> > Cédric
> >
> >
> > >Changed WSDL2Java and the runtime (RPCProvider,
> > JavaUtils.convert) to use
> > "lightweight" skeletons.
> > >The skeletons now have the same method signatures as the
> > impl, stub, and
> > portType.
> > >The skeletons delegate directly to the impl, the runtime
> > automatically
> > builds the proper Holder objects as necessary.
> > >The only purpose for the skeletons is to provide a new method
> > getParameterName(opName, i) which is used by RPCProvider to
> > associate names
> > with the output values.
> > >So if this is not necessary for your service, no skeleton is
> > needed. This
> > is a big step towards the complete removal of skeletons.
> > >For example, if the server has wsdl or other meta data, the runtime
> > *could*
> > automatically use the meta data to get the element names for
> > the output
> > values.
> > >For the time being, these new lightweight skeletons will be used.
> > >I also added a -S <true_or_false> option to WSDL2Java to
> > indicate whether
> > to deploy the skeleton (true) or the impl (false). >The default is
> > currently
> > true. Enjoy, Rich Scheuerle XML & Web Services Development
> > 512-838-5115
> > (IBM
> > TL 678-5115)
> >
> >
> >
> >
>
>
>




Mime
View raw message