Re: Axis2 Client get "Premature end of file." from server

2008-12-11 Thread Tsvetelin Saykov
Hi all,

I find that the error "Premature end of file." which I received from Lotus
Domino over MS Windows server is something happening in HTTP level.
To solve this problem I configure the Axis2 HTTP Transport Sender not to use
Transfer-Encoding : Chunked

stub._getServiceClient().getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED,
Boolean.FALSE);

Hope this could be useful for someone else

Best regards
Tsvetelin


On Wed, Dec 10, 2008 at 2:23 PM, Tsvetelin Saykov <[EMAIL PROTECTED]>wrote:

> 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] >> " xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";> xmlns="urn:DefaultNamespace" />"
> [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.Co

Axis2 Client get "Premature end of file." from server

2008-12-10 Thread Tsvetelin Saykov
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] >> "http://schemas.xmlsoap.org/soap/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] << "[\n]"
[DEBUG] << "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] << " [\n]"
[DEBUG] << "  [\n]"
[DEBUG] << "   soapenv:Server.generalException[\n]"
[DEBUG] << "   org.xml.sax.SAXParseException: Premature end of
file.[\n]