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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to