Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 6187 invoked from network); 21 Jul 2006 01:41:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Jul 2006 01:41:16 -0000 Received: (qmail 26779 invoked by uid 500); 21 Jul 2006 01:41:06 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 26742 invoked by uid 500); 21 Jul 2006 01:41:06 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 26731 invoked by uid 99); 21 Jul 2006 01:41:05 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jul 2006 18:41:05 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jeffreycai@gmail.com designates 64.233.182.185 as permitted sender) Received: from [64.233.182.185] (HELO nf-out-0910.google.com) (64.233.182.185) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jul 2006 18:41:04 -0700 Received: by nf-out-0910.google.com with SMTP id a4so684862nfc for ; Thu, 20 Jul 2006 18:40:43 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=DyAmlXPuV5PB8smvxvt+q83F5HmEQjXlLC8qNJ7KxEyxV7u1tjTcT4FGPhzeJA7XnXMEXfHFsfN3LcFw2+LqU9P/bNhEhiyMHeueiZq+jcjBH8wV7cRMymMv/6zLtemam8XMRPNHn3Mmp9CERnkrW/h3DiYMA9+9RFOoJt26Iok= Received: by 10.78.178.5 with SMTP id a5mr59473huf; Thu, 20 Jul 2006 18:40:43 -0700 (PDT) Received: by 10.78.185.19 with HTTP; Thu, 20 Jul 2006 18:40:43 -0700 (PDT) Message-ID: <1d6312510607201840g509697edn8472b531edb1edbe@mail.gmail.com> Date: Fri, 21 Jul 2006 09:40:43 +0800 From: "xu cai" To: axis-user@ws.apache.org, "Martin Gainty" Subject: Re: Can't generate SOAP Envelope, "org.xml.sax.SAXParseException: Premature end of file" In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_13239_32080019.1153446043251" References: <1d6312510607200241i6ca4a024o5b22413e36668197@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_13239_32080019.1153446043251 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Martin, thanks for your reply. I appreciate it. I know that it's may because the input xml is not well-formed. but, as you know, I am invoking an web-service through the generatd stub class by wsdl2java. the soap request is also generated by Axis, so I even can't see the content of the generated soap request. can anybody tell me how can I have a look at the generated soap request ? if the soap message is not well-formed, what's the possible root cause ? what should I do ? should I report a bug to axis ? or it's caused by my own code or wsdl ? thanks -xucai. On 7/21/06, Martin Gainty wrote: > > Xu- > Things to look for are is the input XML contain perhaps > missing End Tag (e.g. without a ) > Sub elements content clipped or chopped off > > ...no end tag > or missing > > Use any XML Editor such as XMLSpy or even IE in a > pinch and the XMLParser will tell you where the error/missing content occurs > Martin > ********************************************************************* > This email message and any files transmitted with it contain confidential > information intended only for the person(s) to whom this email message is > addressed. If you have received this email message in error, please > notify > the sender immediately by telephone or email and destroy the original > message without making a copy. Thank you. > > > > > ----- Original Message ----- > *From:* xu cai > *To:* axis-user@ws.apache.org ; axis-dev@ws.apache.org > *Sent:* Thursday, July 20, 2006 5:41 AM > *Subject:* Can't generate SOAP Envelope, "org.xml.sax.SAXParseException: > Premature end of file" > > > Hi All , I run a simple test class to access my webservice deployed on > axis 1.2.1 (Built on Jun 14, 2005 (09:15:57 EDT). and got an exception.The truth is soap msg can't be generated and an SAX xml exception is thrown. > Could anyone tell me what happened ? and how to fix that ? > > many thanks. > > > the src code SoapPart.java looks as: > dser.getEnvelope().setOwnerDocument(this); > // This may throw a SAXException > try { > dser.parse(); // exception > } catch (SAXException e) { > Exception real = e.getException(); > if (real == null) > real = e; > throw AxisFault.makeFault(real); > } > > Exception msg: > > AxisFault > faultCode: { > http://schemas.xmlsoap.org/soap/envelope/}Server.userException > faultSubcode: > faultString: org.xml.sax.SAXParseException : Premature end of file. > faultActor: > faultNode: > faultDetail: > {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXParseException > : > Premature end of file. > at > org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown > Source) > at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown > Source) > at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown > Source) > at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown > Source) > at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source) > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > Source) > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > Source) > at org.apache.xerces.parsers.XMLParser.parse (Unknown Source) > at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown > Source) > at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown > Source) > at javax.xml.parsers.SAXParser.parse (SAXParser.java:375) > at org.apache.axis.encoding.DeserializationContext.parse( > DeserializationContext.java:227) > at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) > at org.apache.axis.Message.getSOAPEnvelope (Message.java:424) > at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke( > MustUnderstandChecker.java:62) > at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) > at org.apache.axis.client.Call.invokeEngine (Call.java:2765) > at org.apache.axis.client.Call.invoke(Call.java:2748) > at org.apache.axis.client.Call.invoke(Call.java:2424) > at org.apache.axis.client.Call.invoke(Call.java:2347) > at org.apache.axis.client.Call.invoke(Call.java:1804) > at com.sswitch.oam.soap.intf.Bts10200SoapBindingStub.request( > Bts10200SoapBindingStub.java:297) > at com.sswitch.oam.soap.test.SimpleTest.main(SimpleTest.java :22) > > {http://xml.apache.org/axis/}hostname:sha-view1.cisco.com > > org.xml.sax.SAXParseException: Premature end of file. > at org.apache.axis.AxisFault.makeFault(AxisFault.java:101) > at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:701) > at org.apache.axis.Message.getSOAPEnvelope (Message.java:424) > at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke( > MustUnderstandChecker.java:62) > at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) > at org.apache.axis.client.Call.invokeEngine (Call.java:2765) > at org.apache.axis.client.Call.invoke(Call.java:2748) > at org.apache.axis.client.Call.invoke(Call.java:2424) > at org.apache.axis.client.Call.invoke(Call.java:2347) > at org.apache.axis.client.Call.invoke(Call.java:1804) > at com.sswitch.oam.soap.intf.Bts10200SoapBindingStub.request( > Bts10200SoapBindingStub.java:297) > at com.sswitch.oam.soap.test.SimpleTest.main(SimpleTest.java :22) > Caused by: org.xml.sax.SAXParseException: Premature end of file. > at > org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown > Source) > at org.apache.xerces.util.ErrorHandlerWrapper.fatalError (Unknown > Source) > at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown > Source) > at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown > Source) > at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source) > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > Source) > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > Source) > at org.apache.xerces.parsers.XMLParser.parse (Unknown Source) > at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown > Source) > at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown > Source) > at javax.xml.parsers.SAXParser.parse (SAXParser.java:375) > at org.apache.axis.encoding.DeserializationContext.parse( > DeserializationContext.java:227) > at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) > > -- - xucai ------=_Part_13239_32080019.1153446043251 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Martin,
     thanks for your reply. I appreciate it.
I know that it's may because the input xml is not well-formed.
but, as you know, I am invoking an web-service through the generatd stub class by wsdl2java.  the soap request is also generated by Axis, so I even can't see the content of the generated soap request.
 
can anybody tell me how can I have a look at the generated soap request ?
 
if the soap message is not well-formed, what's the possible root cause ?  what should I do ? should I report a bug to axis ? or it's caused by my own code or wsdl ?
 
thanks
-xucai.
 
 
On 7/21/06, Martin Gainty <mgainty@hotmail.com> wrote:
Xu-
Things to look for are is the input XML contain perhaps
missing End Tag (e.g. <element> without a </element>)
Sub elements content clipped or chopped off
<SOAP:header>
...no end tag
or missing <SOAP:body>

Use any XML Editor such as XMLSpy or even IE in a pinch and the XMLParser will tell you where the error/missing content occurs
Martin
*********************************************************************
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.
 

 
----- Original Message -----
From: xu cai
Sent: Thursday, July 20, 2006 5:41 AM
Subject: Can't generate SOAP Envelope, "org.xml.sax.SAXParseException: Premature end of file"

 
Hi All , I run a simple test class to access my webservice deployed on axis 1.2.1 (Built on Jun 14, 2005 (09:15:57 EDT). and got an exception. The truth is soap msg can't be generated and an SAX xml exception is thrown. Could anyone tell me what happened ? and how to fix that ?
 
many thanks.
 
 
the src code SoapPart.java looks as:
        dser.getEnvelope().setOwnerDocument(this);
        // This may throw a SAXException
        try {
            dser.parse();  // exception
        } catch (SAXException e) {
            Exception real = e.getException();
            if (real == null)
                real = e;
            throw AxisFault.makeFault(real);
        }

Exception msg:

AxisFault
 faultCode: { http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: org.xml.sax.SAXParseException : Premature end of file.
 faultActor:
 faultNode:
 faultDetail:
        { http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXParseException : Premature end of file.
        at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
        at org.apache.xerces.util.ErrorHandlerWrapper.fatalError (Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion (Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse (Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
        at javax.xml.parsers.SAXParser.parse (SAXParser.java:375)
        at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
        at org.apache.axis.Message.getSOAPEnvelope (Message.java:424)
        at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
        at org.apache.axis.client.Call.invokeEngine (Call.java:2765)
        at org.apache.axis.client.Call.invoke(Call.java:2748)
        at org.apache.axis.client.Call.invoke(Call.java:2424)
        at org.apache.axis.client.Call.invoke(Call.java:2347)
        at org.apache.axis.client.Call.invoke(Call.java:1804)
        at com.sswitch.oam.soap.intf.Bts10200SoapBindingStub.request(Bts10200SoapBindingStub.java:297)
        at com.sswitch.oam.soap.test.SimpleTest.main(SimpleTest.java :22)

        {http://xml.apache.org/axis/}hostname:sha-view1.cisco.com

org.xml.sax.SAXParseException: Premature end of file.
        at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:701)
        at org.apache.axis.Message.getSOAPEnvelope (Message.java:424)
        at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
        at org.apache.axis.client.Call.invokeEngine (Call.java:2765)
        at org.apache.axis.client.Call.invoke(Call.java:2748)
        at org.apache.axis.client.Call.invoke(Call.java:2424)
        at org.apache.axis.client.Call.invoke(Call.java:2347)
        at org.apache.axis.client.Call.invoke(Call.java:1804)
        at com.sswitch.oam.soap.intf.Bts10200SoapBindingStub.request(Bts10200SoapBindingStub.java:297)
        at com.sswitch.oam.soap.test.SimpleTest.main(SimpleTest.java :22)
Caused by: org.xml.sax.SAXParseException: Premature end of file.
        at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
        at org.apache.xerces.util.ErrorHandlerWrapper.fatalError (Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion (Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse (Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
        at javax.xml.parsers.SAXParser.parse (SAXParser.java:375)
        at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)




--
- xucai ------=_Part_13239_32080019.1153446043251--