Just start chatting on IRC with Dain  and your issues will magically resolve
:) .

Okay, so here are detailed steps:-

Ran the CalculatorTest in examples/simple-webservice. The test failed
I looked at the stack trace and just followed the trace through the source
code.
Also downloaded the sources of CXF and Woodstox (both were not needed , but
I learnt a few things looking through them).
Googled the exceptions on the stack trace to find out why the client would
hang for a while. Bumped into something called HttpClientPolicy for CXF.
Copied an example Client policy from the CXF website and pasted in our web
service example test case
The test case ran successfully. Would always run the test case multiple
times because a single successful run did not guarantee sucess (now we know
why )
Started commenting out each line from the HttpClientPolicy code (to figure
out which policy was fixing the issue) and re-running the test
Found out that chunking was the issue.
Read RFC 2616, sections 3 and 19.6 for chunking.
Found out our code which involved chunking - couldnt find anything wrong in
there
Found out CXF code involing chunking and couldnt find anything wrong in
there too
Mohammed came on IRC and we started to collaborate as he had some
suggestions on where things could go wrong
Joined the CXF IRC and users list . Pinged the IRC and sent stack trace to
users list
Dan Kulp started helping me. Dan pinged Dain on IRC and then Dain started
helping me out figure it.
Dain immediately told me to replace our HttpServer with Jetty, and the error
went away. This meant the problem was with our HTTPServer Chunking part and
not CXF (I was parallelly taking the longer route of replacing our
HttpServer code with commons HTTP core -- which I stopped as I saw success
with Jetty and knew it was our HttpServer)
Then we started dumping the body of the HttpMessage on the console
(something which i had already tried earlier too, but that didnt help)
Then we ran TCP mon to find out the data travelling back and forth on the
wire and thats where Dain caught the issue that the response being sent back
by the HttpServer is not complete i.e. our HttpServer was not flushing the
response properly.

We exchanged a lot of console output and code samples on rifers.org. You can
look at those here
http://www.rifers.org/paste/show/7602  . Also look at 7603,7604,7605,7606

So it was a team effort and I alone could not have figured it out.  But I
thoroughly enjoyed it :)


On Fri, Jul 4, 2008 at 2:58 AM, Jacek Laskowski <[EMAIL PROTECTED]>
wrote:

> On Fri, Jul 4, 2008 at 5:46 AM,  <[EMAIL PROTECTED]> wrote:
> > Author: kmalhi
> > Date: Thu Jul  3 20:46:02 2008
> > New Revision: 673899
> >
> > URL: http://svn.apache.org/viewvc?rev=673899&view=rev
> > Log:
> > Fixed OPENEJB-843.
> > Http response was not being flushed fully causing the client to hang.
> > Fixed by flushing the response.
> > Thanks to Dain
>
> Could you let us know how you figured it out? It's not easy to fix
> such issues so any tips for hunting them down would be greatly
> appreciated.
>
> Jacek
>
> --
> Jacek Laskowski
> Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl
>



-- 
Karan Singh Malhi

Reply via email to