gdaniels    2002/06/29 12:46:26

  Modified:    java/src/org/apache/axis/deployment/wsdd WSDDService.java
               java/src/org/apache/axis/description ServiceDesc.java
  Log:
  Fix bugzilla bug :
  
  http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9826
  
  We now correctly set the "message" style on ServiceDescs that originate
  from WSDD with the "java:MSG" provider, and correctly propagate this
  through the system.  We now use SOAPBodyElements instead of
  RPCElements for message style services.
  
  While I was in there I added an "introspectionComplete" flag which should
  eliminate the extraneous introspection we were doing each time
  ServiceDesc.getOperations() was being called.  This should hopefully speed
  things up a tad.
  
  Revision  Changes    Path
  1.73      +6 -1      
xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDService.java
  
  Index: WSDDService.java
  ===================================================================
  RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/deployment/wsdd/WSDDService.java,v
  retrieving revision 1.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- WSDDService.java  26 Jun 2002 18:19:07 -0000      1.72
  +++ WSDDService.java  29 Jun 2002 19:46:26 -0000      1.73
  @@ -188,8 +188,13 @@
           }
   
           String providerStr = e.getAttribute(ATTR_PROVIDER);
  -        if (providerStr != null && !providerStr.equals(""))
  +        if (providerStr != null && !providerStr.equals("")) {
               providerQName = XMLUtils.getQNameFromString(providerStr, e);
  +            if (WSDDConstants.QNAME_JAVAMSG_PROVIDER.equals(providerQName)) {
  +                // Message style if message provider...
  +                desc.setStyle(Style.MESSAGE);
  +            }
  +        }
   
           // call to validate standard descriptors for this service
           validateDescriptors();
  
  
  
  1.30      +25 -2     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.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- ServiceDesc.java  24 Jun 2002 23:01:22 -0000      1.29
  +++ ServiceDesc.java  29 Jun 2002 19:46:26 -0000      1.30
  @@ -145,6 +145,7 @@
       /** Our typemapping for resolving Java<->XML type issues */
       private TypeMapping tm = null;
       private boolean haveAllSkeletonMethods = false;
  +    private boolean introspectionComplete = false;
   
       /**
        * Default constructor
  @@ -395,7 +396,13 @@
           // If we're MESSAGE style, we should only have a single operation,
           // to which we'll pass any XML we receive.
           if (style == Style.MESSAGE) {
  -            return new OperationDesc [] { (OperationDesc)operations.get(0) };
  +            if (!introspectionComplete) {
  +                loadServiceDescByIntrospection();
  +            }
  +            if (operations.size() > 0)
  +                return new OperationDesc [] { (OperationDesc)operations.get(0) };
  +
  +            return null;
           }
   
           // If we're DOCUMENT style, we look in our mapping of QNames ->
  @@ -550,7 +557,7 @@
        */
       public void loadServiceDescByIntrospection(Class implClass, boolean 
searchParents)
       {
  -        if (implClass == null)
  +        if (introspectionComplete || implClass == null)
               return;
   
           Method [] methods = implClass.getDeclaredMethods();
  @@ -580,6 +587,8 @@
                   loadServiceDescByIntrospection(superClass, true);
               }
           }
  +
  +        introspectionComplete = true;
       }
   
       /**
  @@ -856,5 +865,19 @@
           if (namespaceMappings == null)
               namespaceMappings = new ArrayList();
           namespaceMappings.add(0, namespace);
  +    }
  +
  +    public void setProperty(String name, Object value) {
  +        if (properties == null) {
  +            properties = new HashMap();
  +        }
  +        properties.put(name, value);
  +    }
  +
  +    public Object getProperty(String name) {
  +        if (properties == null)
  +            return null;
  +
  +        return properties.get(name);
       }
   }
  
  
  


Reply via email to