gdaniels    2002/07/03 13:02:07

  Modified:    java/src/org/apache/axis/wsdl/fromJava Tag: beta-3
                        Types.java
               java/src/org/apache/axis/description Tag: beta-3
                        ServiceDesc.java
  Log:
  Simple fix for bug 10103.
  
  Don't write Holder types when emitting WSDL/Schema, instead use the
  held type.
  
  Also, make sure ParameterDesc is consistent - always use the Java
  Class of the actual parameter.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.40.2.1  +6 -3      xml-axis/java/src/org/apache/axis/wsdl/fromJava/Types.java
  
  Index: Types.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/fromJava/Types.java,v
  retrieving revision 1.40
  retrieving revision 1.40.2.1
  diff -u -r1.40 -r1.40.2.1
  --- Types.java        1 Jul 2002 17:40:39 -0000       1.40
  +++ Types.java        3 Jul 2002 20:02:06 -0000       1.40.2.1
  @@ -58,7 +58,6 @@
   
   import org.apache.axis.AxisFault;
   import org.apache.axis.Constants;
  -import org.apache.axis.wsdl.toJava.Utils;
   import org.apache.axis.encoding.Serializer;
   import org.apache.axis.encoding.SerializerFactory;
   import org.apache.axis.encoding.SimpleType;
  @@ -76,6 +75,7 @@
   
   import javax.wsdl.Definition;
   import javax.xml.namespace.QName;
  +import javax.xml.rpc.holders.Holder;
   import java.lang.reflect.Field;
   import java.lang.reflect.Modifier;
   import java.util.ArrayList;
  @@ -157,6 +157,9 @@
           if (type.getName().equals("void")) {
             return null;
           }
  +        if (Holder.class.isAssignableFrom(type)) {
  +            type = JavaUtils.getHolderValueType(type);
  +        }
           if (isSimpleType(type)) {
               javax.xml.namespace.QName typeQName = getTypeQName(type);
               // Still need to write any element declaration...
  @@ -847,8 +850,8 @@
       
       /**
        * isBeanCompatible
  -     * @param type Class
  -     * @param boolean issueMessages if not compatible
  +     * @param javaType Class
  +     * @param issueErrors if true, issue messages if not compatible
        * Returns true if it appears that this class is a bean and
        * can be mapped to a complexType
        */
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.32.2.2  +3 -4      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.32.2.1
  retrieving revision 1.32.2.2
  diff -u -r1.32.2.1 -r1.32.2.2
  --- ServiceDesc.java  2 Jul 2002 14:57:56 -0000       1.32.2.1
  +++ ServiceDesc.java  3 Jul 2002 20:02:07 -0000       1.32.2.2
  @@ -798,19 +798,18 @@
                   paramDesc.setName("in" + k);
               }
   
  -            // If it's a Holder, mark it INOUT and set the type to the
  -            // held type.  Otherwise it's IN with its own type.
  +            // If it's a Holder, mark it INOUT, and set the XML type QName
  +            // to the held type.  Otherwise it's IN.
   
               Class heldClass = JavaUtils.getHolderValueType(type);
               if (heldClass != null) {
                   paramDesc.setMode(ParameterDesc.INOUT);
                   paramDesc.setTypeQName(tm.getTypeQName(heldClass));
  -                paramDesc.setJavaType(heldClass);
               } else {
                   paramDesc.setMode(ParameterDesc.IN);
                   paramDesc.setTypeQName(tm.getTypeQName(type));
  -                paramDesc.setJavaType(type);
               }
  +            paramDesc.setJavaType(type);
               operation.addParameter(paramDesc);
           }
   
  
  
  


Reply via email to