You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by kk...@bankofny.com on 2003/05/30 21:41:33 UTC

Problem reading from file

I thought I could solve my own problem by reading in the 
complete XML document from the file system, but it isn't
working. The error message I get is probably misleading,
so I could use some help. What am I doing wrong?

I kept trimming things out of the XML file till I got it down
to:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope 
        xmlns:env="http://www.w3.org/2001/09/soap-envelope" 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
</env:Envelope>

When I try this:

FileInputStream fis = null;
try {fis = new FileInputStream ( inputfile);}
catch ( FileNotFoundException fofe )
{ System.out.println("Error: " + fofe.toString());}
SOAPEnvelope request = new SOAPEnvelope( fis ); 

I get this error:

Exception in thread "main" Version Mismatch
at 
org.apache.axis.message.EnvelopeBuilder.startElement(EnvelopeBuilder.java:138)
at 
org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:962)
at 
weblogic.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376)
at 
weblogic.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1183)
at 
weblogic.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1876)
at 
weblogic.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1019)
at 
weblogic.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:967)
at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:123)
at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:125)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at 
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:242)
at org.apache.axis.message.SOAPEnvelope.<init>(SOAPEnvelope.java:158)
at TestFileImport.doit(TestFileImport.java:53)
at TestFileImport.main(TestFileImport.java:71)


-- 
Ken Kress                                     kkress@bankofny.com
SAS, The Bank of New York                            484.605.4834

________________________________________________________________________
The information in this e-mail, and any attachment therein, is confidential and for use by the addressee only. If you are not the intended recipient, please return the e-mail to the sender and delete it from your computer. Although The Bank of New York attempts to sweep e-mail and attachments for viruses, it does not guarantee that either are virus-free and accepts no liability for any damage sustained as a result of viruses.