You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@ws.apache.org by Simon Fell <so...@zaks.demon.co.uk> on 2002/06/09 20:55:22 UTC

[PATCH] Re: xsi:null handling

I've attached a patch for this. I've also attached a patch for the
interop sample deployment descriptor, which was using empty namespaces
with a prefix [ xmlns:x="" ] which isn't valid, and Xerces (2.0.1) was
throwing an error.


Cheers
Simon
www.pocketsoap.com

On Sun, 9 Jun 2002 01:13:53 +0600, in soap you wrote:

>Hi Simon,
>
>Was this in the 2.3 codebase? If so I agree this'll be a big
>problem and probably sufficient cause for a 2.3.1 to be 
>released ASAP.
>
>I agree it needs to be fixed right to work with both XSD
>versions.
>
>Thanks!
>
>Sanjiva.
>
>----- Original Message ----- 
>From: "Simon Fell" <so...@zaks.demon.co.uk>
>To: <so...@xml.apache.org>
>Sent: Saturday, June 08, 2002 8:45 AM
>Subject: xsi:null handling
>
>
>> I noticed that Apache SOAP always serializes NULLs with
>> xsi:null="true", the problem is that for the 2001 schema version there
>> is no null attribute it got renamed to nil.
>> 
>> The quick fix is to change the definition of ATTR_NULL in
>> constants.java, however it looks like the code supports both 1999 and
>> 2001 schema, so really it needs to pick the correct attribute name
>> based on the schema version in use.
>> 
>> This will be a significant interop issue for people using nulls
>> between Apache and non-Apache toolkits.
>> 
>> Cheers
>> Simon
>> www.pocketsoap.com


RE: [PATCH] Re: xsi:null handling

Posted by "Matthew J. Duftler" <du...@watson.ibm.com>.
Hi Simon,

Thanks for the patches.

I've applied the xsi:nil patch. I had to make some changes, however. As it
was written, the patch would never actually use xsi:null, only xsi:nil. The
code was checking the Constants.NS_URI_CURRENT_SCHEMA_XSI constant, which
will only change if someone changes it, and recompiles. I changed the code
to check the namespace of the actual items being operated on. Also, in
testing this, I had to write some code that specified the 2 older
namespaces. It appears that only the xsd namespace was respecting the
"use-older-schema-version" request. I've fixed it so the xsi namespace is
also affected.

With respect to the other patch, have you checked that the interop sample
still works? I see what you mean about the syntax being wrong, I just want
to make sure we don't create a different problem by changing it now.

Thanks,
-Matt

> -----Original Message-----
> From: Simon Fell [mailto:soap@zaks.demon.co.uk]
> Sent: Sunday, June 09, 2002 2:55 PM
> To: soap-dev@xml.apache.org
> Subject: [PATCH] Re: xsi:null handling
>
>
> I've attached a patch for this. I've also attached a patch for the
> interop sample deployment descriptor, which was using empty namespaces
> with a prefix [ xmlns:x="" ] which isn't valid, and Xerces (2.0.1) was
> throwing an error.
>
>
> Cheers
> Simon
> www.pocketsoap.com
>
> On Sun, 9 Jun 2002 01:13:53 +0600, in soap you wrote:
>
> >Hi Simon,
> >
> >Was this in the 2.3 codebase? If so I agree this'll be a big
> >problem and probably sufficient cause for a 2.3.1 to be
> >released ASAP.
> >
> >I agree it needs to be fixed right to work with both XSD
> >versions.
> >
> >Thanks!
> >
> >Sanjiva.
> >
> >----- Original Message -----
> >From: "Simon Fell" <so...@zaks.demon.co.uk>
> >To: <so...@xml.apache.org>
> >Sent: Saturday, June 08, 2002 8:45 AM
> >Subject: xsi:null handling
> >
> >
> >> I noticed that Apache SOAP always serializes NULLs with
> >> xsi:null="true", the problem is that for the 2001 schema version there
> >> is no null attribute it got renamed to nil.
> >>
> >> The quick fix is to change the definition of ATTR_NULL in
> >> constants.java, however it looks like the code supports both 1999 and
> >> 2001 schema, so really it needs to pick the correct attribute name
> >> based on the schema version in use.
> >>
> >> This will be a significant interop issue for people using nulls
> >> between Apache and non-Apache toolkits.
> >>
> >> Cheers
> >> Simon
> >> www.pocketsoap.com
>
>


RE: [PATCH] Re: xsi:null handling

Posted by "Matthew J. Duftler" <du...@watson.ibm.com>.
Hi Simon,

Thanks for the patches.

I've applied the xsi:nil patch. I had to make some changes, however. As it
was written, the patch would never actually use xsi:null, only xsi:nil. The
code was checking the Constants.NS_URI_CURRENT_SCHEMA_XSI constant, which
will only change if someone changes it, and recompiles. I changed the code
to check the namespace of the actual items being operated on. Also, in
testing this, I had to write some code that specified the 2 older
namespaces. It appears that only the xsd namespace was respecting the
"use-older-schema-version" request. I've fixed it so the xsi namespace is
also affected.

With respect to the other patch, have you checked that the interop sample
still works? I see what you mean about the syntax being wrong, I just want
to make sure we don't create a different problem by changing it now.

Thanks,
-Matt

> -----Original Message-----
> From: Simon Fell [mailto:soap@zaks.demon.co.uk]
> Sent: Sunday, June 09, 2002 2:55 PM
> To: soap-dev@xml.apache.org
> Subject: [PATCH] Re: xsi:null handling
>
>
> I've attached a patch for this. I've also attached a patch for the
> interop sample deployment descriptor, which was using empty namespaces
> with a prefix [ xmlns:x="" ] which isn't valid, and Xerces (2.0.1) was
> throwing an error.
>
>
> Cheers
> Simon
> www.pocketsoap.com
>
> On Sun, 9 Jun 2002 01:13:53 +0600, in soap you wrote:
>
> >Hi Simon,
> >
> >Was this in the 2.3 codebase? If so I agree this'll be a big
> >problem and probably sufficient cause for a 2.3.1 to be
> >released ASAP.
> >
> >I agree it needs to be fixed right to work with both XSD
> >versions.
> >
> >Thanks!
> >
> >Sanjiva.
> >
> >----- Original Message -----
> >From: "Simon Fell" <so...@zaks.demon.co.uk>
> >To: <so...@xml.apache.org>
> >Sent: Saturday, June 08, 2002 8:45 AM
> >Subject: xsi:null handling
> >
> >
> >> I noticed that Apache SOAP always serializes NULLs with
> >> xsi:null="true", the problem is that for the 2001 schema version there
> >> is no null attribute it got renamed to nil.
> >>
> >> The quick fix is to change the definition of ATTR_NULL in
> >> constants.java, however it looks like the code supports both 1999 and
> >> 2001 schema, so really it needs to pick the correct attribute name
> >> based on the schema version in use.
> >>
> >> This will be a significant interop issue for people using nulls
> >> between Apache and non-Apache toolkits.
> >>
> >> Cheers
> >> Simon
> >> www.pocketsoap.com
>
>