Hi,

I am new in Axis2 web services application development and I am experience a
problem with Axis2

I am writing a Client application and I get "Premature end of file." from
server.
The client application is running under Linux/Java6.
The web services server is IBM Lotus Domino under MS Windows

I am using WSDL2Java tool to generate stub. I tried both mappings ADB and
JiBX
When I take the request xml (from debug log colored in red) and post it to
the server via post request using URLConnection I was able to receive server
reply.
When I downloaded the latest release of Axis1, this problem disappear and I
was able to receive server reply(using again WSDL2Java tool).

It seems that Axis2 send request which cannot be parsed by server
Does someone experience the same problem? Any idea why this happen and what
can I do to fix this issue

Thank you in advance
Tsvetelin

PS. Here is the debug log

REQUEST
[DEBUG] ==================
[DEBUG] HttpConnectionManager.getConnection:  config =
HostConfiguration[host=https://host.com], timeout = 0
[DEBUG] Allocating new connection, hostConfig=HostConfiguration[host=
https://host.com]
[DEBUG] Open connection to host.com:443
[DEBUG] >> "POST //partyInterface?OpenWebService HTTP/1.1[\r][\n]"
[DEBUG] Adding Host request header
[DEBUG] >> "Content-Type: text/xml; charset=UTF-8[\r][\n]"
[DEBUG] >> "SOAPAction: ""[\r][\n]"
[DEBUG] >> "User-Agent: Axis2[\r][\n]"
[DEBUG] >> "Host: host.com[\r][\n]"
[DEBUG] >> "Transfer-Encoding: chunked[\r][\n]"
[DEBUG] >> "[\r][\n]"
[DEBUG] start writeTo()
[DEBUG]   preserve=false
[DEBUG]   isOptimized=false
[DEBUG]   isDoingSWA=false
[DEBUG] MTOM optimized Threshold value =0
[DEBUG] Created XMLOutputFactory = class com.ctc.wstx.stax.WstxOutputFactory
for [EMAIL PROTECTED]
[DEBUG] Size of XMLOutputFactory map =1
[DEBUG] XMLStreamWriter is com.ctc.wstx.sw.SimpleNsStreamWriter
[DEBUG] end writeTo()
[DEBUG] >> "ca[\r][\n]"
[DEBUG] >> "<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Body><CHECKWS
xmlns="urn:DefaultNamespace" /></soapenv:Body></soapenv:Envelope>"
[DEBUG] >> "[\r][\n]"
[DEBUG] >> "0"
[DEBUG] >> "[\r][\n]"
[DEBUG] >> "[\r][\n]"
[DEBUG] Request body sent
[DEBUG] << "HTTP/1.1 200 OK[\r][\n]"
[DEBUG] << "HTTP/1.1 200 OK[\r][\n]"
[DEBUG] << "Server: Lotus-Domino[\r][\n]"
[DEBUG] << "Date: Wed, 10 Dec 2008 11:44:57 GMT[\r][\n]"
[DEBUG] << "Content-Type: text/xml; charset=utf-8[\r][\n]"
[DEBUG] << "Content-Length: 459[\r][\n]"
[DEBUG] << "[\r][\n]"
[DEBUG] ==================
[DEBUG]  Property set on object
[EMAIL PROTECTED]
[DEBUG]   Key =TRANSPORT_HEADERS
[DEBUG]   Value Class =
org.apache.axis2.transport.http.CommonsTransportHeaders
[DEBUG]   Value Classloader = [EMAIL PROTECTED]
[DEBUG] Call Stack = DEBUG_FRAME =
org.apache.axis2.util.JavaUtils.callStackToString(JavaUtils.java:564)
        DEBUG_FRAME =
org.apache.axis2.context.AbstractContext.debugPropertySet(AbstractContext.java:416)
        DEBUG_FRAME =
org.apache.axis2.context.AbstractContext.setProperty(AbstractContext.java:182)
        DEBUG_FRAME =
org.apache.axis2.transport.http.AbstractHTTPSender.obtainHTTPHeaderInformation(AbstractHTTPSender.java:120)
        DEBUG_FRAME =
org.apache.axis2.transport.http.AbstractHTTPSender.processResponse(AbstractHTTPSender.java:210)
        DEBUG_FRAME =
org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:265)
        DEBUG_FRAME =
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:190)
        DEBUG_FRAME =
org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
        DEBUG_FRAME =
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:371)
        DEBUG_FRAME =
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
        DEBUG_FRAME =
org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
        DEBUG_FRAME =
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
        DEBUG_FRAME =
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
        DEBUG_FRAME =
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
        DEBUG_FRAME =
com.rushmore.advancedevents.gmp.ws.jibx.PartyInterfaceServiceStub.CHECKWS(PartyInterfaceServiceStub.java:309)
        DEBUG_FRAME =
com.rushmore.advancedevents.gmp.ws.jibx.ClientJibx.noParameters(ClientJibx.java:32)
        DEBUG_FRAME =
com.rushmore.advancedevents.gmp.ws.jibx.ClientJibx.main(ClientJibx.java:18)

[DEBUG] ==================



RESPONSE
[DEBUG] ==================
[DEBUG] createSOAPEnvelope using Builder (class
org.apache.axis2.builder.SOAPBuilder) selected from type (text/xml)
[DEBUG] << "<?xm"
[DEBUG] char set encoding set from default =utf-8
[DEBUG] << "l version="1.0" encoding="UTF-8"?>[\n]"
[DEBUG] << "<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";>[\n]"
[DEBUG] << " <soapenv:Body>[\n]"
[DEBUG] << "  <soapenv:Fault>[\n]"
[DEBUG] << "   <faultcode>soapenv:Server.generalException</faultcode>[\n]"
[DEBUG] << "   <faultstring>org.xml.sax.SAXParseException: Premature end of
file.</faultstring>[\n]"
[DEBUG] << "   <detail/>[\n]"
[DEBUG] << "  </soapenv:Fault>[\n]"
[DEBUG] << " </soapenv:Body>[\n]"
[DEBUG] << "</soapenv:Envelope>"
[DEBUG] XMLStreamReader is com.ctc.wstx.sr.ValidatingStreamReader
[DEBUG] Starting to process SOAP 1.1 message
[DEBUG] Build the OMElelment EnvelopeBy the StaxSOAPModelBuilder
[DEBUG] Build the OMElelment BodyBy the StaxSOAPModelBuilder
[DEBUG] Build the OMElelment FaultBy the StaxSOAPModelBuilder
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Checking pre-condition for Phase "Addressing"
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Invoking phase "Addressing"
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Invoking Handler 'AddressingBasedDispatcher' in Phase 'Addressing'
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Checking post-conditions for phase "Addressing"
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Checking pre-condition for Phase "Security"
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Invoking phase "Security"
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Checking post-conditions for phase "Security"
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Checking pre-condition for Phase "PreDispatch"
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Invoking phase "PreDispatch"
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Checking post-conditions for phase "PreDispatch"
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Checking pre-condition for Phase "Dispatch"
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Invoking phase "Dispatch"
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Invoking Handler 'RequestURIBasedDispatcher' in Phase 'Dispatch'
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Invoking Handler 'SOAPActionBasedDispatcher' in Phase 'Dispatch'
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Invoking Handler 'RequestURIOperationDispatcher' in Phase 'Dispatch'
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Invoking Handler 'SOAPMessageBodyBasedDispatcher' in Phase 'Dispatch'
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Invoking Handler 'HTTPLocationBasedDispatcher' in Phase 'Dispatch'
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Checking post-conditions for phase "Dispatch"
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Checking pre-condition for Phase "RMPhase"
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Invoking phase "RMPhase"
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Checking post-conditions for phase "RMPhase"
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Checking pre-condition for Phase "OperationInPhase"
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Invoking phase "OperationInPhase"
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Checking post-conditions for phase "OperationInPhase"
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Invoking flowComplete() in Phase "OperationInPhase"
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Invoking flowComplete() in Phase "RMPhase"
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Invoking flowComplete() in Phase "Dispatch"
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Invoking flowComplete() for Handler 'HTTPLocationBasedDispatcher' in Phase
'Dispatch'
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Invoking flowComplete() for Handler 'SOAPMessageBodyBasedDispatcher' in
Phase 'Dispatch'
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Invoking flowComplete() for Handler 'RequestURIOperationDispatcher' in Phase
'Dispatch'
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Invoking flowComplete() for Handler 'SOAPActionBasedDispatcher' in Phase
'Dispatch'
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Invoking flowComplete() for Handler 'RequestURIBasedDispatcher' in Phase
'Dispatch'
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Invoking flowComplete() in Phase "PreDispatch"
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Invoking flowComplete() in Phase "Security"
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Invoking flowComplete() in Phase "Addressing"
[DEBUG] [MessageContext: logID=urn:uuid:F8986364CDE8674A491228909677611]
Invoking flowComplete() for Handler 'AddressingBasedDispatcher' in Phase
'Addressing'
[DEBUG] Build the OMElelment faultcodeBy the StaxSOAPModelBuilder
[DEBUG] Build the OMElelment faultstringBy the StaxSOAPModelBuilder
[DEBUG] Build the OMElelment detailBy the StaxSOAPModelBuilder
org.apache.axis2.AxisFault: org.xml.sax.SAXParseException: Premature end of
file.
        at
org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:512)
        at
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370)
        at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
        at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
        at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)

Reply via email to