You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by "Eran Chinthaka (JIRA)" <ji...@apache.org> on 2006/09/06 21:28:23 UTC

[jira] Commented: (WSCOMMONS-84) Cannot serialize SOAP message (java.lang.RuntimeException: Can not serialize OM Element Envelope)

    [ http://issues.apache.org/jira/browse/WSCOMMONS-84?page=comments#action_12432944 ] 
            
Eran Chinthaka commented on WSCOMMONS-84:
-----------------------------------------

This happens when some one tries to re-use an instance of XMLStreamWriter.

I can not re-create the problem, as some of the classes are missing. Its better if you can help us re-create the problem, by sending a small test case.

Thanks,
Chinthaka

> Cannot serialize SOAP message (java.lang.RuntimeException: Can not serialize OM Element Envelope)
> -------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-84
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-84
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>         Environment: Here is my environment
> ==================================
> stax.api.version=1.0.1
> stax.impl.artifactid=wstx
> stax.impl.groupid=woodstox
> stax.impl.version=asl-3.0.0
> stax_utils.version=20060501
> XmlSchema.version=SNAPSHOT
> JDK 1.5 (sun) , fc 5 (fedora)
> ===================================
>            Reporter: Rajith Attapattu
>         Attachments: source.tar.gz
>
>
> I get the following exception when I try to print my SOAP message.
> I am wondering what is triggering this. I have attached my code sample as well, in case u wanna have a look at it.
>  Exception in thread "main" java.lang.RuntimeException: Can not serialize OM Element Envelope
>     [java]      at org.apache.axiom.om.impl.llom.OMElementImpl.toString(OMElementImpl.java:893)
>     [java]      at java.lang.String.valueOf(String.java:2615)
>     [java]      at java.io.PrintStream.print(PrintStream.java:616)
>     [java]      at java.io.PrintStream.println(PrintStream.java:753)
>     [java]      at sample.enterprise.client.TravelAgenClient.main(TravelAgenClient.java:47)
>     [java] Caused by: javax.xml.stream.XMLStreamException: Can not output XML declaration, after other output has already been done.
>     [java]      at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1691)
>     [java]      at com.ctc.wstx.sw.BaseStreamWriter.reportNwfStructure(BaseStreamWriter.java:1720)
>     [java]      at com.ctc.wstx.sw.BaseStreamWriter.doWriteStartDocument(BaseStreamWriter.java:720)
>     [java]      at com.ctc.wstx.sw.BaseStreamWriter.writeStartDocument(BaseStreamWriter.java:708)
>     [java]      at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:173)
>     [java]      at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:748)
>     [java]      at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:763)
>     [java]      at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:748)
>     [java]      at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:763)
>     [java]      at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:748)
>     [java]      at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:763)
>     [java]      at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:748)
>     [java]      at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:763)
>     [java]      at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:177)
>     [java]      at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:748)
>     [java]      at org.apache.axiom.om.impl.llom.OMNodeImpl.serialize(OMNodeImpl.java:324)
>     [java]      at org.apache.axiom.om.impl.llom.OMNodeImpl.serialize(OMNodeImpl.java:362)
>     [java]      at org.apache.axiom.om.impl.llom.OMElementImpl.toString(OMElementImpl.java:891)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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