axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eran Chinthaka" <eran.chinth...@gmail.com>
Subject Re: AXIOM bug or feature
Date Sat, 26 Jul 2008 04:21:51 GMT
I guess this is a bug. No question about it.

But ..... Axiom is an XML object model designed to be high performant. We
can do hundreds of checks like this to make sure its integrity, conformance,
etc., IMHO, there is a part from the users side also to make things work, if
he needs performance.

We didn't design Axiom to be bullet-proof. We sometimes purposely avoided
checks like this. You can easily avoid this error by setting the attr to ""
instead of setting to null. I am not defending Axiom team or anything, it is
just that these sorts of things can be avoided.

If it is that there is a problem in Axiom not serializing some info, then
I'd have fixed it. But these sorts of errors, I personally don't think we
should put as high priority, IMHO.

On Tue, Jul 22, 2008 at 6:54 AM, Pierre Muller <pmuller@gfi.fr> wrote:

>  Hello,
>
> There seems to be a minor bug - or perhaps feature - in AXIOM :
> One may set  the attribute of an OMElement to "null" without having any
> error.
> But this OMElement can't be returned (as an operation response) nor be
> converted to String (e.g for display purpose) : a
> "java.lang.NullPointerException" is thrown at this time.
> Why doesn't the null attribute value get converted to an empty string, or
> why doesn't the attribute simply get discarded ?
>
> Thanks,
> Pierre Muller
>
>
>
> *Example trace when trying to display an OMElement with a null attribute :
>
>
> Exception in thread "main" java.lang.NullPointerException
>     at
> com.ctc.wstx.sw.BaseNsStreamWriter.doWriteAttr(BaseNsStreamWriter.java:468)
>     at
> com.ctc.wstx.sw.BaseNsStreamWriter.writeAttribute(BaseNsStreamWriter.java:230)
>     at
> org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeAttribute(MTOMXMLStreamWriter.java:178)
>     at
> org.apache.axiom.om.impl.util.OMSerializerUtil.serializeStartpart(OMSerializerUtil.java:443)
>     at
> org.apache.axiom.om.impl.util.OMSerializerUtil.serializeStartpart(OMSerializerUtil.java:197)
>     at
> org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:901)
>     at
> org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:889)
>     at
> org.apache.axiom.om.impl.llom.OMNodeImpl.serialize(OMNodeImpl.java:375)
>     at
> org.apache.axiom.om.impl.llom.OMElementImpl.toString(OMElementImpl.java:1051)
> *
>
> **************************
> Si vous n'êtes pas le destinataire désigné de ce message ou une personne
> autorisée à l'utiliser, toute distribution, copie, publication ou usage à
> quelques fins que ce soit des informations dans ce message sont interdits.
> Merci d'informer immédiatement l'expéditeur par messagerie, et, de détruire
> ce message.
> This e-mail is confidential. If you are not the addressee or an authorized
> recipient of this message, any distribution, copying, publication or use of
> this information for any purpose is prohibited. Please notify the sender
> immediately by e-mail and then delete this message.
> **************************
>
>
>  --------------------------------------------------------------------- To
> unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For additional
> commands, e-mail: axis-user-help@ws.apache.org




-- 
With Mettha,
Eran Chinthaka

--------------------------------------------------------------------
Health is the greatest gift; contentment is the greatest wealth; trusting is
the best relationship; nirvana is the highest joy. - Dhammapada

Mime
View raw message