RE: Need help getting XMLStreamException: end reached! axis2 1.3

"Sharma, Vipin K" <[email protected]>
Newsgroups gmane.text.xml.axis.user
Message-ID <94424C8743C3F7479E3F25C7CC00BD4104B781A9F6@FLDP1LUMXC7V81.us.one.verizon.com>
I see one defect is also open for this , which was not fixed due to lack of information. This error message should have more clarity.

https://issues.apache.org/jira/browse/AXIS2-2188


Thanks
Vipin

From: Sharma, Vipin K
Sent: Wednesday, July 09, 2014 10:34 PM
To: '[email protected]'
Subject: RE: Need help getting XMLStreamException: end reached! axis2 1.3

On Unix machine we are able to call webservice successfully only once after java server( Standalone java program which runs some threads ) restart. And all calls after that are getting failed.
This exception doesn't say anything about exact issue.


From: Sharma, Vipin K
Sent: Wednesday, July 09, 2014 10:57 AM
To: '[email protected]'
Subject: Need help getting XMLStreamException: end reached! axis2 1.3

Hi

I am consuming a SOAP webservice , using axis2 1.3 and JDK 1.7_04. We have installed security certificate also.

Sometimes we get below exception

org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException: end reached!
        at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:239)
        at org.apache.axiom.om.impl.llom.OMStAXWrapper.updateNextNode(OMStAXWrapper.java:1014)
        at org.apache.axiom.om.impl.llom.OMStAXWrapper.<init>(OMStAXWrapper.java:179)
        at org.apache.axiom.om.impl.llom.OMElementImpl.getXMLStreamReader(OMElementImpl.java:655)
        at org.apache.axiom.om.impl.llom.OMElementImpl.getXMLStreamReaderWithoutCaching(OMElementImpl.java:634)
        at org.apache.axiom.om.impl.util.OMSerializerUtil.serializeByPullStream(OMSerializerUtil.java:523)
        at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:789)
        at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:814)
        at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:237)
        at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:225)
        at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:814)
        at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:421)
        at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:68)
        at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)
        at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:495)
        at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:1973)
        at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:993)
       at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)
        at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
        at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
        at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
        at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:520)
        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:191)
        at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:327)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:206)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:374)
        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
        at com.vipin.service.MyServiceStub.find(Unknown Source)

I tried to debug it using axis2 1.3 source code and found , this exception is coming from org.apache.axis2.util.StreamWrapper.next() method ( which is called from StAXOMBuilder.next() )
In this method state is passed as 4 ( completed ) and it throws exception.

I don't understand why it works half of the time and other time gives exception , and don't have any clue what is going wrong here.

I can see similar question in below thread of this mailing list but there wasn't any answer given to that thread.
http://mail-archives.apache.org/mod_mbox/axis-java-user/200607.mbox/%[email protected]%3e



Thanks
Vipin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.