File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes javax.xml.stream.XMLStreamException: Undeclared prefix 'soapenv' for element <soapenv:Envelope> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "javax.xml.stream.XMLStreamException: Undeclared prefix Watch "javax.xml.stream.XMLStreamException: Undeclared prefix New topic
Author

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

Praveen Kumar Jayaram
Ranch Hand

Joined: Jul 14, 2008
Posts: 56
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?


Praveen
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javax.xml.stream.XMLStreamException: Undeclared prefix 'soapenv' for element <soapenv:Envelope>