scheu       02/05/30 08:47:13

  Modified:    java     TODO.txt
               java/src/org/apache/axis/encoding
                        SerializationContextImpl.java
               java/test/wsdl Wsdl2javaTestSuite.xml
               java/test/wsdl/roundtrip RoundtripTestServiceTestCase.java
  Log:
  The following changes are made:
  
  1) Support for abstract parameters. (Cool)
  
     If an operation has an abstract parameter, the
     actual concrete derived argument must be serialized using
     its own xmlType and javaType.  This is necessary so that the
     object can be deserialized on the server-side (can't deserialize
     an abstract javaType).
  
     Changes were made to SerializationContextImpl to make this work.
  
     Uncommented code in the roundtrip testcase that invokes the
     getId(Investment) operation with a StockInvestment argument.
     Investment is abstract and StockInvestment is a derived concrete
     class.  So this tests the new feature.
  
  2) The above getId(..) method is overloaded, and due to a problem
     in the skeleton, the roundtrip test is temporarily changed
     to do non-skeleton deploy.  I am working on the skeleton fix.
  
  3) Changes to the TODO list.
  
  Revision  Changes    Path
  1.51      +17 -6     xml-axis/java/TODO.txt
  
  Index: TODO.txt
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/TODO.txt,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- TODO.txt  22 May 2002 17:38:39 -0000      1.50
  +++ TODO.txt  30 May 2002 15:47:12 -0000      1.51
  @@ -8,6 +8,10 @@
   
                    * <Glen> Write TO DO list
   
  +BETA 3 MUST DO LIST
  +-------------------
  +
  +
   BETA 2 MUST DO LIST
   -------------------
   * <Glen> Clean up User's Guide
  @@ -29,7 +33,9 @@
   
   SCHEMA SUPPORT
   --------------
  -! <> Support qualified/unqualified flags for elements + attributes
  +X <Glen> Support qualified/unqualified flags for elements
  +      (this also relates to WSDL2Java and type metadata)
  +! <> Support qualified/unqualified flags for attributes
         (this also relates to WSDL2Java and type metadata)
   
   
  @@ -79,16 +85,17 @@
   * <> (ongoing) JAX-RPC compliance.  In particular:
   ! <> Mapping of XML names.  We do some, not all, of what JAX-RPC specifies.
   ! <> Faults - What do we handle now?  What needs to be enhanced?  JAX-RPC needs 
improving, first, we think.
  -! <> Derived type support.
  +X <Rich> Faults - Support v1.0 mapping
  +X <Rich> Derived type support. Including extending abstract complexTypes and 
extending simpleTypes.
   ! <> Object[] doesn't work.  If we have method(Object[] array) and we pass in an 
Object[], we get NullPointerExceptions.  If, however, we pass in a String[] or a 
Phone[] then it works.  Object[] becomes xsd:anyType[].  Since anyType doesn't work, I 
don't expect anyType[] to work.
   ! <> do we want xsd:anyType to work?
  -! <> with the --all flag, ALL types should be registered in the Stub.
  +X <Russell> with the --all flag, ALL types should be registered in the Stub.
   
   * <Russell> (ongoing) Need to pull everything writer-specific out of the 
framework(Emitter/SymbolTable/etc).  Signatures are still in there.  So are Wsdl2java 
options that only the writers care about.
   
   ! <> Attachment support.
   
  -! <> Name clash resolution has to grow up.
  +X <Rich/Russell> Name clash resolution has to grow up.
   
   ! <> Automatically creating a package name from a namespace is very limited at the 
moment.
   
  @@ -105,7 +112,7 @@
       interface will look like.
     - We do not emit SOAPElement arguments per JAX-RPC yet.
   
  -! <Russell/Rich> If a reference to a type is encountered before the definition, a 
RefdType is created and added to the symbol table.  Once the type is defined, this 
RefdType is replaced by a real type.  Other objects may have referred to the RefdType. 
 Their references also need to be replaced.  This doesn't affect any of our existing 
tests.
  +X <Rich> If a reference to a type is encountered before the definition, a RefdType 
is created and added to the symbol table.  Once the type is defined, this RefdType is 
replaced by a real type.  Other objects may have referred to the RefdType.  Their 
references also need to be replaced.  This doesn't affect any of our existing tests.  
(We do have tests for this.)
   
   * <Russell/Tom> Grow Filegen test.  We now generate code only if it's needed, but 
this feature isn't well tested yet.
   
  @@ -113,6 +120,8 @@
   
   * <Rich/Tom?> Need to handle collections of objects (max occurs > 1).  Rich did the 
work for encoding.  Does something still need to be done for literal?
   
  +X <Rich> Support for anonymous complexTypes and simpleTypes for elements and 
attributes.
  +
   Java2WSDL
   ---------
   ! <Russell?/Rich?> Java2WSDL "void op(boolean b1, Boolean b2)" maps to
  @@ -133,6 +142,8 @@
   
   ! <> Support wildcards in stop object classes (i.e. "javax.*")
   
  +X <Rich> Generate correct input/output elements for overloading.
  +
   
   METHOD DISPATCH / SERVICE METADATA
   ----------------------------------
  @@ -152,7 +163,7 @@
        for that type:
          <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
        We must also check for this import statement in WSDL2Java.
  -
  +! <Rich> Serialize/Deserialize fault contents
   
   FUTURE ENHANCEMENTS (not necessary for current release)
   -------------------------------------------------------
  
  
  
  1.29      +18 -1     
xml-axis/java/src/org/apache/axis/encoding/SerializationContextImpl.java
  
  Index: SerializationContextImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/encoding/SerializationContextImpl.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- SerializationContextImpl.java     30 May 2002 03:06:08 -0000      1.28
  +++ SerializationContextImpl.java     30 May 2002 15:47:12 -0000      1.29
  @@ -86,6 +86,7 @@
   import javax.xml.rpc.JAXRPCException;
   import java.io.IOException;
   import java.io.Writer;
  +import java.lang.reflect.Modifier;
   import java.util.ArrayList;
   import java.util.Calendar;
   import java.util.Date;
  @@ -1005,7 +1006,23 @@
               }
   
               SerializerInfo info = null;
  -            if (xmlType != null) {
  +// If the javaType is abstract, try getting a
  +            // serializer that matches the value's class. 
  +            if (javaType != null &&
  +                !javaType.isPrimitive() &&
  +                !javaType.isArray() &&
  +                !isPrimitive(value, javaType) &&
  +                Modifier.isAbstract(javaType.getModifiers())) {
  +                info = getSerializer(value.getClass(), value);
  +                if (info != null) {
  +                    // Successfully found a serializer for the derived object.
  +                    // Must serializer the type.
  +                    sendType = true;  
  +                    xmlType = null;
  +                }
  +            }
  +            // Try getting a serializer for the prefered xmlType
  +            if (info == null && xmlType != null) {
                   info = getSerializer(javaType, xmlType);
               }
   
  
  
  
  1.100     +9 -0      xml-axis/java/test/wsdl/Wsdl2javaTestSuite.xml
  
  Index: Wsdl2javaTestSuite.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/wsdl/Wsdl2javaTestSuite.xml,v
  retrieving revision 1.99
  retrieving revision 1.100
  diff -u -r1.99 -r1.100
  --- Wsdl2javaTestSuite.xml    21 May 2002 17:15:50 -0000      1.99
  +++ Wsdl2javaTestSuite.xml    30 May 2002 15:47:13 -0000      1.100
  @@ -139,11 +139,20 @@
       <!-- Delete the intermediate files so we recreate over a clean slate -->
       <delete dir="${build.dir}/classes/test/wsdl/roundtrip"/>
       <!-- Recreate Java files from the new WSDL -->
  +    <!-- Temporarily changed to remove skeletonDeploy...Scheu
       <wsdl2java url="build/work/test/wsdl/roundtrip/Roundtrip.wsdl"
                  output="build/work"
                  deployscope="session"
                  serverSide="yes"
                  skeletonDeploy="yes"
  +               noimports="no"
  +               verbose="no"
  +               testcase="no">
  +    -->
  +    <wsdl2java url="build/work/test/wsdl/roundtrip/Roundtrip.wsdl"
  +               output="build/work"
  +               deployscope="session"
  +               serverSide="yes"
                  noimports="no"
                  verbose="no"
                  testcase="no">
  
  
  
  1.11      +0 -2      
xml-axis/java/test/wsdl/roundtrip/RoundtripTestServiceTestCase.java
  
  Index: RoundtripTestServiceTestCase.java
  ===================================================================
  RCS file: 
/home/cvs/xml-axis/java/test/wsdl/roundtrip/RoundtripTestServiceTestCase.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- RoundtripTestServiceTestCase.java 28 May 2002 23:08:16 -0000      1.10
  +++ RoundtripTestServiceTestCase.java 30 May 2002 15:47:13 -0000      1.11
  @@ -583,7 +583,6 @@
       /**
        *  Test the overloaded method getId with a StockInvestment.
        */
  -    /* Disabled due to RPCProvider bug
       public void testInvestmentGetId() {
   
           try {
  @@ -601,7 +600,6 @@
           }
   
       } // testInvestmentGetId
  -    */
   
       /**
        *  Test to insure that a multiple array sent by a remote method can be
  
  
  


Reply via email to