You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Ed Sheppard <ed...@acumenassociates.com> on 2000/08/26 02:45:59 UTC
A couple of more bugs
In DeploymentDescriptor.toXML where the TypeMapping array is being written,
the code does not correctly handle a null javaType. If the javaType is null,
the code writes this attribute
javaType="null"
In DeploymentDescriptor.fromXML where the TypeMapping array is being
consumed, the code passes this value
DOMUtils.getAttribute( e, "java2XMLClassName" )
as the last argument to the TypeMapping constructor when it should be
passing
DOMUtils.getAttribute( e, "xml2JavaClassName" )
In TypeMappingSerializer.marshall, the code does not respect null values for
javaType, xml2JavaClassName and java2XMLClassName. Rather than omit the
corresponding element, the code writes something like this
<javaType xsi:type="xsd:string">null</javaType>
and as a consequence, the unmarshaller will receive the values a "null"
rather than null.
- Ed
Re: A couple of more bugs
Posted by Ed Sheppard <ed...@acumenassociates.com>.
> Hmm. javaType cannot be null
I ran into this trying to make my own array deserializer. If you look in the
SOAPMappingRegistry constructor you'll see this mapping for arrays.
// Register array deserializer for SOAP-ENC encoding style.
mapTypes(soapEncURI, arrayQName, null, null, arraySer);
so I think a null javaType is anticipated and XMLJavaMappingRegistry appears
coded to accept a null javaType for the case when only a deserializer is
being registered.
Thanks for fixing those other bugs. Any idea when they'll be available in a
released version?
- Ed
----- Original Message -----
From: "Sanjiva Weerawarana" <sa...@watson.ibm.com>
To: <so...@xml.apache.org>
Sent: Monday, August 28, 2000 10:56 PM
Subject: Re: A couple of more bugs
> Hi Ed,
>
> > In DeploymentDescriptor.toXML where the TypeMapping array is being
written,
> > the code does not correctly handle a null javaType. If the javaType is
null,
> > the code writes this attribute
> >
> > javaType="null"
>
> Hmm. javaType cannot be null - if you're mapping an XML type to a
> Java type (or vice versa) there has to be a Java type. Am I missing
> something??
>
> > In DeploymentDescriptor.fromXML where the TypeMapping array is being
> > consumed, the code passes this value
> >
> > DOMUtils.getAttribute( e, "java2XMLClassName" )
> >
> > as the last argument to the TypeMapping constructor when it should be
> > passing
> >
> > DOMUtils.getAttribute( e, "xml2JavaClassName" )
>
> Fixed!
>
> > In TypeMappingSerializer.marshall, the code does not respect null values
for
> > javaType, xml2JavaClassName and java2XMLClassName. Rather than omit the
> > corresponding element, the code writes something like this
> >
> > <javaType xsi:type="xsd:string">null</javaType>
> >
> > and as a consequence, the unmarshaller will receive the values a "null"
> > rather than null.
>
> Fixed.
>
> THanks for catching these bugs!
>
> Sanjiva.
>
>
>
Re: A couple of more bugs
Posted by Ed Sheppard <ed...@acumenassociates.com>.
> Hmm. javaType cannot be null
I ran into this trying to make my own array deserializer. If you look in the
SOAPMappingRegistry constructor you'll see this mapping for arrays.
// Register array deserializer for SOAP-ENC encoding style.
mapTypes(soapEncURI, arrayQName, null, null, arraySer);
so I think a null javaType is anticipated and XMLJavaMappingRegistry appears
coded to accept a null javaType for the case when only a deserializer is
being registered.
Thanks for fixing those other bugs. Any idea when they'll be available in a
released version?
- Ed
----- Original Message -----
From: "Sanjiva Weerawarana" <sa...@watson.ibm.com>
To: <so...@xml.apache.org>
Sent: Monday, August 28, 2000 10:56 PM
Subject: Re: A couple of more bugs
> Hi Ed,
>
> > In DeploymentDescriptor.toXML where the TypeMapping array is being
written,
> > the code does not correctly handle a null javaType. If the javaType is
null,
> > the code writes this attribute
> >
> > javaType="null"
>
> Hmm. javaType cannot be null - if you're mapping an XML type to a
> Java type (or vice versa) there has to be a Java type. Am I missing
> something??
>
> > In DeploymentDescriptor.fromXML where the TypeMapping array is being
> > consumed, the code passes this value
> >
> > DOMUtils.getAttribute( e, "java2XMLClassName" )
> >
> > as the last argument to the TypeMapping constructor when it should be
> > passing
> >
> > DOMUtils.getAttribute( e, "xml2JavaClassName" )
>
> Fixed!
>
> > In TypeMappingSerializer.marshall, the code does not respect null values
for
> > javaType, xml2JavaClassName and java2XMLClassName. Rather than omit the
> > corresponding element, the code writes something like this
> >
> > <javaType xsi:type="xsd:string">null</javaType>
> >
> > and as a consequence, the unmarshaller will receive the values a "null"
> > rather than null.
>
> Fixed.
>
> THanks for catching these bugs!
>
> Sanjiva.
>
>
>
Re: A couple of more bugs
Posted by Sanjiva Weerawarana <sa...@watson.ibm.com>.
Hi Ed,
> In DeploymentDescriptor.toXML where the TypeMapping array is being written,
> the code does not correctly handle a null javaType. If the javaType is null,
> the code writes this attribute
>
> javaType="null"
Hmm. javaType cannot be null - if you're mapping an XML type to a
Java type (or vice versa) there has to be a Java type. Am I missing
something??
> In DeploymentDescriptor.fromXML where the TypeMapping array is being
> consumed, the code passes this value
>
> DOMUtils.getAttribute( e, "java2XMLClassName" )
>
> as the last argument to the TypeMapping constructor when it should be
> passing
>
> DOMUtils.getAttribute( e, "xml2JavaClassName" )
Fixed!
> In TypeMappingSerializer.marshall, the code does not respect null values for
> javaType, xml2JavaClassName and java2XMLClassName. Rather than omit the
> corresponding element, the code writes something like this
>
> <javaType xsi:type="xsd:string">null</javaType>
>
> and as a consequence, the unmarshaller will receive the values a "null"
> rather than null.
Fixed.
THanks for catching these bugs!
Sanjiva.
Re: A couple of more bugs
Posted by Sanjiva Weerawarana <sa...@watson.ibm.com>.
Hi Ed,
> In DeploymentDescriptor.toXML where the TypeMapping array is being written,
> the code does not correctly handle a null javaType. If the javaType is null,
> the code writes this attribute
>
> javaType="null"
Hmm. javaType cannot be null - if you're mapping an XML type to a
Java type (or vice versa) there has to be a Java type. Am I missing
something??
> In DeploymentDescriptor.fromXML where the TypeMapping array is being
> consumed, the code passes this value
>
> DOMUtils.getAttribute( e, "java2XMLClassName" )
>
> as the last argument to the TypeMapping constructor when it should be
> passing
>
> DOMUtils.getAttribute( e, "xml2JavaClassName" )
Fixed!
> In TypeMappingSerializer.marshall, the code does not respect null values for
> javaType, xml2JavaClassName and java2XMLClassName. Rather than omit the
> corresponding element, the code writes something like this
>
> <javaType xsi:type="xsd:string">null</javaType>
>
> and as a consequence, the unmarshaller will receive the values a "null"
> rather than null.
Fixed.
THanks for catching these bugs!
Sanjiva.