Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javax.xml.stream.XMLStreamException: Undeclared prefix 'soapenv' for element <soapenv:Envelope>

 
Praveen Kumar Jayaram
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Am trying to access a SharePoint webservice from Axis2 Java client in Linux box.....
The code works fine in Windows but in Linux I get a Exception:

javax.xml.stream.XMLStreamException: Undeclared prefix 'soapenv' for element <soapenv:Envelope>
at com.ctc.wstx.stax.stream.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:588)
at com.ctc.wstx.stax.WstxNsStreamWriter.writeStartOrEmpty(WstxNsStreamWriter.java:664)
at com.ctc.wstx.stax.WstxNsStreamWriter.writeStartElement(WstxNsStreamWriter.java:423)
at org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeStartElement(MTOMXMLStreamWriter.java:111)
at org.apache.axiom.om.impl.util.OMSerializerUtil.serializeStartpart(OMSerializerUtil.java:275)
at org.apache.axiom.om.impl.util.OMSerializerUtil.serializeStartpart(OMSerializerUtil.java:197)
at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:221)
at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:947)
at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:471)
at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:79)
... 32 more


Here is the code:




Any idea why this can happen?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic