gdaniels    2003/05/28 07:21:56

  Modified:    java/src/org/apache/axis/encoding
                        SerializationContextImpl.java
                        SerializationContext.java DeserializerImpl.java
               java/src/org/apache/axis AxisFault.java
  Log:
  Don't use multiref serialization when writing fault details, since it
  currently confuses the type-based deserialization code, which only
  looks at the xsi:type attribute on the child elements of <details>.
  
  Remove a couple of redundant casts in DeserializerImpl while
  we're at it.
  
  Revision  Changes    Path
  1.92      +8 -0      
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.91
  retrieving revision 1.92
  diff -u -r1.91 -r1.92
  --- SerializationContextImpl.java     22 Apr 2003 19:34:25 -0000      1.91
  +++ SerializationContextImpl.java     28 May 2003 14:21:55 -0000      1.92
  @@ -328,6 +328,14 @@
       }
   
       /**
  +     * Are we doing multirefs?
  +     * @return true or false
  +     */
  +    public boolean getDoMultiRefs() {
  +        return doMultiRefs;
  +    }
  +
  +    /**
        * Set whether we are doing multirefs
        */
       public void setDoMultiRefs (boolean shouldDo)
  
  
  
  1.88      +6 -0      
xml-axis/java/src/org/apache/axis/encoding/SerializationContext.java
  
  Index: SerializationContext.java
  ===================================================================
  RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/encoding/SerializationContext.java,v
  retrieving revision 1.87
  retrieving revision 1.88
  diff -u -r1.87 -r1.88
  --- SerializationContext.java 22 Apr 2003 19:34:25 -0000      1.87
  +++ SerializationContext.java 28 May 2003 14:21:55 -0000      1.88
  @@ -148,6 +148,12 @@
        * @param pretty true/false
        */
       public void setPretty(boolean pretty);
  +    
  +    /**
  +     * Are we doing multirefs?
  +     * @return true or false
  +     */ 
  +    public boolean getDoMultiRefs();
   
       /**
        * Set whether we are doing multirefs.
  
  
  
  1.35      +2 -2      xml-axis/java/src/org/apache/axis/encoding/DeserializerImpl.java
  
  Index: DeserializerImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-axis/java/src/org/apache/axis/encoding/DeserializerImpl.java,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- DeserializerImpl.java     22 Apr 2003 19:34:24 -0000      1.34
  +++ DeserializerImpl.java     28 May 2003 14:21:55 -0000      1.35
  @@ -407,7 +407,7 @@
   
                   if( !href.startsWith("#") && defaultType != null && ref instanceof 
Part ){
                       //For attachments this is the end of the road-- invoke 
deserializer
  -                    Deserializer dser = 
(Deserializer)context.getDeserializerForType(defaultType );
  +                    Deserializer dser = context.getDeserializerForType(defaultType 
);
                       if(null != dser){          
                         dser.startElement(namespace, localName,
                                prefix, attributes,
  @@ -470,7 +470,7 @@
               // a specific deserializer.  So create one using the
               // attribute type qname.
               if (type != null) {
  -                Deserializer dser = 
(Deserializer)context.getDeserializerForType(type);
  +                Deserializer dser = context.getDeserializerForType(type);
                   if (dser != null) {
                       // Move the value targets to the new deserializer
                       dser.moveValueTargets(this);
  
  
  
  1.76      +3 -0      xml-axis/java/src/org/apache/axis/AxisFault.java
  
  Index: AxisFault.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/AxisFault.java,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- AxisFault.java    21 May 2003 20:04:30 -0000      1.75
  +++ AxisFault.java    28 May 2003 14:21:55 -0000      1.76
  @@ -772,7 +772,10 @@
               // the details.
           }
           if (haveSerializer) {
  +            boolean oldMR = context.getDoMultiRefs();
  +            context.setDoMultiRefs(false);
               context.serialize(qname, null, detailObject);
  +            context.setDoMultiRefs(oldMR);
           }
       }
   
  
  
  

Reply via email to