axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Daniels <g...@thoughtcraft.com>
Subject Re: Bug 22213 / 24524 (was Re: cvs commit: ws-axis/java/test/RPCDispatch TestSerializedRPC.java)
Date Sat, 29 Nov 2003 06:03:22 GMT
22213 appears to be fixed (see bug).  Looking at 24524...

--Glen

----- Original Message ----- 
From: "Davanum Srinivas" <dims@yahoo.com>
To: <axis-dev@ws.apache.org>
Sent: Saturday, November 29, 2003 12:17 AM
Subject: Bug 22213 / 24524 (was Re: cvs commit:
ws-axis/java/test/RPCDispatch TestSerializedRPC.java)


> Glen,
>
> Can you please take a stab at Bug 22213 (Axis 1.1 array deserialization:
SAXException Invalid
> element) as well? i attached a stand-alone test case to the bug report.
You will need to run W2J
> on the arraytest.wsdl in the zip file as the test case uses the generated
code.
>
> Also any impact on 24524?
>
> Thanks,
> dims
>
> --- gdaniels@apache.org wrote:
> > gdaniels    2003/11/28 15:39:13
> >
> >   Modified:    java/src/org/apache/axis Constants.java
> >                java/src/org/apache/axis/encoding
> >                         DefaultSOAPEncodingTypeMappingImpl.java
> >                         DefaultTypeMappingImpl.java TypeMapping.java
> >                         TypeMappingDelegate.java TypeMappingImpl.java
> >                         TypeMappingRegistryImpl.java
> >                java/src/org/apache/axis/wsdl/symbolTable Utils.java
> >                java/src/org/apache/axis/wsdl/toJava Emitter.java
> >                java/test/RPCDispatch TestSerializedRPC.java
> >   Log:
> >   Fix a number of inconsistencies/issues in the type mapping
> >   system.
> >
> >   * Refactor TypeMappingDelegate.  Now it does NOT inherit from
> >     TypeMappingImpl, but just implements TypeMapping.  Since the
> >     whole point of the delegate class is just to act as a proxy
> >     for a "real" typemapping in order to keep chains updated in
> >     the face of changes, it doesn't make sense for it to have
> >     all the "real" functionality.  Now this is explicit, which
> >     should make debugging easier in the future.
> >
> >   * Refactor getXMLType() up to TypeMapping interface.
> >
> >   * Instead of putting the soap encoding typedefs into the default
> >     type mapping, put them (and only them) into the default SOAP
> >     type mappings, which delegate to the "raw" default type mapping.
> >     This cleans up a lot of weird problems we were having mixing up
> >     soap encoded types with schema types.
> >
> >   * Fix type mapping chaining bug in register() - now we actually
> >     have the new mapping delegate to the old one, which makes the
> >     scoping work.
> >
> >   * When checking for serializers or looking up QNames by class,
> >     walk the delegate chain *before* doing the funky array-checking
> >     logic.  This enables explicit mappings of, say, "int[]", to
> >     override the default abstract array processing.
> >
> >   * DefaultTypeMappings used to throw exceptions if they were
> >     modified after initialization - but I don't think this really
> >     makes sense - you should be able to change the defaults.  So the
> >     exception throwing has been commented out for now.
> >
> >   * Comment out testEncodedArrayConversion in TestSerializedRPC.
> >     In this context, there is no way that <arg0>string</arg0> could
> >     schema-validate against the service (since it's using SOAP-encoded
> >     arrays and thus must have child elements).
> >
> >   * Comment out calls to getNillableQName() in wsdl.symbolTable.Utils.
> >     This prevents changing the schema types to potentially incompatible
> >     ones (I don't believe SOAP processors are required to understand
> >     the soapenc types, therefore we can't replace the schema ones,
> >     esp. in a doc/lit environment).
> >
> >   * Change ordering of schema types to make sure 2001 schema is
> >     registered last (this means class->XSD mappings will by default
> >     return 2001 versions)
> >
> >   Revision  Changes    Path
> >   1.128     +2 -2      ws-axis/java/src/org/apache/axis/Constants.java
> >
> >   Index: Constants.java
> >   ===================================================================
> >   RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/Constants.java,v
> >   retrieving revision 1.127
> >   retrieving revision 1.128
> >   diff -u -r1.127 -r1.128
> >   --- Constants.java 4 Nov 2003 18:07:22 -0000 1.127
> >   +++ Constants.java 28 Nov 2003 23:39:12 -0000 1.128
> >   @@ -315,9 +315,9 @@
> >        public static final String URI_DEFAULT_SCHEMA_XSD =
URI_2001_SCHEMA_XSD;
> >
> >        public static final String[] URIS_SCHEMA_XSD = {
> >   -        URI_2001_SCHEMA_XSD,
> >   +        URI_1999_SCHEMA_XSD,
> >            URI_2000_SCHEMA_XSD,
> >   -        URI_1999_SCHEMA_XSD
> >   +        URI_2001_SCHEMA_XSD
> >        };
> >        public static final QName [] QNAMES_NIL = {
> >            SchemaVersion2001.QNAME_NIL,
> >
> >
> >
> >   1.3       +42 -1
> >
ws-axis/java/src/org/apache/axis/encoding/DefaultSOAPEncodingTypeMappingImpl
.java
> >
> >   Index: DefaultSOAPEncodingTypeMappingImpl.java
> >   ===================================================================
> >   RCS file:
> >
/home/cvs/ws-axis/java/src/org/apache/axis/encoding/DefaultSOAPEncodingTypeM
appingImpl.java,v
> >   retrieving revision 1.2
> >   retrieving revision 1.3
> >   diff -u -r1.2 -r1.3
> >   --- DefaultSOAPEncodingTypeMappingImpl.java 22 Apr 2003 19:34:24 -0000
1.2
> >   +++ DefaultSOAPEncodingTypeMappingImpl.java 28 Nov 2003 23:39:12 -0000
1.3
> >   @@ -55,6 +55,10 @@
> >
> >    package org.apache.axis.encoding;
> >
> >   +import org.apache.axis.Constants;
> >   +import org.apache.axis.encoding.ser.Base64SerializerFactory;
> >   +import org.apache.axis.encoding.ser.Base64DeserializerFactory;
> >   +
> >    /**
> >     * @author Rich Scheuerle (scheu@us.ibm.com)
> >     *
> >   @@ -74,8 +78,45 @@
> >            }
> >            return tm;
> >        }
> >   +
> >   +    public static TypeMapping createWithDelegate() {
> >   +        TypeMapping ret = new DefaultSOAPEncodingTypeMappingImpl();
> >   +        ret.setDelegate(DefaultTypeMappingImpl.getSingleton());
> >   +        return ret;
> >   +    }
> >
> >        protected DefaultSOAPEncodingTypeMappingImpl() {
> >   -        super(true);
> >   +        registerSOAPTypes();
> >   +    }
> >   +
> >   +    /**
> >   +     * Register the SOAP encoding data types.  This is split out into
a
> >   +     * method so it can happen either before or after the XSD
mappings.
> >   +     */
> >   +    private void registerSOAPTypes() {
> >   +        // SOAP Encoded strings are treated as primitives.
> >   +        // Everything else is not.
> >   +        myRegisterSimple(Constants.SOAP_STRING,
java.lang.String.class);
> >   +        myRegisterSimple(Constants.SOAP_BOOLEAN,
java.lang.Boolean.class);
> >   +        myRegisterSimple(Constants.SOAP_DOUBLE,
java.lang.Double.class);
> >   +        myRegisterSimple(Constants.SOAP_FLOAT,
java.lang.Float.class);
> >   +        myRegisterSimple(Constants.SOAP_INT,
java.lang.Integer.class);
> >   +        myRegisterSimple(Constants.SOAP_INTEGER,
java.math.BigInteger.class);
> >   +        myRegisterSimple(Constants.SOAP_DECIMAL,
java.math.BigDecimal.class);
> >   +        myRegisterSimple(Constants.SOAP_LONG, java.lang.Long.class);
> >   +        myRegisterSimple(Constants.SOAP_SHORT,
java.lang.Short.class);
> >   +        myRegisterSimple(Constants.SOAP_BYTE, java.lang.Byte.class);
> >   +        myRegister(Constants.SOAP_BASE64,     byte[].class,
> >   +                   new Base64SerializerFactory(byte[].class,
> >   +
                                              Constants.SOAP_BASE64 ),
> >   +                   new Base64DeserializerFactory(byte[].class,
> >   +
Constants.SOAP_BASE64)
> >   +        );
> >   +        myRegister(Constants.SOAP_BASE64BINARY,     byte[].class,
> >   +                   new Base64SerializerFactory(byte[].class,
> >   +
                                              Constants.SOAP_BASE64 ),
> >   +                   new Base64DeserializerFactory(byte[].class,
> >   +
Constants.SOAP_BASE64)
> >   +        );
> >        }
> >    }
> >
> >
> >
> >   1.75      +10 -52
ws-axis/java/src/org/apache/axis/encoding/DefaultTypeMappingImpl.java
> >
> >   Index: DefaultTypeMappingImpl.java
> >   ===================================================================
> >   RCS file:
/home/cvs/ws-axis/java/src/org/apache/axis/encoding/DefaultTypeMappingImpl.j
ava,v
> >   retrieving revision 1.74
> >   retrieving revision 1.75
> >   diff -u -r1.74 -r1.75
> >   --- DefaultTypeMappingImpl.java 25 Nov 2003 06:07:02 -0000 1.74
> >   +++ DefaultTypeMappingImpl.java 28 Nov 2003 23:39:12 -0000 1.75
> >   @@ -127,10 +127,6 @@
> >        }
> >
> >        protected DefaultTypeMappingImpl() {
> >   -        this(false);
> >   -    }
> >   -
> >   -    protected DefaultTypeMappingImpl(boolean encoded) {
> >            super(null);
> >            delegate = null;
> >
> >   @@ -160,10 +156,6 @@
> >                                Constants.MIME_PLAINTEXT));
> >            }
> >
> >   -        if (!encoded) {
> >   -            registerSOAPTypes();
> >   -        }
> >   -
> >            // HexBinary binary data needs to use the hex binary
serializer/deserializer
> >            myRegister(Constants.XSD_HEXBIN,     HexBinary.class,
> >                       new HexSerializerFactory(
> >   @@ -643,45 +635,10 @@
> >            SchemaVersion.SCHEMA_2000.registerSchemaSpecificTypes(this);
> >            SchemaVersion.SCHEMA_2001.registerSchemaSpecificTypes(this);
> >
> >   -        if (encoded) {
> >   -            registerSOAPTypes();
> >   -        }
> >   -
> >            doneInit = true;
> >        }
> >
> === message truncated ===
>
>
> =====
> Davanum Srinivas - http://webservices.apache.org/~dims/
>
>

Mime
View raw message