chrisjleu
chrisjleu

Reputation: 4380

Axis2 version 1.3 exception org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException: end reached

I get a rather unhelpful stack trace when attempting to make SOAP call over SSL to another service. I'm using (sigh) Axis2 version 1.3. The unchecked OMException comes from axiom-api version 1.2.5, which wraps the underlying XMLStreamException - and the not-so-useful "end reached!" message (yes, it even has an exclamation mark).

I would say some kind of unexpected response has come back from the remote system and Axis2 doesn't know how to handle it, but I'd like a more detailed explanation if anybody has one.

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:499)
at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
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)

Upvotes: 2

Views: 1940

Answers (1)

chrisjleu
chrisjleu

Reputation: 4380

There was a problem with an invalid certificate on the target server that caused this if that helps point people in the right direction.

Upvotes: 3

Related Questions