You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@xml.apache.org by ru...@apache.org on 2002/04/12 01:22:04 UTC

cvs commit: xml-soap/java/src/org/apache/soap/encoding SOAPMappingRegistry.java

rubys       02/04/11 16:22:04

  Modified:    java/src/org/apache/soap/encoding SOAPMappingRegistry.java
  Log:
  Fix a bug that prevents the default encoding from being correctly applied.
  
  The SOAPMappingRegistry class, a subclass of XMLJavaMappingRegistry, now support
  chaining, i.e. an instance has a parent, with the parent being null for the
  "root" instance.  When looking up a mapping, the chain is followed if necessary
  to resolve the mapping.
  
  The XMLJavaMappingRegistry class has a method setDefaultEncodingStyle, which
  sets the default encoding style.  When this method is called on a
  SOAPMappingRegistry instance, the default encoding style is set only for the
  particular link in the chain.  It is *not* set for the parent (and recursively
  for all parents).  This breaks the proper application of the default.
  
  Submitted by:	Scott Nichol <sn...@computer.org>
  
  Revision  Changes    Path
  1.28      +10 -0     xml-soap/java/src/org/apache/soap/encoding/SOAPMappingRegistry.java
  
  Index: SOAPMappingRegistry.java
  ===================================================================
  RCS file: /home/cvs/xml-soap/java/src/org/apache/soap/encoding/SOAPMappingRegistry.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- SOAPMappingRegistry.java	6 Dec 2001 19:37:44 -0000	1.27
  +++ SOAPMappingRegistry.java	11 Apr 2002 23:22:04 -0000	1.28
  @@ -425,6 +425,16 @@
       }
     }
   
  +  /** Set the default encoding style.  If the query*() calls
  +   * are invoked with a null encodingStyleURI parameter, we'll
  +   * use this instead.
  +   */
  +  public void setDefaultEncodingStyle(String defEncStyle) {
  +      super.setDefaultEncodingStyle(defEncStyle);
  +      if (parent != null)
  +	      parent.setDefaultEncodingStyle(defEncStyle);
  +  }
  +
     /**
      * Return the schemaURI that was used to create this registry
      * instance.