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 Jeremy Nix <Je...@sfsltd.com> on 2005/04/11 15:46:16 UTC

Axis 1.2RC2 generating "Premature end of file" error

I can't seem to figure out the cause of this error.  Snooping the
request/response, it appears that the response from the Axis server is
invalid, but I'm not positive.  Here's my WSDL, the snooped request, and
the snooped response.

WSDL:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://abstractor.webservices.sfsltd.com"
xmlns:xsd1="http://abstractor.webservices.sfsltd.com"
targetNamespace="http://abstractor.webservices.sfsltd.com"
name="Abstractor">
 <wsdl:import namespace="http://abstractor.webservices.sfsltd.com"
location="AbstractorTypes.xsd"/>
 <wsdl:message name="MessageGetTitleSearchIn">
  <wsdl:part name="authentication" element="xsd1:Authentication"/>
 </wsdl:message>
 <wsdl:message name="MessageGetTitleSearchOut">
  <wsdl:part name="arg1" element="xsd1:TitleSearch"/>
 </wsdl:message>
 <wsdl:portType name="AbstractorSoapPort">
  <wsdl:operation name="getTitleSearch">
   <wsdl:input message="tns:MessageGetTitleSearchIn"/>
   <wsdl:output message="tns:MessageGetTitleSearchOut"/>
  </wsdl:operation>
 </wsdl:portType>
 <wsdl:binding name="AbstractorBinding" type="tns:AbstractorSoapPort">
  <soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
  <wsdl:operation name="getTitleSearch">
   <soap:operation soapAction="getTitleSearch"/>
   <wsdl:input>
    <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://abstractor.webservices.sfsltd.com" use="encoded"/>
   </wsdl:input>
   <wsdl:output>
    <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://abstractor.webservices.sfsltd.com" use="encoded"/>
   </wsdl:output>
  </wsdl:operation>
 </wsdl:binding>
 <wsdl:service name="Abstractor">
  <wsdl:port name="Abstractor" binding="tns:AbstractorBinding">
   <soap:address
location="http://localhost/webservices/services/Abstractor"/>
  </wsdl:port>
 </wsdl:service>
</wsdl:definitions>

Snooped Request:
POST /webservices/services/Abstractor HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related,
text/*
User-Agent: Axis/1.2RC2
Host: localhost
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "getTitleSearch"
Content-Length: 716

<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ns1
:getTitleSearch
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://abstractor.webservices.sfsltd.com"><ns1:Authentication
href="#id0"/></ns1:getTitleSearch><multiRef id="id0" soapenc:root="0"
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
Password="p@ssword" Type="EMPLOYEE" UserName="MR. ABSTRACTOR"
xsi:type="ns2:TypeAuth"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns2="http://abstractor.webservices.sfsltd.com"/></soapenv:Body></s
oapenv:Envelope>

Snooped Response:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=utf-8
Date: Mon, 11 Apr 2005 13:40:14 GMT
Connection: close




_______________________
Jeremy Nix
Senior Application Developer
Southwest Financial Services, LTD.
(513) 621-6699 x1158
www.sfsltd.com



Re: Axis 1.2RC2 generating "Premature end of file" error

Posted by Anne Thomas Manes <at...@gmail.com>.
The WSDL is invalid for the following reasons:

1- You may not import a schema using <wsdl:import>. In this case, you
should use <xsd:include> in a <types> section:

<wsdl:types.
  <xsd:schema targetNamespace="http://abstractor.webservices.sfsltd.com">
    <xsd:include schemaLocation="AbstractorTypes.xsd"/>
  </xsd:schema>
</wsdl:types>

2- When using RPC style, your message part definitions must reference
types rather than elements.

- Anne

On Apr 11, 2005 9:46 AM, Jeremy Nix <Je...@sfsltd.com> wrote:
> I can't seem to figure out the cause of this error.  Snooping the
> request/response, it appears that the response from the Axis server is
> invalid, but I'm not positive.  Here's my WSDL, the snooped request, and
> the snooped response.
> 
> WSDL:
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:tns="http://abstractor.webservices.sfsltd.com"
> xmlns:xsd1="http://abstractor.webservices.sfsltd.com"
> targetNamespace="http://abstractor.webservices.sfsltd.com"
> name="Abstractor">
>  <wsdl:import namespace="http://abstractor.webservices.sfsltd.com"
> location="AbstractorTypes.xsd"/>
>  <wsdl:message name="MessageGetTitleSearchIn">
>   <wsdl:part name="authentication" element="xsd1:Authentication"/>
>  </wsdl:message>
>  <wsdl:message name="MessageGetTitleSearchOut">
>   <wsdl:part name="arg1" element="xsd1:TitleSearch"/>
>  </wsdl:message>
>  <wsdl:portType name="AbstractorSoapPort">
>   <wsdl:operation name="getTitleSearch">
>    <wsdl:input message="tns:MessageGetTitleSearchIn"/>
>    <wsdl:output message="tns:MessageGetTitleSearchOut"/>
>   </wsdl:operation>
>  </wsdl:portType>
>  <wsdl:binding name="AbstractorBinding" type="tns:AbstractorSoapPort">
>   <soap:binding style="rpc"
> transport="http://schemas.xmlsoap.org/soap/http"/>
>   <wsdl:operation name="getTitleSearch">
>    <soap:operation soapAction="getTitleSearch"/>
>    <wsdl:input>
>     <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://abstractor.webservices.sfsltd.com" use="encoded"/>
>    </wsdl:input>
>    <wsdl:output>
>     <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="http://abstractor.webservices.sfsltd.com" use="encoded"/>
>    </wsdl:output>
>   </wsdl:operation>
>  </wsdl:binding>
>  <wsdl:service name="Abstractor">
>   <wsdl:port name="Abstractor" binding="tns:AbstractorBinding">
>    <soap:address
> location="http://localhost/webservices/services/Abstractor"/>
>   </wsdl:port>
>  </wsdl:service>
> </wsdl:definitions>
> 
> Snooped Request:
> POST /webservices/services/Abstractor HTTP/1.0
> Content-Type: text/xml; charset=utf-8
> Accept: application/soap+xml, application/dime, multipart/related,
> text/*
> User-Agent: Axis/1.2RC2
> Host: localhost
> Cache-Control: no-cache
> Pragma: no-cache
> SOAPAction: "getTitleSearch"
> Content-Length: 716
> 
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ns1
> :getTitleSearch
> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:ns1="http://abstractor.webservices.sfsltd.com"><ns1:Authentication
> href="#id0"/></ns1:getTitleSearch><multiRef id="id0" soapenc:root="0"
> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> Password="p@ssword" Type="EMPLOYEE" UserName="MR. ABSTRACTOR"
> xsi:type="ns2:TypeAuth"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:ns2="http://abstractor.webservices.sfsltd.com"/></soapenv:Body></s
> oapenv:Envelope>
> 
> Snooped Response:
> HTTP/1.1 200 OK
> Server: Apache-Coyote/1.1
> Content-Type: text/xml;charset=utf-8
> Date: Mon, 11 Apr 2005 13:40:14 GMT
> Connection: close
> 
> 
> _______________________
> Jeremy Nix
> Senior Application Developer
> Southwest Financial Services, LTD.
> (513) 621-6699 x1158
> www.sfsltd.com
> 
>