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 Dapeng Wang <Wa...@gmx.net> on 2006/08/06 18:31:58 UTC

Frustrating experience with Axis2 due to HTTP 1.1 and Chunked Transfer-Encoding

Hi,

I ran into a very frustrating problem and have no solution until now. After downloaded and installed Axis 1.0, HappyAxis.jsp is just not happy. Version-WS just can't be invoked. The same is true if I deploy my own service and run the client. 

After seeking and trying the whole weekend, I figured out that it has something to do with the cunked transfer encoding. It seems that the Stax-Parser has got the raw http stream to parse, so that it always ends in 

com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
 at [row,col {unknown-source}]: [1,0]

which is wrapped by an OMException, so that you can't see the real reason of the failure at first sight. 

TCPMON captures following request and response:
Request:
POST /axis2/services/version HTTP/1.1
User-Agent: Axis/2.0
SOAPAction: ""
Host: localhost:8081
Transfer-Encoding: chunked
Content-Type: text/xml; charset=UTF-8

10e
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header /><soapenv:Body><ns1:getVersion xmlns:ns1="http://axisversion.sample/xsd"><ns1:myValue /></ns1:getVersion></soapenv:Body></soapenv:Envelope>
0


Response:
HTTP/1.1 500 Internal Server Error
Content-Type: text/html
Content-Language: de-DE
Content-Length: 1540
Date: Sun, 06 Aug 2006 16:24:41 GMT
Server: Apache-Coyote/1.1
Connection: close

<html><head><title>Apache Tomcat/5.0.25 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server encountered an internal error () that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>java.lang.NullPointerException
	org.apache.axis2.engine.AxisEngine.createFaultMessageContext(AxisEngine.java:183)
	org.apache.axis2.transport.http.AxisServlet.handleFault(AxisServlet.java:168)
	org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:153)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
</pre></p><p><b>note</b> <u>The full stack trace of the root cause is available in the Apache Tomcat/5.0.25 logs.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/5.0.25</h3></body></html>

Tried different JDK and Tomcat combination: jdk1.4.2_10 with Tomcat 5.0.25 and JDK1.5.7 with Tomcat 5.5.12.  Always same result. Very frustrating.

The only way to have at least something to work to configure the CommonsHttpSender to sue HTTP 1.0.

Can you please take a look into this. I really like to start with Axis2 without these problems.


Best regards
Dapeng Wang
-- 


Echte DSL-Flatrate dauerhaft für 0,- Euro*. Nur noch kurze Zeit!
"Feel free" mit GMX DSL: http://www.gmx.net/de/go/dsl

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Frustrating experience with Axis2 due to HTTP 1.1 and Chunked Transfer-Encoding

Posted by Eran Chinthaka <ch...@opensource.lk>.
Ok, next step is get Axis2 nightly builds
(http://people.apache.org/dist/axis2/nightly/axis2-std-SNAPSHOT-bin.zip)
and check against them without disabling chunking.

We've fixed lots of bugs since Axis2 1.0, so I think this must also be
fixed by now, if there was a bug.

-- Chinthaka

Dapeng Wang wrote:
> Hi, Eran.
> 
> thanks. It works now. It would be great, if you have a solution for me, so that it still works with chunking turned on.
> 
> regards
> Dapeng
> 
> 
> -------- Original-Nachricht --------
> Datum: Mon, 07 Aug 2006 02:35:54 +0530
> Von: Eran Chinthaka <ch...@opensource.lk>
> An: axis-user@ws.apache.org
> Betreff: Re: Frustrating experience with Axis2 due to HTTP 1.1 and Chunked Transfer-Encoding
> 
>> Dapeng Wang wrote:
>>> Hi, Eran,
>>>
>>> thank you for your hint. But there seems to be no constant called
>> CHUNKED anymore in the class. Neither is there any constant called
>> NTLM_AUTHENTICATION as documented on the wso2 website.
>> HTTPConstants.HEADER_TRANSFER_ENCODING_CHUNKED is also not the right one.
>> Oops sorry. Those constants are meant to be used with the latest nightly
>> builds. Recently we refactored the constants to better places.
>>
>> Seems you are using Axis2 1.0 released version. If yes then use
>> org.apache.axis2.context.MessageContextConstants.CHUNKED
>>
>>> So I am just even more frustrated. 
>>> Anyway, the engine should also run without problem with chunking turned
>> on.
>>
>> Yep agreed. But I wanted to make sure first that it works and then
>> address the problem.
>>
>> -- Chinthaka
>>
> 



Re: Frustrating experience with Axis2 due to HTTP 1.1 and Chunked Transfer-Encoding

Posted by Dapeng Wang <Wa...@gmx.net>.
Hi, Eran.

thanks. It works now. It would be great, if you have a solution for me, so that it still works with chunking turned on.

regards
Dapeng


-------- Original-Nachricht --------
Datum: Mon, 07 Aug 2006 02:35:54 +0530
Von: Eran Chinthaka <ch...@opensource.lk>
An: axis-user@ws.apache.org
Betreff: Re: Frustrating experience with Axis2 due to HTTP 1.1 and Chunked Transfer-Encoding

> Dapeng Wang wrote:
> > Hi, Eran,
> > 
> > thank you for your hint. But there seems to be no constant called
> CHUNKED anymore in the class. Neither is there any constant called
> NTLM_AUTHENTICATION as documented on the wso2 website.
> HTTPConstants.HEADER_TRANSFER_ENCODING_CHUNKED is also not the right one.
> > 
> 
> Oops sorry. Those constants are meant to be used with the latest nightly
> builds. Recently we refactored the constants to better places.
> 
> Seems you are using Axis2 1.0 released version. If yes then use
> org.apache.axis2.context.MessageContextConstants.CHUNKED
> 
> > So I am just even more frustrated. 
> > Anyway, the engine should also run without problem with chunking turned
> on.
> 
> Yep agreed. But I wanted to make sure first that it works and then
> address the problem.
> 
> -- Chinthaka
> 

-- 


Echte DSL-Flatrate dauerhaft für 0,- Euro*. Nur noch kurze Zeit!
"Feel free" mit GMX DSL: http://www.gmx.net/de/go/dsl

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Frustrating experience with Axis2 due to HTTP 1.1 and Chunked Transfer-Encoding

Posted by Eran Chinthaka <ch...@opensource.lk>.
Dapeng Wang wrote:
> Hi, Eran,
> 
> thank you for your hint. But there seems to be no constant called CHUNKED anymore in the class. Neither is there any constant called NTLM_AUTHENTICATION as documented on the wso2 website. HTTPConstants.HEADER_TRANSFER_ENCODING_CHUNKED is also not the right one.
> 

Oops sorry. Those constants are meant to be used with the latest nightly
builds. Recently we refactored the constants to better places.

Seems you are using Axis2 1.0 released version. If yes then use
org.apache.axis2.context.MessageContextConstants.CHUNKED

> So I am just even more frustrated. 
> Anyway, the engine should also run without problem with chunking turned on.

Yep agreed. But I wanted to make sure first that it works and then
address the problem.

-- Chinthaka


Re: Frustrating experience with Axis2 due to HTTP 1.1 and Chunked Transfer-Encoding

Posted by Dapeng Wang <Wa...@gmx.net>.
Hi, Eran,

thank you for your hint. But there seems to be no constant called CHUNKED anymore in the class. Neither is there any constant called NTLM_AUTHENTICATION as documented on the wso2 website. HTTPConstants.HEADER_TRANSFER_ENCODING_CHUNKED is also not the right one.

So I am just even more frustrated. Anyway, the engine should also run without problem with chunking turned on.

Any idea?

Best regards
Dapeng


-------- Original-Nachricht --------
Datum: Mon, 07 Aug 2006 01:21:16 +0530
Von: Eran Chinthaka <ch...@opensource.lk>
An: axis-user@ws.apache.org
Betreff: Re: Frustrating experience with Axis2 due to HTTP 1.1 and Chunked Transfer-Encoding

> Hi Dapeng,
> 
> Can u try disabling chunking?
> (http://www.wso2.net/articles/axis2/java/2006/08/01/client-api-parameters#CHUNKED)C
> 
> - EC
> 
> Dapeng Wang wrote:
> > Hi,
> > 
> > I ran into a very frustrating problem and have no solution until now.
> After downloaded and installed Axis 1.0, HappyAxis.jsp is just not happy.
> Version-WS just can't be invoked. The same is true if I deploy my own service
> and run the client. 
> > 
> > After seeking and trying the whole weekend, I figured out that it has
> something to do with the cunked transfer encoding. It seems that the
> Stax-Parser has got the raw http stream to parse, so that it always ends in 
> > 
> > com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
> >  at [row,col {unknown-source}]: [1,0]
> > 
> > which is wrapped by an OMException, so that you can't see the real
> reason of the failure at first sight. 
> > 
> > TCPMON captures following request and response:
> > Request:
> > POST /axis2/services/version HTTP/1.1
> > User-Agent: Axis/2.0
> > SOAPAction: ""
> > Host: localhost:8081
> > Transfer-Encoding: chunked
> > Content-Type: text/xml; charset=UTF-8
> > 
> > 10e
> > <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header
> /><soapenv:Body><ns1:getVersion xmlns:ns1="http://axisversion.sample/xsd"><ns1:myValue
> /></ns1:getVersion></soapenv:Body></soapenv:Envelope>
> > 0
> > 
> > 
> > Response:
> > HTTP/1.1 500 Internal Server Error
> > Content-Type: text/html
> > Content-Language: de-DE
> > Content-Length: 1540
> > Date: Sun, 06 Aug 2006 16:24:41 GMT
> > Server: Apache-Coyote/1.1
> > Connection: close
> > 
> > <html><head><title>Apache Tomcat/5.0.25 - Error
> report</title><style><!--H1
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY
> {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P
> {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
> {color : black;}A.name {color : black;}HR {color : #525D76;}--></style>
> </head><body><h1>HTTP Status 500 - </h1><HR size="1"
> noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b>
> <u></u></p><p><b>description</b> <u>The server encountered an internal error () that prevented it from
> fulfilling this request.</u></p><p><b>exception</b>
> <pre>java.lang.NullPointerException
> >
> 	org.apache.axis2.engine.AxisEngine.createFaultMessageContext(AxisEngine.java:183)
> >
> 	org.apache.axis2.transport.http.AxisServlet.handleFault(AxisServlet.java:168)
> >
> 	org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:153)
> > 	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> > 	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> > </pre></p><p><b>note</b> <u>The full stack trace of the root cause is
> available in the Apache Tomcat/5.0.25 logs.</u></p><HR size="1"
> noshade="noshade"><h3>Apache Tomcat/5.0.25</h3></body></html>
> > 
> > Tried different JDK and Tomcat combination: jdk1.4.2_10 with Tomcat
> 5.0.25 and JDK1.5.7 with Tomcat 5.5.12.  Always same result. Very frustrating.
> > 
> > The only way to have at least something to work to configure the
> CommonsHttpSender to sue HTTP 1.0.
> > 
> > Can you please take a look into this. I really like to start with Axis2
> without these problems.
> > 
> > 
> > Best regards
> > Dapeng Wang
> 
> 

-- 


"Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Frustrating experience with Axis2 due to HTTP 1.1 and Chunked Transfer-Encoding

Posted by Eran Chinthaka <ch...@opensource.lk>.
Hi Dapeng,

Can u try disabling chunking?
(http://www.wso2.net/articles/axis2/java/2006/08/01/client-api-parameters#CHUNKED)C

- EC

Dapeng Wang wrote:
> Hi,
> 
> I ran into a very frustrating problem and have no solution until now. After downloaded and installed Axis 1.0, HappyAxis.jsp is just not happy. Version-WS just can't be invoked. The same is true if I deploy my own service and run the client. 
> 
> After seeking and trying the whole weekend, I figured out that it has something to do with the cunked transfer encoding. It seems that the Stax-Parser has got the raw http stream to parse, so that it always ends in 
> 
> com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
>  at [row,col {unknown-source}]: [1,0]
> 
> which is wrapped by an OMException, so that you can't see the real reason of the failure at first sight. 
> 
> TCPMON captures following request and response:
> Request:
> POST /axis2/services/version HTTP/1.1
> User-Agent: Axis/2.0
> SOAPAction: ""
> Host: localhost:8081
> Transfer-Encoding: chunked
> Content-Type: text/xml; charset=UTF-8
> 
> 10e
> <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header /><soapenv:Body><ns1:getVersion xmlns:ns1="http://axisversion.sample/xsd"><ns1:myValue /></ns1:getVersion></soapenv:Body></soapenv:Envelope>
> 0
> 
> 
> Response:
> HTTP/1.1 500 Internal Server Error
> Content-Type: text/html
> Content-Language: de-DE
> Content-Length: 1540
> Date: Sun, 06 Aug 2006 16:24:41 GMT
> Server: Apache-Coyote/1.1
> Connection: close
> 
> <html><head><title>Apache Tomcat/5.0.25 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server encountered an internal error () that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>java.lang.NullPointerException
> 	org.apache.axis2.engine.AxisEngine.createFaultMessageContext(AxisEngine.java:183)
> 	org.apache.axis2.transport.http.AxisServlet.handleFault(AxisServlet.java:168)
> 	org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:153)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> </pre></p><p><b>note</b> <u>The full stack trace of the root cause is available in the Apache Tomcat/5.0.25 logs.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/5.0.25</h3></body></html>
> 
> Tried different JDK and Tomcat combination: jdk1.4.2_10 with Tomcat 5.0.25 and JDK1.5.7 with Tomcat 5.5.12.  Always same result. Very frustrating.
> 
> The only way to have at least something to work to configure the CommonsHttpSender to sue HTTP 1.0.
> 
> Can you please take a look into this. I really like to start with Axis2 without these problems.
> 
> 
> Best regards
> Dapeng Wang