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 Juan Luis de Amaya Robles <jl...@concatel.com> on 2005/08/22 14:06:43 UTC

org.xml.sax.SAXParseException: Premature end of file.

 
Hi,

my webservice runs on tomcat 4.1, jre 1.5.0.
I use java2wsdl ant task to generate wsdd file.

When I run my test-example returns:

Exception in thread "main" 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
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXPar
seException(ErrorHandlerWrapper.java:236)
	at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(E
rrorHandlerWrapper.java:215)
	at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XML
ErrorReporter.java:386)
	at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XML
ErrorReporter.java:316)
	at
com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocV
ersion(XMLVersionDetector.java:230)
	at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML1
1Configuration.java:798)
	at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML1
1Configuration.java:764)
	at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.jav
a:148)
	at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Abstr
actSAXParser.java:1242)
	at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
	at
org.apache.axis.encoding.DeserializationContext.parse(DeserializationCon
text.java:227)
	at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
	at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
	at
org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java
:796)
	at
org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
	at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.j
ava:32)
	at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
	at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
	at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
	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 pfw.searcher.Test.testWS(Test.java:48)
	at pfw.searcher.Test.main(Test.java:54)


Wssd generated is:

<deployment
    xmlns="http://xml.apache.org/axis/wsdd/"
    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">

  <!-- Services from SearcherBeanService WSDL service -->

  <service name="SearcherService" provider="java:RPC" style="wrapped"
use="literal">
      <parameter name="wsdlTargetNamespace" value="url:SEARCHER"/>
      <parameter name="wsdlServiceElement" value="SearcherBeanService"/>
      <parameter name="schemaQualified" value="url:SEARCHER"/>
      <parameter name="wsdlServicePort" value="SearcherService"/>
      <parameter name="className" value="pfw.searcher.SearcherBean"/>
      <parameter name="wsdlPortType" value="SearcherBean"/>
      <parameter name="typeMappingVersion" value="1.2"/>
      <operation name="search" qname="operNS:search"
xmlns:operNS="url:SEARCHER" returnQName="retNS:searchReturn"
xmlns:retNS="url:SEARCHER" returnType="rtns:MyHits"
xmlns:rtns="url:SEARCHER" soapAction="" >
        <parameter qname="pns:query" xmlns:pns="url:SEARCHER"
type="tns:string" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
      </operation>
      <operation name="index" qname="operNS:index"
xmlns:operNS="url:SEARCHER" returnQName="retNS:indexReturn"
xmlns:retNS="url:SEARCHER" returnType="rtns:string"
xmlns:rtns="http://www.w3.org/2001/XMLSchema" soapAction="" >
        <parameter qname="pns:path" xmlns:pns="url:SEARCHER"
type="tns:string" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
      </operation>
      <parameter name="allowedMethods" value="index search"/>

      <arrayMapping
        xmlns:ns="url:SEARCHER"
        qname="ns:ArrayOf_xsd_string"
        type="java:java.lang.String[]"
        innerType="cmp-ns:string"
xmlns:cmp-ns="http://www.w3.org/2001/XMLSchema"
        encodingStyle=""
      />
      <typeMapping
        xmlns:ns="url:SEARCHER"
        qname="ns:MyHits"
        type="java:pfw.searcher.client.MyHits"
        serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
 
deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
        encodingStyle=""
      />
  </service>
</deployment>


What's up?
Anybody helps me?


Thank u.

Re: org.xml.sax.SAXParseException: Premature end of file.

Posted by Kr <ba...@gmail.com>.
there can be some problem in your response soap message. monitor
request and response soap messages. may be the soap message is not
well-formed and valid.