You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Scott Kurz (JIRA)" <tu...@ws.apache.org> on 2007/09/28 17:36:52 UTC

[jira] Updated: (TUSCANY-1818) XMLStreamSerializer - IllegalStateException caused by unnecessary XMLStreamWriter calls

     [ https://issues.apache.org/jira/browse/TUSCANY-1818?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Kurz updated TUSCANY-1818:
--------------------------------

    Attachment: 1818.patch

> XMLStreamSerializer -  IllegalStateException caused by unnecessary XMLStreamWriter calls
> ----------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1818
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1818
>             Project: Tuscany
>          Issue Type: Improvement
>    Affects Versions: Java-SCA-Next
>            Reporter: Scott Kurz
>            Priority: Minor
>         Attachments: 1818.patch
>
>
> Hit the following error when using an XLXP impl of StAX. 
> java.lang.IllegalStateException: writeNamespace() can only be called following writeStartElement() or writeEmptyElement().
> 	at com.ibm.xml.xlxp.api.stax.msg.StAXMessageProvider.throwIllegalStateException(StAXMessageProvider.java:45)
> 	at com.ibm.xml.xlxp.api.stax.XMLStreamWriterBase.writeNamespace(XMLStreamWriterBase.java:514)
> 	at com.ibm.xml.xlxp.api.stax.XMLOutputFactoryImpl$XMLStreamWriterProxy.writeNamespace(XMLOutputFactoryImpl.java:148)
> 	at org.apache.tuscany.sca.databinding.xml.XMLStreamSerializer.serializeNamespace(XMLStreamSerializer.java:227)
> 	at org.apache.tuscany.sca.databinding.xml.XMLStreamSerializer.serializeElement(XMLStreamSerializer.java:198)
> 	at org.apache.tuscany.sca.databinding.xml.XMLStreamSerializer.serializeNode(XMLStreamSerializer.java:243)
> 	at org.apache.tuscany.sca.databinding.xml.XMLStreamSerializer.serialize(XMLStreamSerializer.java:70)
> 	at org.apache.tuscany.sca.databinding.xml.StAXHelper.save(StAXHelper.java:76)
> Call sequence of:
>   writer.writeStartElement(...)
>   writer.writeNamespace(...)
>   writer.setPrefix(...)
>   writer.writeNamespace(...)
>   writer.setPrefix(...)
> is not tolerated by XLXP.     
> I believe the setPrefix() calls are unnecessary since the prefix is passed into writeNamespace(), and that this should be fine with other Stax impls like Woodstox.  
> I'll attach a patch today. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org