Hi,

I know this problem has come up on the list a few times but none of the previous responses has helped me out. My problem is an exeption "WstxEOFException: Unexpected EOF in prolog" when invoking a service call (see below for stack trace) however it only occurs when the client servlet sits on a different host than the web service. When both are on the same machine it works fine.

The web service was generated using axis2 tools, java2wsdl and wsdl2java using adb. Client side code was generated using wsdl2java with adb.

For completeness I have included below a client code snippet, the stack trace, the services.xml and WSDL (the pasting of these into email has put in some misplaced newlines).

I have checked wsdl and services.xml for whitespaces that could break the parsing.

Thanks a lot for looking at this.

Regards,
Nick

Client invocation of the service is simple:
CommandCommandSOAP12PortStub ws = new CommandCommandSOAP12PortStub(null, webservice); CommandCommandSOAP12PortStub.Login clientLogin = new CommandCommandSOAP12PortStub.Login();
clientLogin.setUsername(sess.getUsername());
clientLogin.setPassword(sess.getPassword());
clientLogin.setApplication(application);
CommandCommandSOAP12PortStub.LoginResponse clientLoginResponse = ws.login(clientLogin);

Exception:
org.apache.axis2.AxisFault: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
 at [row,col {unknown-source}]: [1,0]
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:81) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:356) at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294) at com.kesoftware.webapps.eclient.webservice.CommandCommandSOAP12PortStub.login(CommandCommandSOAP12PortStub.java:450)


services.xml:
<serviceGroup>
<service name="Command">
<messageReceivers>
<messageReceiver mep="http://www.w3.org/ns/wsdl/in-out"; class="com.kesoftware.we
bapps.eserver.webservice.CommandMessageReceiverInOut"/>
</messageReceivers>
<parameter locked="false" name="ServiceClass">com.kesoftware.webapps.eserver.web
service.CommandSkeleton</parameter>
<parameter locked="false" name="useOriginalwsdl">true</parameter>
<parameter locked="false" name="modifyUserWSDLPortAddress">true</parameter>
<operation name="cvsVerify" mep="http://www.w3.org/ns/wsdl/in-out";>
<actionMapping>urn:cvsVerify</actionMapping>
<outputActionMapping>urn:cvsVerify</outputActionMapping>
</operation>
<operation name="indexQuery" mep="http://www.w3.org/ns/wsdl/in-out";>
<actionMapping>urn:indexQuery</actionMapping>
<outputActionMapping>urn:indexQuery</outputActionMapping>
</operation>
<operation name="login" mep="http://www.w3.org/ns/wsdl/in-out";>
<actionMapping>urn:login</actionMapping>
<outputActionMapping>urn:login</outputActionMapping>
</operation>
<operation name="lookupList" mep="http://www.w3.org/ns/wsdl/in-out";>
<actionMapping>urn:lookupList</actionMapping>
<outputActionMapping>urn:lookupList</outputActionMapping>
</operation>
<operation name="productsLookup" mep="http://www.w3.org/ns/wsdl/in-out";>
<actionMapping>urn:productsLookup</actionMapping>
<outputActionMapping>urn:productsLookup</outputActionMapping>
</operation>
<operation name="toServer" mep="http://www.w3.org/ns/wsdl/in-out";>
<actionMapping>urn:toServer</actionMapping>
<outputActionMapping>urn:toServer</outputActionMapping>
</operation>
<operation name="toShoppingCart" mep="http://www.w3.org/ns/wsdl/in-out";>
<actionMapping>urn:toShoppingCart</actionMapping>
<outputActionMapping>urn:toShoppingCart</outputActionMapping>
</operation>
</service>
</serviceGroup>

WSDL:
<?xml version="2.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://webservice.eserver.webapps.kesoftware. com" xmlns:axis2="http://webservice.eserver.webapps.kesoftware.com"; xmlns:soap12 ="http://schemas.xmlsoap.org/wsdl/soap12/"; xmlns:mime="http://schemas.xmlsoap.or g/wsdl/mime/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"; xmlns:wsaw="htt p://www.w3.org/2006/05/addressing/wsdl" xmlns:ns="http://webservice.eserver.weba pps.kesoftware.com/xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns
:wsdl="http://schemas.xmlsoap.org/wsdl/";>
<wsdl:types>
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targe tNamespace="http://webservice.eserver.webapps.kesoftware.com/xsd"; xmlns:xs="http
://www.w3.org/2001/XMLSchema">
<xs:element name="cvsVerify">
<xs:complexType>
<xs:sequence>
<xs:element name="username" nillable="true" type="xs:string"/>
<xs:element name="password" nillable="true" type="xs:string"/>
<xs:element name="application" nillable="true" type="xs:string"/>
<xs:element name="input" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="cvsVerifyResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" nillable="true" type="ns:ResponseBean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ResponseBean" type="ns:ResponseBean"/>
<xs:complexType name="ResponseBean">
<xs:sequence>
<xs:element name="output" nillable="true" type="xs:string"/>
<xs:element name="status" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="indexQuery">
<xs:complexType>
<xs:sequence>
<xs:element name="username" nillable="true" type="xs:string"/>
<xs:element name="password" nillable="true" type="xs:string"/>
<xs:element name="application" nillable="true" type="xs:string"/>
<xs:element name="input" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="indexQueryResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" nillable="true" type="ns:ResponseBean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="login">
<xs:complexType>
<xs:sequence>
<xs:element name="username" nillable="true" type="xs:string"/>
<xs:element name="password" nillable="true" type="xs:string"/>
<xs:element name="application" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="loginResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" nillable="true" type="ns:ResponseBean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="lookupList">
<xs:complexType>
<xs:sequence>
<xs:element name="username" nillable="true" type="xs:string"/>
<xs:element name="password" nillable="true" type="xs:string"/>
<xs:element name="application" nillable="true" type="xs:string"/>
<xs:element name="input" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="lookupListResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" nillable="true" type="ns:ResponseBean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="productsLookup">
<xs:complexType>
<xs:sequence>
<xs:element name="username" nillable="true" type="xs:string"/>
<xs:element name="password" nillable="true" type="xs:string"/>
<xs:element name="application" nillable="true" type="xs:string"/>
<xs:element name="input" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="productsLookupResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" nillable="true" type="ns:ResponseBean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="toServer">
<xs:complexType>
<xs:sequence>
<xs:element name="username" nillable="true" type="xs:string"/>
<xs:element name="password" nillable="true" type="xs:string"/>
<xs:element name="application" nillable="true" type="xs:string"/>
<xs:element name="input" nillable="true" type="xs:string"/>
<xs:element name="validate" nillable="true" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="toServerResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" nillable="true" type="ns:ResponseBean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="toShoppingCart">
<xs:complexType>
<xs:sequence>
<xs:element name="username" nillable="true" type="xs:string"/>
<xs:element name="password" nillable="true" type="xs:string"/>
<xs:element name="application" nillable="true" type="xs:string"/>
<xs:element name="input" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="toShoppingCartResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" nillable="true" type="ns:ResponseBean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="lookupListMessage">
<wsdl:part name="part1" element="ns:lookupList">
</wsdl:part>
</wsdl:message>
<wsdl:message name="productsLookupResponseMessage">
<wsdl:part name="part1" element="ns:productsLookupResponse">
</wsdl:part>
</wsdl:message>
<wsdl:message name="cvsVerifyMessage">
<wsdl:part name="part1" element="ns:cvsVerify">
</wsdl:part>
</wsdl:message>
<wsdl:message name="indexQueryMessage">
<wsdl:part name="part1" element="ns:indexQuery">
</wsdl:part>
</wsdl:message>
<wsdl:message name="toServerResponseMessage">
<wsdl:part name="part1" element="ns:toServerResponse">
</wsdl:part>
</wsdl:message>
<wsdl:message name="toShoppingCartResponseMessage">
<wsdl:part name="part1" element="ns:toShoppingCartResponse">
</wsdl:part>
</wsdl:message>
<wsdl:message name="productsLookupMessage">
<wsdl:part name="part1" element="ns:productsLookup">
</wsdl:part>
</wsdl:message>
<wsdl:message name="cvsVerifyResponseMessage">
<wsdl:part name="part1" element="ns:cvsVerifyResponse">
</wsdl:part>
</wsdl:message>
<wsdl:message name="toShoppingCartMessage">
<wsdl:part name="part1" element="ns:toShoppingCart">
</wsdl:part>
</wsdl:message>
<wsdl:message name="lookupListResponseMessage">
<wsdl:part name="part1" element="ns:lookupListResponse">
</wsdl:part>
</wsdl:message>
<wsdl:message name="loginMessage">
<wsdl:part name="part1" element="ns:login">
</wsdl:part>
</wsdl:message>
<wsdl:message name="toServerMessage">
<wsdl:part name="part1" element="ns:toServer">
</wsdl:part>
</wsdl:message>
<wsdl:message name="loginResponseMessage">
<wsdl:part name="part1" element="ns:loginResponse">
</wsdl:part>
</wsdl:message>
<wsdl:message name="indexQueryResponseMessage">
<wsdl:part name="part1" element="ns:indexQueryResponse">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="CommandPortType">
<wsdl:operation name="cvsVerify">
<wsdl:input message="axis2:cvsVerifyMessage" wsaw:Action="urn:cvsVerify">
</wsdl:input>
<wsdl:output message="axis2:cvsVerifyResponseMessage" wsaw:Action="urn:cvsVerify
">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="indexQuery">
<wsdl:input message="axis2:indexQueryMessage" wsaw:Action="urn:indexQuery">
</wsdl:input>
<wsdl:output message="axis2:indexQueryResponseMessage" wsaw:Action="urn:indexQue
ry">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="login">
<wsdl:input message="axis2:loginMessage" wsaw:Action="urn:login">
</wsdl:input>
<wsdl:output message="axis2:loginResponseMessage" wsaw:Action="urn:login">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="lookupList">
<wsdl:input message="axis2:lookupListMessage" wsaw:Action="urn:lookupList">
</wsdl:input>
<wsdl:output message="axis2:lookupListResponseMessage" wsaw:Action="urn:lookupLi
st">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="productsLookup">
<wsdl:input message="axis2:productsLookupMessage" wsaw:Action="urn:productsLooku
p">
</wsdl:input>
<wsdl:output message="axis2:productsLookupResponseMessage" wsaw:Action="urn:prod
uctsLookup">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="toServer">
<wsdl:input message="axis2:toServerMessage" wsaw:Action="urn:toServer">
</wsdl:input>
<wsdl:output message="axis2:toServerResponseMessage" wsaw:Action="urn:toServer">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="toShoppingCart">
<wsdl:input message="axis2:toShoppingCartMessage" wsaw:Action="urn:toShoppingCar
t">
</wsdl:input>
<wsdl:output message="axis2:toShoppingCartResponseMessage" wsaw:Action="urn:toSh
oppingCart">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="CommandSOAP11Binding" type="axis2:CommandPortType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/
>
<wsdl:operation name="cvsVerify">
<soap:operation soapAction="urn:cvsVerify" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="indexQuery">
<soap:operation soapAction="urn:indexQuery" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="login">
<soap:operation soapAction="urn:login" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="lookupList">
<soap:operation soapAction="urn:lookupList" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="productsLookup">
<soap:operation soapAction="urn:productsLookup" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="toServer">
<soap:operation soapAction="urn:toServer" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="toShoppingCart">
<soap:operation soapAction="urn:toShoppingCart" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="CommandSOAP12Binding" type="axis2:CommandPortType">
<soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http
"/>
<wsdl:operation name="cvsVerify">
<soap12:operation soapAction="urn:cvsVerify" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="indexQuery">
<soap12:operation soapAction="urn:indexQuery" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="login">
<soap12:operation soapAction="urn:login" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="lookupList">
<soap12:operation soapAction="urn:lookupList" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="productsLookup">
<soap12:operation soapAction="urn:productsLookup" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="toServer">
<soap12:operation soapAction="urn:toServer" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="toShoppingCart">
<soap12:operation soapAction="urn:toShoppingCart" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Command">
<wsdl:port name="CommandSOAP11port" binding="axis2:CommandSOAP11Binding">
<soap:address location="http://localhost:8080/axis2/services/Command"/>
</wsdl:port>
<wsdl:port name="CommandSOAP12port" binding="axis2:CommandSOAP12Binding">
<soap12:address location="http://localhost:8080/axis2/services/Command"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to