[ http://issues.apache.org/jira/browse/WSCOMMONS-84?page=all ]
Rajith Attapattu updated WSCOMMONS-84:
--------------------------------------
Attachment: TravelAgenClient.java
Eran,
There is an error in the TravelClient I have attached in the src.tar.gz file
So I am attaching the correct file. Please note that it contains both async
and sycn invocation using serviceClient.sendReceiveNonBlocking and
serviceClient.sendReceive.
If u run with asycn in debug mode using eclipse this exception happens
if I just run it then there is no exception, however the request doesn't reach
the endpoint.
(verified this with TCPMon)
Now if u comment out the asycn invocation and run it synchronously u get the
exception right away.
note: make sure u change the repo path before you run the example
ConfigurationContext ctx =
ConfigurationContextFactory.createConfigurationContextFromFileSystem("/home/rattapat/axis2-repo",null);
> 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, src.tar.gz, TravelAgenClient.java
>
>
> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]