axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davanum Srinivas <d...@yahoo.com>
Subject Re: cvs commit: xml-axis/java/test/wsdl/extensibility ExtensibilityQueryBindingImpl.java ExtensibilityQueryTestCase.java QueryTypes.wsdl server-deploy.wsdd
Date Wed, 18 Jun 2003 23:23:18 GMT
:) Finally you got to merge it :) 

-- dims

--- sandholm@apache.org wrote:
> sandholm    2003/06/18 16:01:53
> 
>   Modified:    java/src/org/apache/axis/encoding
>                         DeserializationContext.java
>                         DeserializationContextImpl.java
>                         DeserializerImpl.java SerializationContextImpl.java
>                java/src/org/apache/axis/encoding/ser ArrayDeserializer.java
>                         BeanDeserializer.java SimpleDeserializer.java
>                java/src/org/apache/axis/message MessageElement.java
>                         RPCHandler.java SOAPEnvelope.java SOAPHeader.java
>                java/src/org/apache/axis/utils XMLUtils.java
>                java/src/org/apache/axis/wsdl/fromJava Emitter.java
>                java/src/org/apache/axis/wsdl/symbolTable SchemaUtils.java
>                         Utils.java
>                java/src/org/apache/axis/wsdl/toJava JavaBeanWriter.java
>                         JavaEnumTypeWriter.java
>                java/test/wsdl/extensibility
>                         ExtensibilityQueryBindingImpl.java
>                         ExtensibilityQueryTestCase.java QueryTypes.wsdl
>                         server-deploy.wsdd
>   Added:       java/src/org/apache/axis/encoding AnyContentType.java
>   Log:
>   merge of dynamic deserialization branch into trunk
>   --------------------------------------------------
>   -added support for deserilizing types based on their meta data
>   -SOAPBody/Header dirty flag bug fix
>   -default Namespace support in XMLUtils
>   -fix to WSDL Emitter to handle default namespace in wrapped mode
>   -xsd:union memberType support
>   -mark any content types with interface
>   -added meta data generation for enum types
>   -updated extensibility test case to test new dynamic deserialization code
>   
>   Revision  Changes    Path
>   1.54      +24 -0     xml-axis/java/src/org/apache/axis/encoding/DeserializationContext.java
>   
>   Index: DeserializationContext.java
>   ===================================================================
>   RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/DeserializationContext.java,v
>   retrieving revision 1.53
>   retrieving revision 1.54
>   diff -u -r1.53 -r1.54
>   --- DeserializationContext.java	22 Apr 2003 19:34:24 -0000	1.53
>   +++ DeserializationContext.java	18 Jun 2003 23:01:49 -0000	1.54
>   @@ -168,6 +168,30 @@
>         */
>        public Deserializer getDeserializerForType(QName xmlType);
>    
>   +    /**
>   +     * Convenience method to get the Deserializer for a specific
>   +     * java class from its meta data.
>   +     * @param cls is the Class used to find the deserializer 
>   +     * @return Deserializer
>   +     */
>   +    public Deserializer getDeserializerForClass(Class cls);
>   +
>   +    /**
>   +     * Allows the destination class to be set so that downstream
>   +     * deserializers like ArrayDeserializer can pick it up when
>   +     * deserializing its components using getDeserializerForClass
>   +     * @param destClass is the Class of the component to be deserialized 
>   +     */
>   +    public void setDestinationClass(Class destClass);
>   +
>   +    /**
>   +     * Allows the destination class to be retrieved so that downstream
>   +     * deserializers like ArrayDeserializer can pick it up when
>   +     * deserializing its components using getDeserializerForClass
>   +     * @return the Class of the component to be deserialized 
>   +     */
>   +    public Class getDestinationClass();
>   +
>        /** 
>         * Get the TypeMapping for this DeserializationContext
>         */
>   
>   
>   
>   1.76      +68 -0    
> xml-axis/java/src/org/apache/axis/encoding/DeserializationContextImpl.java
>   
>   Index: DeserializationContextImpl.java
>   ===================================================================
>   RCS file:
> /home/cvs/xml-axis/java/src/org/apache/axis/encoding/DeserializationContextImpl.java,v
>   retrieving revision 1.75
>   retrieving revision 1.76
>   diff -u -r1.75 -r1.76
>   --- DeserializationContextImpl.java	22 Apr 2003 17:39:55 -0000	1.75
>   +++ DeserializationContextImpl.java	18 Jun 2003 23:01:49 -0000	1.76
>   @@ -74,6 +74,7 @@
>    import org.apache.axis.utils.Messages;
>    import org.apache.axis.utils.NSStack;
>    import org.apache.axis.utils.XMLUtils;
>   +import org.apache.axis.description.TypeDesc;
>    import org.apache.commons.logging.Log;
>    import org.xml.sax.Attributes;
>    import org.xml.sax.InputSource;
>   @@ -89,6 +90,7 @@
>    import java.io.IOException;
>    import java.util.ArrayList;
>    import java.util.HashMap;
>   +import java.lang.reflect.Method;
>    
>    /**
>     * @author Glen Daniels (gdaniels@macromedia.com)
>   @@ -111,6 +113,10 @@
>    
>        private Locator locator;
>    
>   +    // Class used for deserialization using class metadata from 
>   +    // downstream deserializers
>   +    private Class destClass;
>   +
>        // for performance reasons, keep the top of the stack separate from
>        // the remainder of the handlers, and therefore readily available.
>        private SOAPHandler topHandler = null;
>   @@ -136,6 +142,10 @@
>        private MessageElement curElement;
>    
>        protected int startOfMappingsPos = -1;
>   +
>   +    private static final Class[] DESERIALIZER_CLASSES =
>   +            new Class[] {String.class, Class.class, QName.class};
>   +    private static final String DESERIALIZER_METHOD = "getDeserializer";
>        
>        // This is a hack to associate the first schema namespace we see with
>        // the correct SchemaVersion.  It assumes people won't often be mixing
>   @@ -469,6 +479,64 @@
>                }
>            }
>            return dser;
>   +    }
>   +    
>   +    /**
>   +     * Convenience method to get the Deserializer for a specific
>   +     * java class from its meta data.
>   +     * @param cls is the Class used to find the deserializer 
>   +     * @return Deserializer
>   +     */
>   +    public Deserializer getDeserializerForClass(Class cls) {
>   +        if (cls == null) {
>   +           cls = destClass;
>   +        }
>   +        if (cls == null) {
>   +            return null;
>   +        }
>   +        if (cls.isArray()) {
>   +            cls = cls.getComponentType();
>   +        }
>   +        if (javax.xml.rpc.holders.Holder.class.isAssignableFrom(cls)) {
>   +            try {
>   +                cls = cls.getField("value").getType();
>   +            } catch (Exception e) {
>   +            }
>   +        }
>   +        Deserializer dser = null;
>   +        try {
>   +            Method method = cls.getMethod(DESERIALIZER_METHOD, DESERIALIZER_CLASSES);
>   +            if (method != null) {
>   +                TypeDesc typedesc = TypeDesc.getTypeDescForClass(cls);
>   +                if (typedesc != null) {
>   +                    dser = (Deserializer) method.invoke(null,
>   +                        new Object[] {msgContext.getEncodingStyle(), cls,
> typedesc.getXmlType()});
>   +                }
>   +            }
>   +        } catch (Exception e) {
>   +            log.error(Messages.getMessage("noDeser00", cls.getName()));
>   +        }
>   +        return dser;
>   +    }
>   +
>   +     /**
>   +     * Allows the destination class to be set so that downstream
>   +     * deserializers like ArrayDeserializer can pick it up when
>   +     * deserializing its components using getDeserializerForClass
>   +     * @param destClass is the Class of the component to be deserialized 
>   +     */
>   +    public void setDestinationClass(Class destClass) {
>   +        this.destClass = destClass;
>   +    }
>   +
>   +    /**
>   +     * Allows the destination class to be retrieved so that downstream
>   +     * deserializers like ArrayDeserializer can pick it up when
>   +     * deserializing its components using getDeserializerForClass
>   +     * @return the Class of the component to be deserialized 
>   +     */
>   +    public Class getDestinationClass() {
>   +        return destClass;
>        }
>    
>        /**
>   
>   
>   
>   1.36      +3 -0      xml-axis/java/src/org/apache/axis/encoding/DeserializerImpl.java
>   
>   Index: DeserializerImpl.java
>   ===================================================================
> 
=== message truncated ===


=====
Davanum Srinivas - http://webservices.apache.org/~dims/

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

Mime
View raw message