On Thu, 27 Jun 2002, Sam Ruby wrote: > +1. Lets start with the wire dump, and determine the correct fix. > > For reference, > > http://www.w3.org/TR/xmlschema-0/#Nils > http://www.w3.org/TR/2000/CR-xmlschema-0-20001024/#Nulls > > The original Apache SOAP didn't support 2001 schema because, well, it > wasn't invented yet. ;-)
Ok, I'll try to get to a dump - I almost replaced apacheSOAP on the client side, I need to go back in CVS to recreate the problem. The question is not if ApacheSOAP supports 2001 schema, but if ApacheAXIS supports ( and can interoperate ) with the 2000 schema. As I said in the previous mail, there is no visible code that deals with the 'null' case - at least in DeserializerImpl.startElement(). > The first attempts to support 2001 schema were incomplete. Let's figure > out where this bug exists, how pervasive the problem is (was it merely > a recent regression that has or has not already been fixed, etc), and > determine the correct course of action from there. IMHO adding a simple extra check and dealing with old code is trivial diff -u -r1.14 DeserializerImpl.java --- src/org/apache/axis/encoding/DeserializerImpl.java 31 May 2002 19:08:07 -0000 1.14 +++ src/org/apache/axis/encoding/DeserializerImpl.java 27 Jun 2002 20:08:38 -0000 @@ -331,7 +331,14 @@ isNil = true; return; } - + nil = Constants.getValue(attributes, + Constants.URIS_SCHEMA_XSI, + "null"); + if (nil != null && nil.equals("true")) { + value = null; + isNil = true; + return; + } Finding who is guilty and fixing apacheSOAP ( or asking people to upgrade to the latest apache soap release ) is not that trivial. > >>- change the bean introspector to see if the attribute is Hashtable > >>I couldn't understand the code, so I can't do that. > > One place to start is with the > >http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-axis/java/src/org/apache/axis/utils/JavaUtils.java > class and take a look at the isConvertable and Convert methods. I'll take a look. The problem is that Map is deserialized to a HashMap by default - and if the fix is done at that stage we'll have to convert the HashMap to a Hashtable and that's quite expensive. We're talking about: <multiRef id="id5" SOAP-ENC:root="0" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns8:Map" xmlns:ns8="http://xml.apache.org/xml-soap" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"/> The Map is in an apache namespace, and I'm pretty sure ApacheSOAP will create Hashtables. That means code written with ApacheSOAP will not work with axis. I'm not sure it's ok to change the mapping between a java type and an xml namespace in any case - but at least providing some backward compatibility would help. > I'm not sure everybody realizes this (perhaps not even Costin), but > Costin is a committer to xml-soap. So now it's my fault :-) ? I had no idea, I'm way too busy with tomcat, ant and commons - and now with the fun of migrating some apps from ApacheSoap to axis. Costin