axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From R J Scheuerle Jr <sc...@us.ibm.com>
Subject Re: cvs commit: xml-axis/java/src/org/apache/axis/encoding DeserializationContextImpl.java
Date Fri, 23 Aug 2002 18:47:48 GMT

While looking at the namespace.pop() problem, I found a problem in your
earlier commit.

The new getDeserializer(Class javaType, QName xmlType) method in
DeserializationContextImpl fails if the
class is a Holder.  You should either:

a) Have getDeserializer convert the Holder class to the held class before
calling TM.getDeserializer. -or-
b) Change the callers to pass in the held class.  I think the only caller
is RPCHandler and it can determine
if the class is a holder by looking at the parameter desc's mode.  This
would prevent a costly introspection
of the class for most cases.  If you choose this approach, you should add a
comment to getDeserializer
to indicate that the class should not be a holder.

I prefer (b) since there are some performance implications involved.

P.S. +1 to your last note describing the changes.

P.S.S.  I am going to stop looking at the namespace.pop() problem and let
you solve it for now.

Thanks,

Rich Scheuerle
IBM WebSphere & Axis Web Services Development
512-838-5115  (IBM TL 678-5115)


                                                                                         
                                 
                      gdaniels@apache.                                                   
                                 
                      org                      To:       xml-axis-cvs@apache.org         
                                 
                                               cc:                                       
                                 
                      08/23/2002 01:31         Subject:  cvs commit: xml-axis/java/src/org/apache/axis/encoding
           
                      PM                        DeserializationContextImpl.java          
                                 
                      Please respond to                                                  
                                 
                      axis-dev                                                           
                                 
                                                                                         
                                 
                                                                                         
                                 



gdaniels    2002/08/23 11:31:26

  Modified:    java/src/org/apache/axis/encoding
                        DeserializationContextImpl.java
  Log:
  Back out namespaces.pop() for the nonce, and make it possible
  to pass a generic SOAPHandler as the initialHandler.

  Revision  Changes    Path
  1.51      +8 -6      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.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- DeserializationContextImpl.java            23 Aug 2002 15:08:56 -0000
       1.50
  +++ DeserializationContextImpl.java            23 Aug 2002 18:31:26 -0000
       1.51
  @@ -89,7 +89,6 @@
   import java.io.IOException;
   import java.util.ArrayList;
   import java.util.HashMap;
  -import java.util.Stack;

   /**
    * @author Glen Daniels (gdaniels@macromedia.com)
  @@ -138,7 +137,7 @@
        * @param initialHandler is the EnvelopeBuilder handler
        */
       public DeserializationContextImpl(MessageContext ctx,
  -                                      EnvelopeBuilder initialHandler)
  +                                      SOAPHandler initialHandler)
       {
           msgContext = ctx;

  @@ -146,9 +145,11 @@
           if (ctx == null || ctx.isHighFidelity())
               recorder = new SAX2EventRecorder();

  -        envelope = initialHandler.getEnvelope();
  -        envelope.setRecorder(recorder);
  -
  +        if (initialHandler instanceof EnvelopeBuilder) {
  +            envelope = ((EnvelopeBuilder)initialHandler).getEnvelope();
  +            envelope.setRecorder(recorder);
  +        }
  +
           pushElementHandler(new EnvelopeHandler(initialHandler));
       }

  @@ -931,7 +932,8 @@
               if (curElement != null)
                   curElement = (MessageElement)curElement.
getParentElement();

  -            namespaces.pop();
  +            // This breaks the types.VerifyTestCase for some reason....
  +            // namespaces.pop();

                     if (log.isDebugEnabled()) {
                   String name = curElement != null ?








Mime
View raw message