stevel      2002/06/24 16:01:22

  Modified:    java/src/org/apache/axis/description ServiceDesc.java
  Log:
  surprising to see that getOperations() forces a complete reevaluation of what is up 
the object chain...I'd have expected that to be cached after the first time. It means 
that the servlet listing puts more load on the system than it should, and that the 
listing may also ignore any supplied wsdl file.
  
  Revision  Changes    Path
  1.29      +43 -1     xml-axis/java/src/org/apache/axis/description/ServiceDesc.java
  
  Index: ServiceDesc.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/description/ServiceDesc.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- ServiceDesc.java  21 Jun 2002 14:48:38 -0000      1.28
  +++ ServiceDesc.java  24 Jun 2002 23:01:22 -0000      1.29
  @@ -152,6 +152,10 @@
       public ServiceDesc() {
       }
   
  +    /**
  +     * What kind of service is this?
  +     * @return
  +     */
       public Style getStyle() {
           return style;
       }
  @@ -174,10 +178,21 @@
           return ((style == Style.RPC) || (style == Style.WRAPPED));
       }
   
  +    /**
  +     * the wsdl file of the service.
  +     * When null, it means that the wsdl should be autogenerated
  +     * @return filename or null
  +     */
       public String getWSDLFile() {
           return wsdlFileName;
       }
   
  +    /**
  +     * set the wsdl file of the service; this causes the named
  +     * file to be returned on a ?wsdl, probe, not introspection
  +     * generated wsdl.
  +     * @param wsdlFileName filename or null to re-enable introspection
  +     */
       public void setWSDLFile(String wsdlFileName) {
           this.wsdlFileName = wsdlFileName;
       }
  @@ -194,6 +209,12 @@
           return implClass;
       }
   
  +    /**
  +     * set the implementation class
  +     * @param implClass
  +     * @throws IllegalArgumentException if the implementation class is already
  +     *         set
  +     */
       public void setImplClass(Class implClass) {
           if (this.implClass != null)
               throw new IllegalArgumentException(
  @@ -243,10 +264,17 @@
           this.tm = tm;
       }
   
  +    /**
  +     * the name of the service
  +     */
       public String getName() {
           return name;
       }
   
  +    /**
  +     * the name of the service
  +     * @param name
  +     */
       public void setName(String name) {
           this.name = name;
       }
  @@ -285,12 +313,23 @@
           overloads.add(operation);
       }
   
  +    /**
  +     * get all the operations as a list of OperationDescs.
  +     * this method triggers an evaluation of the valid operations by
  +     * introspection, so use sparingly
  +     * @return reference to the operations array. This is not a copy
  +     */
       public ArrayList getOperations()
       {
           loadServiceDescByIntrospection();  // Just in case...
           return operations;
       }
   
  +    /**
  +     * get all overloaded operations by name
  +     * @param methodName
  +     * @return null for no match, or an array of OperationDesc objects
  +     */
       public OperationDesc [] getOperationsByName(String methodName)
       {
           getSyncedOperationsForName(implClass, methodName);
  @@ -310,6 +349,7 @@
       /**
        * Return an operation matching the given method name.  Note that if we
        * have multiple overloads for this method, we will return the first one.
  +     * @return null for no match
        */
       public OperationDesc getOperationByName(String methodName)
       {
  @@ -332,6 +372,7 @@
       /**
        * Map an XML QName to an operation.  Returns the first one it finds
        * in the case of mulitple matches.
  +     * @return null for no match
        */
       public OperationDesc getOperationByElementQName(QName qname)
       {
  @@ -347,7 +388,8 @@
       /**
        * Return all operations which match this QName (i.e. get all the
        * overloads)
  -     */ 
  +     * @return null for no match
  +     */
       public OperationDesc [] getOperationsByQName(QName qname)
       {
           // If we're MESSAGE style, we should only have a single operation,
  
  
  


Reply via email to