Committers: I believe I have located a bug in the current Apache SOAP source 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. The attached patch properly overrides setDefaultEncodingStyle for SOAPMappingRegistry. Scott Nichol
--- i:\xml-soap\java\src\org\apache\soap\encoding\SOAPMappingRegistry.java Tue Apr 09 07:20:18 2002 +++ i:\xml-soap\java\src\org\apache\soap\encoding-fix\SOAPMappingRegistry.java Tue +Apr 09 13:49:18 2002 @@ -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.