You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by Paul Fremantle <pz...@gmail.com> on 2007/10/16 17:10:53 UTC

problem with using NIO HTTP and HTTP GET

I'm trying to use GET on a proxy service hosted in Synapse.
I'm getting this error:

2007-10-16 15:53:12,421 [10.0.0.3-pzfdell] [I/O dispatcher 7]  INFO PipeImpl
Usi
ng simulated buffered Pipes for event-driven to stream IO bridging
2007-10-16 15:53:12,906 [10.0.0.3-pzfdell] [HttpServerWorker-1] ERROR
ServerHand
ler Unexpected HTTP protocol error : Transfer-encoding header already
present
org.apache.http.ProtocolException: Transfer-encoding header already present
        at org.apache.http.protocol.ResponseContent.process(
ResponseContent.java
:67)
        at org.apache.http.protocol.BasicHttpProcessor.process
(BasicHttpProcesso
r.java:304)
        at org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(Serve
rHandler.java:220)
        at
org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons
e(HttpCoreNIOSender.java:352)
        at org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreN

IOSender.java:215)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
        at org.apache.synapse.core.axis2.Axis2Sender.sendBack(
Axis2Sender.java:1
04)
        at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2Synap
seEnvironment.java:170)

I managed to get past this one by commenting out:
            if (httpVersion.greaterEquals(HttpVersion.HTTP_1_1)) {
                //entity.setChunked(true);
            }
line 127 ServerHandler.java

then I get this one:

2007-10-16 16:01:45,125 [10.0.0.3-pzfdell] [HttpServerWorker-1] ERROR
ServerHandler Unexpected HTTP
protocol error : Response already submitted
org.apache.http.HttpException: Response already submitted
        at
org.apache.http.impl.nio.DefaultNHttpServerConnection.submitResponse
(DefaultNHttpServerCo
nnection.java:201)
        at
org.apache.synapse.transport.nhttp.LoggingNHttpServerConnection.submitResponse
(LoggingNHt
tpServerConnection.java:54)
        at org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(
ServerHandler.java:221)
        at
org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncResponse
(HttpCoreNIOSender.
java:352)
        at org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(
HttpCoreNIOSender.java:215)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
        at org.apache.synapse.core.axis2.Axis2Sender.sendBack(
Axis2Sender.java:104)

Help!!??

Paul

-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

Re: problem with using NIO HTTP and HTTP GET

Posted by "Asankha C. Perera" <as...@wso2.com>.
Hi Oleg

Thanks for looking into this.. I have am traveling this week and have 
been quite busy and haven't yet found the time to look into details. 
However your analysis is going to be very helpful to me. I also will 
take a look at the response already committed error I spoke of on 
HttpCore by this weekend..

thanks
asankha

Oleg Kalnichevski wrote:
> On Tue, 2007-10-16 at 19:36 +0100, Paul Fremantle wrote:
>   
>> Using the QA build that was posted a couple of days ago, I deployed
>> sample 100 and typed
>> http://localhost:8080/soap/StockQuoteProxy/getQuote?symbol=IBM into my
>> browser. 
>>
>>     
>
> Asankha, Paul
>
> This is what I think is the cause of the problem:
>
> The ServerWorker class uses the following code to process HTTP GET
> requests
>
> ==================
> try {
>   serverHandler.commitResponse(conn, response);
>   HTTPTransportUtils.processHTTPGetRequest(
>     msgContext, os,
>     (request.getFirstHeader(SOAPACTION) != null ?
>     request.getFirstHeader(SOAPACTION).getValue() : null),
>     request.getRequestLine().getUri(),
>     cfgCtx,
>     parameters);
> } catch (AxisFault axisFault) {
>   handleException("Error processing GET request for: " +
>   request.getRequestLine().getUri(), axisFault);
> }
> ==================
>
> (1) ServerWorker submits 200 response head prior to calling
> HTTPTransportUtils.processHTTPGetRequest
> (2) AxisFault gets thrown somewhere inside #processHTTPGetRequest 
> (3) The #handleException method is called to handle the fault
> (4) At some point AxisEngine#sendFault(faultContext) gets invoked
> (5) AxisEngine attempts to submit an 500 response head
> (6) Things get nasty 
>
> I do not know Axis2 well enough to be able to fix the problem myself
> easily, but I could dig in deeper into the Axis2 code if need be. 
>
> Apparently the bit of code above needs some work.
>
> The NIO HTTP transport in Axis2 proper is very likely to be affected as
> well. 
>
> Cheers
>
> Oleg
>
>
>   
>> 2007-10-16 19:33:59,609 [10.0.0.3-pzfdell] [HttpClientWorker-1] ERROR
>> ServerHand
>> ler Unexpected HTTP protocol error : Transfer-encoding header already
>> present
>> org.apache.http.ProtocolException : Transfer-encoding header already
>> present
>>         at
>> org.apache.http.protocol.ResponseContent.process(ResponseContent.java
>> :67)
>>         at
>> org.apache.http.protocol.BasicHttpProcessor.process(BasicHttpProcesso
>> r.java:304)
>>         at
>> org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(Serve
>> rHandler.java:220)
>>         at
>> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons
>> e(HttpCoreNIOSender.java :350)
>>         at
>> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreN
>> IOSender.java:215)
>>         at
>> org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
>>         at org.apache.synapse.core.axis2.Axis2Sender.sendBack
>> (Axis2Sender.java:1
>> 04)
>>
>>
>> On 10/16/07, Asankha C. Perera <as...@wso2.com> wrote:
>>         Paul
>>         
>>         Can you re-create this with the sample #100 etc? Please send
>>         me details to reproduce.. AFAIK we do not have a test case for
>>         GET access... I will try this out and see what may be wrong..
>>         I believe you are not doing a load test
>>         
>>         asankha
>>         
>>         
>>         Paul Fremantle wrote: 
>>         > I'm trying to use GET on a proxy service hosted in Synapse. 
>>         > I'm getting this error:
>>         > 
>>         > 2007-10-16 15:53:12,421 [10.0.0.3-pzfdell] [I/O dispatcher
>>         > 7]  INFO PipeImpl Usi
>>         > ng simulated buffered Pipes for event-driven to stream IO
>>         > bridging 
>>         > 2007-10-16 15:53:12,906 [10.0.0.3-pzfdell]
>>         > [HttpServerWorker-1] ERROR ServerHand
>>         > ler Unexpected HTTP protocol error : Transfer-encoding
>>         > header already present
>>         > org.apache.http.ProtocolException: Transfer-encoding header
>>         > already present 
>>         >         at
>>         > org.apache.http.protocol.ResponseContent.process(ResponseContent.java
>>         > :67)
>>         >         at
>>         > org.apache.http.protocol.BasicHttpProcessor.process(BasicHttpProcesso
>>         > r.java:304)
>>         >         at
>>         > org.apache.synapse.transport.nhttp.ServerHandler.commitResponse (Serve
>>         > rHandler.java:220)
>>         >         at
>>         > org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons
>>         > e(HttpCoreNIOSender.java:352)
>>         >         at
>>         > org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreN 
>>         > IOSender.java:215)
>>         >         at
>>         > org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
>>         >         at
>>         > org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:1
>>         > 04)
>>         >         at
>>         > org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send
>>         > (Axis2Synap
>>         > seEnvironment.java:170)
>>         > 
>>         > I managed to get past this one by commenting out: 
>>         >             if
>>         > (httpVersion.greaterEquals(HttpVersion.HTTP_1_1)) {
>>         >                 //entity.setChunked(true);
>>         >             } 
>>         > line 127 ServerHandler.java
>>         > 
>>         > then I get this one:
>>         > 
>>         > 2007-10-16 16:01:45,125 [10.0.0.3-pzfdell]
>>         > [HttpServerWorker-1] ERROR ServerHandler Unexpected HTTP
>>         > protocol error : Response already submitted
>>         > org.apache.http.HttpException : Response already submitted
>>         >         at
>>         > org.apache.http.impl.nio.DefaultNHttpServerConnection.submitResponse(DefaultNHttpServerCo
>>         > nnection.java:201)
>>         >         at
>>         > org.apache.synapse.transport.nhttp.LoggingNHttpServerConnection.submitResponse (LoggingNHt
>>         > tpServerConnection.java:54)
>>         >         at
>>         > org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(ServerHandler.java:221)
>>         >         at
>>         > org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncResponse (HttpCoreNIOSender.
>>         > java:352)
>>         >         at
>>         > org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreNIOSender.java:215)
>>         >         at
>>         > org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
>>         >         at
>>         > org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:104)
>>         > 
>>         > Help!!?? 
>>         > 
>>         > Paul
>>         > 
>>         > -- 
>>         > Paul Fremantle
>>         > Co-Founder and VP of Technical Sales, WSO2
>>         > OASIS WS-RX TC Co-chair
>>         > 
>>         > blog: http://pzf.fremantle.org
>>         > paul@wso2.com
>>         > 
>>         > "Oxygenating the Web Service Platform", www.wso2.com
>>
>>
>>
>> -- 
>> Paul Fremantle
>> Co-Founder and VP of Technical Sales, WSO2
>> OASIS WS-RX TC Co-chair
>>
>> blog: http://pzf.fremantle.org
>> paul@wso2.com
>>
>> "Oxygenating the Web Service Platform", www.wso2.com
>>     
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>
>   

Re: problem with using NIO HTTP and HTTP GET

Posted by Paul Fremantle <pz...@gmail.com>.
Thanks Oleg. I've raised https://issues.apache.org/jira/browse/SYNAPSE-155

Paul

On 10/18/07, Oleg Kalnichevski <ol...@apache.org> wrote:
>
> On Thu, 2007-10-18 at 14:15 +0100, Paul Fremantle wrote:
> > Great... the other problem is some kind of WSDL related mismatch.
> >
> > Can I have the code :)
> >
>
> Sure. It is all yours. The trouble is the patch still does not solve the
> bug that I observed in more complex scenarios (sample 100 for instance).
> Synapse seems to have a problem with passing Faults from the target
> service to the client.  There is still more investigating to be done.
> So, you may want to open a JIRA report for this issue and I'll happily
> attach the patch to it.
>
> Cheers
>
> Oleg
>
>
> > Paul
> >
> > On 10/18/07, Oleg Kalnichevski <ol...@apache.org> wrote:
> >         On Thu, 2007-10-18 at 14:01 +0100, Paul Fremantle wrote:
> >         > Oleg
> >         >
> >         > Can you test with this Synapse.xml
> >         >
> >         >  <proxy name="test">
> >         >         <target>
> >         >             <inSequence>
> >         >                <script language="groovy"><![CDATA[
> >         >                   println mc.getReplyTo();
> >         >
> >         > mc.setTo("http://www.w3.org/2005/08/addressing/anonymous");
> >         >                   mc.setProperty ("RESPONSE", "true");
> >         >                   mc.setPayloadXML('''
> >         >                     <ns:getQuoteResponse
> >         > xmlns:ns="http://services.samples/xsd">
> >         >                       <ns:return>
> >         >                     <ns:last>99.9</ns:last>
> >         >                 </ns:return>
> >         >              </ns:getQuoteResponse>''');
> >         >        ]]></script>
> >         >             <send/>
> >         >             </inSequence>
> >         >             <outSequence>
> >         >               <send/>
> >         >             </outSequence>
> >         >         </target>
> >         >     </proxy>
> >         >
> >         > and url
> >         >
> >         > http://localhost:8080/soap/test/op?param1=hi
> >         >
> >
> >         That seems to work fine with my patch
> >
> >         ----------------------------------
> >         [INFO] PipeImpl - Using native OS Pipes for event-driven to
> >         stream IO
> >         bridging
> >         [DEBUG] headers - >> GET /soap/test/op?param1=hi HTTP/1.1
> >         [DEBUG] headers - >> Host: localhost:8080
> >         [DEBUG] headers - >> User-Agent: Mozilla/5.0 (X11; U; Linux
> >         i686; en-US;
> >         rv:1.8.1.6) Gecko/20061201 Firefox/2.0.0.6 (Ubuntu-feisty)
> >         [DEBUG] headers - >> Accept:
> >         text/xml,application/xml,application/xhtml
> >         +xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
> >         [DEBUG] headers - >> Accept-Language: en,it;q=0.5
> >         [DEBUG] headers - >> Accept-Encoding: gzip,deflate
> >         [DEBUG] headers - >> Accept-Charset: ISO-8859-1,utf-8;q=
> >         0.7,*;q=0.7
> >         [DEBUG] headers - >> Keep-Alive: 300
> >         [DEBUG] headers - >> Connection: keep-alive
> >         null
> >         [DEBUG] headers - << HTTP/1.1 200 OK
> >         [DEBUG] headers - << Content-Type: application/xml;
> >         charset=UTF-8
> >         [DEBUG] headers - << Host: localhost:8080
> >         [DEBUG] headers - << Accept-Encoding: gzip,deflate
> >         [DEBUG] headers - << Accept-Language: en,it;q=0.5
> >         [DEBUG] headers - << Accept-Charset: ISO-8859-1,utf-8;q=
> >         0.7,*;q=0.7
> >         [DEBUG] headers - << Keep-Alive: 300
> >         [DEBUG] headers - << Accept:
> >         text/xml,application/xml,application/xhtml
> >         +xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
> >         [DEBUG] headers - << Date: Thu, 18 Oct 2007 13:06:44 GMT
> >         [DEBUG] headers - << Server: Synapse-HttpComponents-NIO
> >         [DEBUG] headers - << Transfer-Encoding: chunked
> >         [DEBUG] headers - << Connection: keep-alive
> >         ----------------------------------
> >         <ns:getQuoteResponse xmlns:ns=" http://services.samples/xsd">
> >                               <ns:return>
> >                             <ns:last>99.9</ns:last>
> >                         </ns:return>
> >                      </ns:getQuoteResponse>
> >         ----------------------------------
> >
> >         Oleg
> >
> >
> >         > On 10/18/07, Oleg Kalnichevski < olegk@apache.org> wrote:
> >         >         On Wed, 2007-10-17 at 20:40 +0100, Paul Fremantle
> >         wrote:
> >         >         > THANKS!
> >         >         >
> >         >         > Paul
> >         >         >
> >         >
> >         >         Paul and all,
> >         >
> >         >         I think I have a partial fix for the problem. At the
> >         very
> >         >         least I am no
> >         >         longer getting "Transfer-encoding header already
> >         present" and
> >         >         "response
> >         >         already submitted" exceptions. However, I am still
> >         seeing some
> >         >         funny
> >         >         stuff happening when accessing sample Axis2 server
> >         with a
> >         >         browser.
> >         >
> >         >         Sample client works just fine
> >         >         --------------------------------
> >         >         samples/axis2Client$ ant stockquote
> >         >
> >         -Daddurl=http://localhost:9000/soap/SimpleStockQuoteService
> >         >         -Dmode=quote
> >         >         -Dsymbol=IBMBuildfile: build.xml
> >         >
> >         >         init:
> >         >             [mkdir] Created
> >         >
> >         dir:
> /home/oleg/src/apache.org/webservices/synapse/java/target/synapse-SNAPSHOT/samples/axis2Client/target/classes
> >         >
> >         >         compile:
> >         >             [javac] Compiling 10 source files
> >         >
> >         to
> /home/oleg/src/apache.org/webservices/synapse/java/target/synapse-SNAPSHOT/samples/axis2Client/target/classes
> >         >
> >         >         stockquote:
> >         >              [java] Standard :: Stock price =
> >         $91.61813193560333
> >         >
> >         >         BUILD SUCCESSFUL
> >         >         Total time: 5 seconds
> >         >         --------------------------------
> >         >
> >         >         However when trying to execute the same request
> >         >
> >         <
> http://localhost:9000/soap/SimpleStockQuoteService/getQuote?symbol=IBM>
> >         >         from a browser I am getting this fault. Is this
> >         expected? Am I
> >         >         doing it
> >         >         wrong?
> >         >
> >         >         --------------------------------
> >         >         [DEBUG] headers - >>
> >         >
> >         GET /soap/SimpleStockQuoteService/getQuote?symbol=IBM HTTP/1.1
> >         >         [DEBUG] headers - >> Host: localhost:9000
> >         >         [DEBUG] headers - >> User-Agent: Mozilla/5.0 (X11;
> >         U; Linux
> >         >         i686; en-US;
> >         >         rv:1.8.1.6) Gecko/20061201 Firefox/2.0.0.6
> >         (Ubuntu-feisty)
> >         >         [DEBUG] headers - >> Accept:
> >         >         text/xml,application/xml,application/xhtml
> >         >
> >         +xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q= 0.5
> >         >         [DEBUG] headers - >> Accept-Language: en,it;q=0.5
> >         >         [DEBUG] headers - >> Accept-Encoding: gzip,deflate
> >         >         [DEBUG] headers - >> Accept-Charset:
> >         >         ISO-8859-1,utf-8;q=0.7,*;q=0.7
> >         >         [DEBUG] headers - >> Keep-Alive: 300
> >         >         [DEBUG] headers - >> Connection: keep-alive
> >         >         [ERROR] RPCMessageReceiver - Exception occurred
> >         while trying
> >         >         to invoke
> >         >         service method getQuote <org.apache.axis2.AxisFault:
> >         namespace
> >         >         mismatch
> >         >         require http://services.samples/xsd found
> >         >
> >         http://org.apache.axis2/xsd>org.apache.axis2.AxisFault:
> >         >         namespace
> >         >         mismatch require http://services.samples/xsd found
> >         >         http://org.apache.axis2/xsd
> >         >                 at
> >         >
> >         org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(
> RPCUtil.java:177)
> >         >                 at
> >         >
> >
> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic (
> RPCMessageReceiver.java :98)
> >         >                 at
> >         >
> >
> org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic
> (AbstractInOutMessageReceiver.java:40)
> >         >                 at
> >         >
> >         org.apache.axis2.receivers.AbstractMessageReceiver.receive
> >         >         (AbstractMessageReceiver.java:96)
> >         >                 at
> >         >
> >         org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
> >         >                 at
> >         >
> >
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPGetRequest (
> HTTPTransportUtils.java :249)
> >         >                 at
> >         >
> >         org.apache.synapse.transport.nhttp.ServerWorker.processGet(
> ServerWorker.java:401)
> >         >                 at
> >         >         org.apache.synapse.transport.nhttp.ServerWorker.run
> >         (ServerWorker.java:180)
> >         >                 at java.util.concurrent.ThreadPoolExecutor
> >         >         $Worker.runTask(ThreadPoolExecutor.java:650)
> >         >                 at java.util.concurrent.ThreadPoolExecutor
> >         >         $Worker.run(ThreadPoolExecutor.java:675)
> >         >                 at java.lang.Thread.run(Thread.java:595)
> >         >
> >         >         [ERROR] ServerWorker - Error processing GET request
> >         >
> >         for: /soap/SimpleStockQuoteService/getQuote?symbol=IBM
> >         >         <org.apache.axis2.AxisFault: namespace mismatch
> >         require
> >         >         http://services.samples/xsd found
> >         >
> >         http://org.apache.axis2/xsd>org.apache.axis2.AxisFault:
> >         >         namespace
> >         >         mismatch require http://services.samples/xsd found
> >         >         http://org.apache.axis2/xsd
> >         >                 at
> >         >
> >         org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(
> RPCUtil.java:177)
> >         >                 at
> >         >
> >
> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic (
> RPCMessageReceiver.java:98)
> >         >                 at
> >         >
> >
> org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic
> (AbstractInOutMessageReceiver.java:40)
> >         >                 at
> >         >
> >         org.apache.axis2.receivers.AbstractMessageReceiver.receive(
> AbstractMessageReceiver.java :96)
> >         >                 at
> >         >
> >         org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
> >         >                 at
> >         >
> >
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPGetRequest(
> HTTPTransportUtils.java:249)
> >         >                 at
> >         >
> >         org.apache.synapse.transport.nhttp.ServerWorker.processGet(
> ServerWorker.java:401)
> >         >                 at
> >         >
> >         org.apache.synapse.transport.nhttp.ServerWorker.run(
> ServerWorker.java:180)
> >         >                 at java.util.concurrent.ThreadPoolExecutor
> >         >         $Worker.runTask( ThreadPoolExecutor.java:650)
> >         >                 at java.util.concurrent.ThreadPoolExecutor
> >         >         $Worker.run(ThreadPoolExecutor.java:675)
> >         >                 at java.lang.Thread.run(Thread.java:595)
> >         >
> >         >         [DEBUG] headers - << HTTP/1.1 500 Internal Server
> >         Error
> >         >         [DEBUG] headers - << Content-Type: application/xml;
> >         >         charset=UTF-8
> >         >         [DEBUG] headers - << Date: Thu, 18 Oct 2007 10:51:41
> >         GMT
> >         >         [DEBUG] headers - << Server:
> >         Synapse-HttpComponents-NIO
> >         >         [DEBUG] headers - << Transfer-Encoding: chunked
> >         >         [DEBUG] headers - << Connection: Close
> >         >         --------------------------------
> >         >
> >         >         Oleg
> >         >
> >         >
> >         >         > On 10/17/07, Oleg Kalnichevski <ol...@apache.org>
> >         wrote:
> >         >         >         On Wed, 2007-10-17 at 17:27 +0100, Paul
> >         Fremantle
> >         >         wrote:
> >         >         >         > Oleg
> >         >         >         >
> >         >         >         > I have a scenario where if I call via
> >         SOAP POST it
> >         >         works
> >         >         >         fine. When I
> >         >         >         > call by HTTP GET I get this
> >         >         >         >
> >         >         >         > 2007-10-17 17:27:01,718
> >         [ 10.62.75.83-pzfdell]
> >         >         >         [HttpServerWorker-1]
> >         >         >         > ERROR ServerHandler Unexpected HT
> >         >         >         > TP protocol error : Transfer-encoding
> >         header
> >         >         already present
> >         >         >         > org.apache.http.ProtocolException :
> >         >         Transfer-encoding header
> >         >         >         already
> >         >         >         > present
> >         >         >         >         at
> >         >         >         >
> >         >         >
> >         org.apache.http.protocol.ResponseContent.process
> >         >         (ResponseContent.java :67)
> >         >         >         >         at
> >         >         >         >
> >         >         >
> >         >         org.apache.http.protocol.BasicHttpProcessor.process
> >         (BasicHttpProcessor.java :304)
> >         >         >         >         at
> >         >         >         >
> >         >         >
> >         >
> >         org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(
> ServerHandler.java :220)
> >         >         >         >         at
> >         >         >         >
> >         >         >
> >         >
> >
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncResponse
> >         >         >         > (HttpCoreNIOSender.
> >         >         >         > java:350)
> >         >         >         >         at
> >         >         >         >
> >         >         >
> >         >
> >         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(
> HttpCoreNIOSender.java :215)
> >         >         >         >         at
> >         >         >         > org.apache.axis2.engine.AxisEngine.send
> >         >         >         (AxisEngine.java:396)
> >         >         >         >         at
> >         >         >         >
> >         >         >
> >         org.apache.synapse.core.axis2.Axis2Sender.sendBack
> >         >         (Axis2Sender.java:104)
> >         >         >         >         at
> >         >         >         >
> >         >         >
> >         >
> >         org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(
> Axis2SynapseEnvironment.java :1
> >         >         >         > 96)
> >         >         >         >
> >         >         >         > So, I don't think its just the Fault
> >         case :(
> >         >         >         >
> >         >         >         > Paul
> >         >         >         >
> >         >         >
> >         >         >         Hi Paul
> >         >         >
> >         >         >         That does not look good.
> >         >         >
> >         >         >         I'll _try_ to come up with a fix for the
> >         bug, but
> >         >         it'll
> >         >         >         require some
> >         >         >         poking around with the Synapse and Axis2
> >         code.
> >         >         >
> >         >         >         Oleg
> >         >         >
> >         >         >         > On 10/17/07, Paul Fremantle <
> >         pzfreo@gmail.com>
> >         >         wrote:
> >         >         >         >         If I can get the success case
> >         working I'll
> >         >         be happy
> >         >         >         for now.
> >         >         >         >         Its just I thought I had that
> >         case and
> >         >         that was
> >         >         >         failing too :(
> >         >         >         >
> >         >         >         >         Let me dig around a bit.
> >         However, I think
> >         >         we need to
> >         >         >         get this
> >         >         >         >         fixed and solid before 1.1 . I
> >         think
> >         >         there's also a
> >         >         >         problem
> >         >         >         >         with the logic, which is that
> >         the
> >         >         assumption is that
> >         >         >         if there
> >         >         >         >         are no parameters then I don't
> >         want to
> >         >         invoke the
> >         >         >         service - I
> >         >         >         >         just want to see the service
> >         HTML.
> >         >         However, I don't
> >         >         >         agree with
> >         >         >         >         that - I think there are lots of
> >         cases
> >         >         where I want
> >         >         >         no
> >         >         >         >         parameters to equate to an empty
> >         body. It
> >         >         may be
> >         >         >         that the same
> >         >         >         >         problem exists in the standard
> >         Axis2 HTTP
> >         >         tran as
> >         >         >         well.
> >         >         >         >
> >         >         >         >         Paul
> >         >         >         >
> >         >         >         >
> >         >         >         >         On 10/17/07, Oleg Kalnichevski
> >         >         <ol...@apache.org>
> >         >         >         wrote:
> >         >         >         >                 On Wed, 2007-10-17 at
> >         16:01 +0100,
> >         >         Paul
> >         >         >         Fremantle
> >         >         >         >                 wrote:
> >         >         >         >                 > Oleg
> >         >         >         >                 >
> >         >         >         >                 > Do you think the
> >         problem will
> >         >         still happen
> >         >         >         on the
> >         >         >         >                 non-fault case.
> >         >         >         >                 >
> >         >         >         >                 > Paul
> >         >         >         >                 >
> >         >         >         >
> >         >         >         >                 No, I do not think so.
> >         Only fault
> >         >         responses
> >         >         >         appear
> >         >         >         >                 affected. I can try
> >         >         >         >                 to come up with a fix
> >         for the bug
> >         >         if the
> >         >         >         issue is
> >         >         >         >                 pressing.
> >         >         >         >
> >         >         >         >                 Cheers
> >         >         >         >
> >         >         >         >                 Oleg
> >         >         >         >
> >         >         >         >
> >         >         >         >                 > On 10/17/07, Oleg
> >         Kalnichevski
> >         >         >         <ol...@apache.org>
> >         >         >         >                 wrote:
> >         >         >         >                 >         On Tue,
> >         2007-10-16 at
> >         >         19:36 +0100,
> >         >         >         Paul
> >         >         >         >                 Fremantle wrote:
> >         >         >         >                 >         > Using the QA
> >         build
> >         >         that was
> >         >         >         posted a
> >         >         >         >                 couple of days ago, I
> >         >         >         >                 >         deployed
> >         >         >         >                 >         > sample 100
> >         and typed
> >         >         >         >                 >         >
> >         >         >         >                 >
> >         >         >         >
> >         >         >
> >         >
> >         http://localhost:8080/soap/StockQuoteProxy/getQuote?symbol=IBM
> >         >         >         >                 >         into my
> >         >         >         >                 >         > browser.
> >         >         >         >                 >         >
> >         >         >         >                 >
> >         >         >         >                 >         Asankha, Paul
> >         >         >         >                 >
> >         >         >         >                 >         This is what I
> >         think is
> >         >         the cause
> >         >         >         of the
> >         >         >         >                 problem:
> >         >         >         >                 >
> >         >         >         >                 >         The
> >         ServerWorker class
> >         >         uses the
> >         >         >         following
> >         >         >         >                 code to process HTTP
> >         >         >         >                 >         GET
> >         >         >         >                 >         requests
> >         >         >         >                 >
> >         >         >         >                 >
> >         ==================
> >         >         >         >                 >         try {
> >         >         >         >                 >
> >         >         serverHandler.commitResponse
> >         >         >         (conn,
> >         >         >         >                 response);
> >         >         >         >                 >
> >         >         >         HTTPTransportUtils.processHTTPGetRequest (
> >         >         >         >                 >
> >         msgContext, os,
> >         >         >         >                 >
> >         >         >         ( request.getFirstHeader (SOAPACTION) !=
> >         >         >         >                 null ?
> >         >         >         >                 >
> >         >         request.getFirstHeader
> >         >         >         >
> >         (SOAPACTION).getValue() : null),
> >         >         >         >                 >
> >         >         >         request.getRequestLine().getUri(),
> >         >         >         >                 >             cfgCtx,
> >         >         >         >                 >
> >         parameters);
> >         >         >         >                 >         } catch
> >         (AxisFault
> >         >         axisFault) {
> >         >         >         >                 >
> >         >         handleException("Error
> >         >         >         processing GET
> >         >         >         >                 request for: " +
> >         >         >         >                 >
> >         >         >         request.getRequestLine().getUri(),
> >         >         >         >                 axisFault);
> >         >         >         >                 >         }
> >         >         >         >                 >
> >         ==================
> >         >         >         >                 >
> >         >         >         >                 >         (1)
> >         ServerWorker submits
> >         >         200
> >         >         >         response head
> >         >         >         >                 prior to calling
> >         >         >         >                 >
> >         >         >         HTTPTransportUtils.processHTTPGetRequest
> >         >         >         >                 >         (2) AxisFault
> >         gets
> >         >         thrown
> >         >         >         somewhere inside
> >         >         >         >                 >
> >         #processHTTPGetRequest
> >         >         >         >                 >         (3) The
> >         #handleException
> >         >         method is
> >         >         >         called to
> >         >         >         >                 handle the fault
> >         >         >         >                 >         (4) At some
> >         point
> >         >         >         >
> >         AxisEngine#sendFault(faultContext)
> >         >         gets
> >         >         >         >                 >         invoked
> >         >         >         >                 >         (5) AxisEngine
> >         attempts
> >         >         to submit
> >         >         >         an 500
> >         >         >         >                 response head
> >         >         >         >                 >         (6) Things get
> >         nasty
> >         >         >         >                 >
> >         >         >         >                 >         I do not know
> >         Axis2 well
> >         >         enough to
> >         >         >         be able
> >         >         >         >                 to fix the problem
> >         >         >         >                 >         myself
> >         >         >         >                 >         easily, but I
> >         could dig
> >         >         in deeper
> >         >         >         into the
> >         >         >         >                 Axis2 code if need
> >         >         >         >                 >         be.
> >         >         >         >                 >
> >         >         >         >                 >         Apparently the
> >         bit of
> >         >         code above
> >         >         >         needs some
> >         >         >         >                 work.
> >         >         >         >                 >
> >         >         >         >                 >         The NIO HTTP
> >         transport
> >         >         in Axis2
> >         >         >         proper is
> >         >         >         >                 very likely to be
> >         >         >         >                 >         affected as
> >         >         >         >                 >         well.
> >         >         >         >                 >
> >         >         >         >                 >         Cheers
> >         >         >         >                 >
> >         >         >         >                 >         Oleg
> >         >         >         >                 >
> >         >         >         >                 >
> >         >         >         >                 >         > 2007-10-16
> >         >         19:33:59,609
> >         >         >         [10.0.0.3-pzfdell]
> >         >         >         >                 >
> >         [HttpClientWorker-1]
> >         >         ERROR
> >         >         >         >                 >         > ServerHand
> >         >         >         >                 >         > ler
> >         Unexpected HTTP
> >         >         protocol
> >         >         >         error :
> >         >         >         >                 Transfer-encoding
> >         >         >         >                 >         header already
> >         >         >         >                 >         > present
> >         >         >         >                 >         >
> >         >         >         org.apache.http.ProtocolException :
> >         >         >         >                 Transfer-encoding header
> >         >         >         >                 >         already
> >         >         >         >                 >         > present
> >         >         >         >                 >         >         at
> >         >         >         >                 >         >
> >         >         >         >                 >
> >         >         >         >
> >         >         >
> >         org.apache.http.protocol.ResponseContent.process
> >         >         >         (ResponseContent.java
> >         >         >         >                 >         > :67)
> >         >         >         >                 >         >         at
> >         >         >         >                 >         >
> >         >         >         >                 >
> >         >         >         >
> >         >         >
> >         org.apache.http.protocol.BasicHttpProcessor.process
> >         >         >         (BasicHttpProcesso
> >         >         >         >                 >         > r.java:304)
> >         >         >         >                 >         >         at
> >         >         >         >                 >         >
> >         >         >         >                 >
> >         >         >         >
> >         >         >
> >         >
> >         org.apache.synapse.transport.nhttp.ServerHandler.commitResponse
> (Serve
> >         >         >         >                 >         >
> >         rHandler.java:220)
> >         >         >         >                 >         >         at
> >         >         >         >                 >         >
> >         >         >         >                 >
> >         >         >         >
> >         >         >
> >         >
> >
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons
> >         >         >         >                 >         >
> >         >         e( HttpCoreNIOSender.java :350)
> >         >         >         >                 >         >         at
> >         >         >         >                 >         >
> >         >         >         >                 >
> >         >         >         >
> >         >         >
> >         >
> >         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke
> (HttpCoreN
> >         >         >         >                 >         >
> >         IOSender.java :215)
> >         >         >         >                 >         >         at
> >         >         >         >                 >         >
> >         >         >         >
> >         >         >
> >         >
> >         org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
> >         >         >         >                 >         >         at
> >         >         >         >                 >
> >         >         >         >
> >         >         >
> >         org.apache.synapse.core.axis2.Axis2Sender.sendBack
> >         >         >         >                 >         >
> >         (Axis2Sender.java:1
> >         >         >         >                 >         > 04)
> >         >         >         >                 >         >
> >         >         >         >                 >         >
> >         >         >         >                 >         > On 10/16/07,
> >         Asankha
> >         >         C. Perera
> >         >         >         >                 < asankha@wso2.com>
> >         wrote:
> >         >         >         >                 >         >
> >         Paul
> >         >         >         >                 >         >
> >         >         >         >                 >         >         Can
> >         you
> >         >         re-create this
> >         >         >         with the
> >         >         >         >                 sample #100 etc?
> >         >         >         >                 >         Please send
> >         >         >         >                 >         >         me
> >         details to
> >         >         >         reproduce.. AFAIK we
> >         >         >         >                 do not have a
> >         >         >         >                 >         test case for
> >         >         >         >                 >         >         GET
> >         access...
> >         >         I will try
> >         >         >         this out
> >         >         >         >                 and see what may
> >         >         >         >                 >         be wrong..
> >         >         >         >                 >         >         I
> >         believe you
> >         >         are not
> >         >         >         doing a load
> >         >         >         >                 test
> >         >         >         >                 >         >
> >         >         >         >                 >         >
> >         asankha
> >         >         >         >                 >         >
> >         >         >         >                 >         >
> >         >         >         >                 >         >         Paul
> >         Fremantle
> >         >         wrote:
> >         >         >         >                 >         >         >
> >         I'm trying
> >         >         to use GET
> >         >         >         on a proxy
> >         >         >         >                 service hosted in
> >         >         >         >                 >         Synapse.
> >         >         >         >                 >         >         >
> >         I'm getting
> >         >         this
> >         >         >         error:
> >         >         >         >                 >         >         >
> >         >         >         >                 >         >         >
> >         2007-10-16
> >         >         >         15:53:12,421
> >         >         >         >                 [ 10.0.0.3-pzfdell] [I/O
> >         >         >         >                 >         dispatcher
> >         >         >         >                 >         >         >
> >         7]  INFO
> >         >         PipeImpl Usi
> >         >         >         >                 >         >         > ng
> >         simulated
> >         >         buffered
> >         >         >         Pipes for
> >         >         >         >                 event-driven to
> >         >         >         >                 >         stream IO
> >         >         >         >                 >         >         >
> >         bridging
> >         >         >         >                 >         >         >
> >         2007-10-16
> >         >         >         15:53:12,906
> >         >         >         >                 [ 10.0.0.3-pzfdell]
> >         >         >         >                 >         >         >
> >         >         [HttpServerWorker-1]
> >         >         >         ERROR
> >         >         >         >                 ServerHand
> >         >         >         >                 >         >         >
> >         ler
> >         >         Unexpected HTTP
> >         >         >         protocol
> >         >         >         >                 error :
> >         >         >         >                 >
> >         Transfer-encoding
> >         >         >         >                 >         >         >
> >         header
> >         >         already present
> >         >         >         >                 >         >         >
> >         >         >         >
> >         >         org.apache.http.ProtocolException :
> >         >         >         >                 >
> >         Transfer-encoding header
> >         >         >         >                 >         >         >
> >         already
> >         >         present
> >         >         >         >                 >         >         >
> >         at
> >         >         >         >                 >         >         >
> >         >         >         >                 >
> >         >         >         >
> >         >         >
> >         >
> >         org.apache.http.protocol.ResponseContent.process(
> ResponseContent.java
> >         >         >         >                 >         >
> >         > :67)
> >         >         >         >                 >         >         >
> >         at
> >         >         >         >                 >         >         >
> >         >         >         >                 >
> >         >         >         >
> >         >         >
> >         org.apache.http.protocol.BasicHttpProcessor.process
> >         >         >         (BasicHttpProcesso
> >         >         >         >                 >         >         >
> >         r.java:304)
> >         >         >         >                 >         >         >
> >         at
> >         >         >         >                 >         >         >
> >         >         >         >                 >
> >         >         >         >
> >         >         >
> >         >
> >         org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(Serve
> >         >         >         >                 >         >         >
> >         >         rHandler.java:220)
> >         >         >         >                 >         >         >
> >         at
> >         >         >         >                 >         >         >
> >         >         >         >                 >
> >         >         >         >
> >         >         >
> >         >
> >
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons
> >         >         >         >                 >         >         >
> >         >         >         e( HttpCoreNIOSender.java:352)
> >         >         >         >                 >         >         >
> >         at
> >         >         >         >                 >         >         >
> >         >         >         >                 >
> >         >         >         >
> >         >         >
> >         >
> >         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke
> >         >         >         (HttpCoreN
> >         >         >         >                 >         >         >
> >         >         IOSender.java:215)
> >         >         >         >                 >         >         >
> >         at
> >         >         >         >                 >         >         >
> >         >         >         >                 >
> >         >         >         >
> >         >         >
> >         >
> >         org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
> >         >         >         >                 >         >         >
> >         at
> >         >         >         >                 >         >         >
> >         >         >         >                 >
> >         >         >         >
> >         >         >
> >         >         org.apache.synapse.core.axis2.Axis2Sender.sendBack
> >         (Axis2Sender.java:1
> >         >         >         >                 >         >         >
> >         04)
> >         >         >         >                 >         >         >
> >         at
> >         >         >         >                 >         >         >
> >         >         >         >                 >
> >         >         >         >
> >         >         >
> >         >
> >         org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send
> >         >         >         >                 >         >         >
> >         (Axis2Synap
> >         >         >         >                 >         >         >
> >         >         >         seEnvironment.java:170)
> >         >         >         >                 >         >         >
> >         >         >         >                 >         >         > I
> >         managed to
> >         >         get past
> >         >         >         this one
> >         >         >         >                 by commenting out:
> >         >         >         >                 >         >         >
> >         >         if
> >         >         >         >                 >         >         >
> >         >         >         >
> >         >         >
> >         (httpVersion.greaterEquals(HttpVersion.HTTP_1_1 ))
> >         >         >         >                 >         {
> >         >         >         >                 >         >
> >         >         >         >
> >         >         >                 //entity.setChunked(true);
> >         >         >         >                 >         >
> >         >         >             }
> >         >         >         >                 >         >         >
> >         line 127
> >         >         >         ServerHandler.java
> >         >         >         >                 >         >         >
> >         >         >         >                 >         >         >
> >         then I get
> >         >         this one:
> >         >         >         >                 >         >         >
> >         >         >         >                 >         >         >
> >         2007-10-16
> >         >         >         16:01:45,125
> >         >         >         >                 [10.0.0.3-pzfdell]
> >         >         >         >                 >         >         >
> >         >         [HttpServerWorker-1]
> >         >         >         ERROR
> >         >         >         >                 ServerHandler
> >         >         >         >                 >         Unexpected
> >         HTTP
> >         >         >         >                 >         >         >
> >         protocol
> >         >         error :
> >         >         >         Response
> >         >         >         >                 already submitted
> >         >         >         >                 >         >         >
> >         >         >         org.apache.http.HttpException :
> >         >         >         >                 Response already
> >         >         >         >                 >         submitted
> >         >         >         >                 >         >         >
> >         at
> >         >         >         >                 >         >         >
> >         >         >         >                 >
> >         >         >         >
> >         >         >
> >         >
> >
> org.apache.http.impl.nio.DefaultNHttpServerConnection.submitResponse(DefaultNHttpServerCo
> >         >         >         >                 >         >         >
> >         >         nnection.java:201)
> >         >         >         >                 >         >         >
> >         at
> >         >         >         >                 >         >         >
> >         >         >         >                 >
> >         >         >         >
> >         >         >
> >         >
> >
> org.apache.synapse.transport.nhttp.LoggingNHttpServerConnection.submitResponse(LoggingNHt
> >         >         >         >                 >         >         >
> >         >         >         tpServerConnection.java:54)
> >         >         >         >                 >         >         >
> >         at
> >         >         >         >                 >         >         >
> >         >         >         >                 >
> >         >         >         >
> >         >         >
> >         >
> >         org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(
> ServerHandler.java:221)
> >         >         >         >                 >         >         >
> >         at
> >         >         >         >                 >         >         >
> >         >         >         >                 >
> >         >         >         >
> >         >         >
> >         >
> >
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncResponse(HttpCoreNIOSender.
> >         >         >         >                 >         >         >
> >         java:352)
> >         >         >         >                 >         >         >
> >         at
> >         >         >         >                 >         >         >
> >         >         >         >                 >
> >         >         >         >
> >         >         >
> >         >
> >         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke
> >         >         >         >                 >
> >         >         (HttpCoreNIOSender.java :215)
> >         >         >         >                 >         >         >
> >         at
> >         >         >         >                 >         >         >
> >         >         >         >                 >
> >         >         >         >
> >         >         >
> >         >
> >         org.apache.axis2.engine.AxisEngine.send(AxisEngine.java :396)
> >         >         >         >                 >         >         >
> >         at
> >         >         >         >                 >         >         >
> >         >         >         >
> >         >         >
> >         org.apache.synapse.core.axis2.Axis2Sender.sendBack
> >         >         >         >                 >
> >         ( Axis2Sender.java:104)
> >         >         >         >                 >         >         >
> >         >         >         >                 >         >         >
> >         Help!!??
> >         >         >         >                 >         >         >
> >         >         >         >                 >         >         >
> >         Paul
> >         >         >         >                 >         >         >
> >         >         >         >                 >         >         >
> >         --
> >         >         >         >                 >         >         >
> >         Paul
> >         >         Fremantle
> >         >         >         >                 >         >         >
> >         Co-Founder
> >         >         and VP of
> >         >         >         Technical
> >         >         >         >                 Sales, WSO2
> >         >         >         >                 >         >         >
> >         OASIS WS-RX
> >         >         TC
> >         >         >         Co-chair
> >         >         >         >                 >         >         >
> >         >         >         >                 >         >         >
> >         blog:
> >         >         >         http://pzf.fremantle.org
> >         >         >         >                 >         >         >
> >         >         paul@wso2.com
> >         >         >         >                 >         >         >
> >         >         >         >                 >         >         >
> >         "Oxygenating
> >         >         the Web
> >         >         >         Service
> >         >         >         >                 Platform",
> >         >         >         >                 >         www.wso2.com
> >         >         >         >                 >         >
> >         >         >         >                 >         >
> >         >         >         >                 >         >
> >         >         >         >                 >         > --
> >         >         >         >                 >         > Paul
> >         Fremantle
> >         >         >         >                 >         > Co-Founder
> >         and VP of
> >         >         Technical
> >         >         >         Sales, WSO2
> >         >         >         >                 >         > OASIS WS-RX
> >         TC
> >         >         Co-chair
> >         >         >         >                 >         >
> >         >         >         >                 >         > blog:
> >         >         http://pzf.fremantle.org
> >         >         >         >                 >         >
> >         paul@wso2.com
> >         >         >         >                 >         >
> >         >         >         >                 >         > "Oxygenating
> >         the Web
> >         >         Service
> >         >         >         Platform",
> >         >         >         >                 www.wso2.com
> >         >         >         >                 >
> >         >         >         >                 >
> >         >         >         >                 >
> >         >         >         >
> >         >         >
> >         >
> >
> ---------------------------------------------------------------------
> >         >         >         >                 >         To
> >         unsubscribe, e-mail:
> >         >         >         >
> >         >         synapse-dev-unsubscribe@ws.apache.org
> >         >         >         >                 >         For additional
> >         commands,
> >         >         e-mail:
> >         >         >         >                 >
> >         >         synapse-dev-help@ws.apache.org
> >         >         >         >                 >
> >         >         >         >                 >
> >         >         >         >                 >
> >         >         >         >                 >
> >         >         >         >                 > --
> >         >         >         >                 > Paul Fremantle
> >         >         >         >                 > Co-Founder and VP of
> >         Technical
> >         >         Sales, WSO2
> >         >         >         >                 > OASIS WS-RX TC
> >         Co-chair
> >         >         >         >                 >
> >         >         >         >                 > blog:
> >         http://pzf.fremantle.org
> >         >         >         >                 > paul@wso2.com
> >         >         >         >                 >
> >         >         >         >                 > "Oxygenating the Web
> >         Service
> >         >         Platform",
> >         >         >         www.wso2.com
> >         >         >         >
> >         >         >         >
> >         >         >         >
> >         >         >
> >         >
> >
> ---------------------------------------------------------------------
> >         >         >         >                 To unsubscribe, e-mail:
> >         >         >         >
> >         >         synapse-dev-unsubscribe@ws.apache.org
> >         >         >         >                 For additional commands,
> >         e-mail:
> >         >         >         >
> >         synapse-dev-help@ws.apache.org
> >         >         >         >
> >         >         >         >
> >         >         >         >
> >         >         >         >
> >         >         >         >
> >         >         >         >         --
> >         >         >         >
> >         >         >         >         Paul Fremantle
> >         >         >         >         Co-Founder and VP of Technical
> >         Sales,
> >         >         WSO2
> >         >         >         >         OASIS WS-RX TC Co-chair
> >         >         >         >
> >         >         >         >         blog: http://pzf.fremantle.org
> >         >         >         >         paul@wso2.com
> >         >         >         >
> >         >         >         >         "Oxygenating the Web Service
> >         Platform",
> >         >         www.wso2.com
> >         >         >         >
> >         >         >         >
> >         >         >         >
> >         >         >         > --
> >         >         >         > Paul Fremantle
> >         >         >         > Co-Founder and VP of Technical Sales,
> >         WSO2
> >         >         >         > OASIS WS-RX TC Co-chair
> >         >         >         >
> >         >         >         > blog: http://pzf.fremantle.org
> >         >         >         > paul@wso2.com
> >         >         >         >
> >         >         >         > "Oxygenating the Web Service Platform",
> >         >         www.wso2.com
> >         >         >
> >         >         >
> >         >         >
> >         >
> >
> ---------------------------------------------------------------------
> >         >         >         To unsubscribe, e-mail:
> >         >         synapse-dev-unsubscribe@ws.apache.org
> >         >         >         For additional commands, e-mail:
> >         >         >         synapse-dev-help@ws.apache.org
> >         >         >
> >         >         >
> >         >         >
> >         >         >
> >         >         > --
> >         >         > Paul Fremantle
> >         >         > Co-Founder and VP of Technical Sales, WSO2
> >         >         > OASIS WS-RX TC Co-chair
> >         >         >
> >         >         > blog: http://pzf.fremantle.org
> >         >         > paul@wso2.com
> >         >         >
> >         >         > "Oxygenating the Web Service Platform",
> >         www.wso2.com
> >         >
> >         >
> >         >
> >
> ---------------------------------------------------------------------
> >         >         To unsubscribe, e-mail:
> >         synapse-dev-unsubscribe@ws.apache.org
> >         >         For additional commands, e-mail:
> >         >         synapse-dev-help@ws.apache.org
> >         >
> >         >
> >         >
> >         >
> >         > --
> >         > Paul Fremantle
> >         > Co-Founder and VP of Technical Sales, WSO2
> >         > OASIS WS-RX TC Co-chair
> >         >
> >         > blog: http://pzf.fremantle.org
> >         > paul@wso2.com
> >         >
> >         > "Oxygenating the Web Service Platform", www.wso2.com
> >
> >
> >
> ---------------------------------------------------------------------
> >         To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> >         For additional commands, e-mail:
> >         synapse-dev-help@ws.apache.org
> >
> >
> >
> >
> > --
> > Paul Fremantle
> > Co-Founder and VP of Technical Sales, WSO2
> > OASIS WS-RX TC Co-chair
> >
> > blog: http://pzf.fremantle.org
> > paul@wso2.com
> >
> > "Oxygenating the Web Service Platform", www.wso2.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>


-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

Re: problem with using NIO HTTP and HTTP GET

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Thu, 2007-10-18 at 14:15 +0100, Paul Fremantle wrote:
> Great... the other problem is some kind of WSDL related mismatch.
> 
> Can I have the code :)
> 

Sure. It is all yours. The trouble is the patch still does not solve the
bug that I observed in more complex scenarios (sample 100 for instance).
Synapse seems to have a problem with passing Faults from the target
service to the client.  There is still more investigating to be done.
So, you may want to open a JIRA report for this issue and I'll happily
attach the patch to it.

Cheers

Oleg


> Paul
> 
> On 10/18/07, Oleg Kalnichevski <ol...@apache.org> wrote:
>         On Thu, 2007-10-18 at 14:01 +0100, Paul Fremantle wrote: 
>         > Oleg
>         >
>         > Can you test with this Synapse.xml
>         >
>         >  <proxy name="test">
>         >         <target>
>         >             <inSequence>
>         >                <script language="groovy"><![CDATA[ 
>         >                   println mc.getReplyTo();
>         >
>         > mc.setTo("http://www.w3.org/2005/08/addressing/anonymous");
>         >                   mc.setProperty ("RESPONSE", "true");
>         >                   mc.setPayloadXML('''
>         >                     <ns:getQuoteResponse
>         > xmlns:ns="http://services.samples/xsd">
>         >                       <ns:return>
>         >                     <ns:last>99.9</ns:last>
>         >                 </ns:return>
>         >              </ns:getQuoteResponse>'''); 
>         >        ]]></script>
>         >             <send/>
>         >             </inSequence>
>         >             <outSequence>
>         >               <send/>
>         >             </outSequence> 
>         >         </target>
>         >     </proxy>
>         >
>         > and url
>         >
>         > http://localhost:8080/soap/test/op?param1=hi
>         >
>         
>         That seems to work fine with my patch 
>         
>         ----------------------------------
>         [INFO] PipeImpl - Using native OS Pipes for event-driven to
>         stream IO
>         bridging
>         [DEBUG] headers - >> GET /soap/test/op?param1=hi HTTP/1.1
>         [DEBUG] headers - >> Host: localhost:8080 
>         [DEBUG] headers - >> User-Agent: Mozilla/5.0 (X11; U; Linux
>         i686; en-US;
>         rv:1.8.1.6) Gecko/20061201 Firefox/2.0.0.6 (Ubuntu-feisty)
>         [DEBUG] headers - >> Accept:
>         text/xml,application/xml,application/xhtml 
>         +xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
>         [DEBUG] headers - >> Accept-Language: en,it;q=0.5
>         [DEBUG] headers - >> Accept-Encoding: gzip,deflate
>         [DEBUG] headers - >> Accept-Charset: ISO-8859-1,utf-8;q=
>         0.7,*;q=0.7
>         [DEBUG] headers - >> Keep-Alive: 300
>         [DEBUG] headers - >> Connection: keep-alive
>         null
>         [DEBUG] headers - << HTTP/1.1 200 OK
>         [DEBUG] headers - << Content-Type: application/xml;
>         charset=UTF-8 
>         [DEBUG] headers - << Host: localhost:8080
>         [DEBUG] headers - << Accept-Encoding: gzip,deflate
>         [DEBUG] headers - << Accept-Language: en,it;q=0.5
>         [DEBUG] headers - << Accept-Charset: ISO-8859-1,utf-8;q=
>         0.7,*;q=0.7
>         [DEBUG] headers - << Keep-Alive: 300
>         [DEBUG] headers - << Accept:
>         text/xml,application/xml,application/xhtml
>         +xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
>         [DEBUG] headers - << Date: Thu, 18 Oct 2007 13:06:44 GMT 
>         [DEBUG] headers - << Server: Synapse-HttpComponents-NIO
>         [DEBUG] headers - << Transfer-Encoding: chunked
>         [DEBUG] headers - << Connection: keep-alive
>         ----------------------------------
>         <ns:getQuoteResponse xmlns:ns=" http://services.samples/xsd">
>                               <ns:return>
>                             <ns:last>99.9</ns:last>
>                         </ns:return>
>                      </ns:getQuoteResponse>
>         ----------------------------------
>         
>         Oleg
>         
>         
>         > On 10/18/07, Oleg Kalnichevski < olegk@apache.org> wrote:
>         >         On Wed, 2007-10-17 at 20:40 +0100, Paul Fremantle
>         wrote: 
>         >         > THANKS!
>         >         >
>         >         > Paul
>         >         >
>         >
>         >         Paul and all,
>         >
>         >         I think I have a partial fix for the problem. At the
>         very
>         >         least I am no
>         >         longer getting "Transfer-encoding header already
>         present" and
>         >         "response
>         >         already submitted" exceptions. However, I am still
>         seeing some 
>         >         funny
>         >         stuff happening when accessing sample Axis2 server
>         with a
>         >         browser.
>         >
>         >         Sample client works just fine
>         >         -------------------------------- 
>         >         samples/axis2Client$ ant stockquote
>         >
>         -Daddurl=http://localhost:9000/soap/SimpleStockQuoteService
>         >         -Dmode=quote 
>         >         -Dsymbol=IBMBuildfile: build.xml
>         >
>         >         init:
>         >             [mkdir] Created
>         >
>         dir: /home/oleg/src/apache.org/webservices/synapse/java/target/synapse-SNAPSHOT/samples/axis2Client/target/classes 
>         >
>         >         compile:
>         >             [javac] Compiling 10 source files
>         >
>         to /home/oleg/src/apache.org/webservices/synapse/java/target/synapse-SNAPSHOT/samples/axis2Client/target/classes
>         > 
>         >         stockquote:
>         >              [java] Standard :: Stock price =
>         $91.61813193560333
>         >
>         >         BUILD SUCCESSFUL
>         >         Total time: 5 seconds
>         >         -------------------------------- 
>         >
>         >         However when trying to execute the same request
>         >
>         <http://localhost:9000/soap/SimpleStockQuoteService/getQuote?symbol=IBM>
>         >         from a browser I am getting this fault. Is this
>         expected? Am I
>         >         doing it
>         >         wrong?
>         >
>         >         --------------------------------
>         >         [DEBUG] headers - >> 
>         >
>         GET /soap/SimpleStockQuoteService/getQuote?symbol=IBM HTTP/1.1
>         >         [DEBUG] headers - >> Host: localhost:9000
>         >         [DEBUG] headers - >> User-Agent: Mozilla/5.0 (X11;
>         U; Linux 
>         >         i686; en-US;
>         >         rv:1.8.1.6) Gecko/20061201 Firefox/2.0.0.6
>         (Ubuntu-feisty)
>         >         [DEBUG] headers - >> Accept:
>         >         text/xml,application/xml,application/xhtml 
>         >
>         +xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q= 0.5
>         >         [DEBUG] headers - >> Accept-Language: en,it;q=0.5
>         >         [DEBUG] headers - >> Accept-Encoding: gzip,deflate
>         >         [DEBUG] headers - >> Accept-Charset:
>         >         ISO-8859-1,utf-8;q=0.7,*;q=0.7
>         >         [DEBUG] headers - >> Keep-Alive: 300
>         >         [DEBUG] headers - >> Connection: keep-alive 
>         >         [ERROR] RPCMessageReceiver - Exception occurred
>         while trying
>         >         to invoke
>         >         service method getQuote <org.apache.axis2.AxisFault:
>         namespace
>         >         mismatch
>         >         require http://services.samples/xsd found
>         >
>         http://org.apache.axis2/xsd>org.apache.axis2.AxisFault:
>         >         namespace
>         >         mismatch require http://services.samples/xsd found
>         >         http://org.apache.axis2/xsd
>         >                 at
>         >
>         org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:177)
>         >                 at
>         >
>         org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic (RPCMessageReceiver.java :98)
>         >                 at
>         >
>         org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
>         >                 at
>         >
>         org.apache.axis2.receivers.AbstractMessageReceiver.receive 
>         >         (AbstractMessageReceiver.java:96)
>         >                 at
>         >
>         org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
>         >                 at
>         >
>         org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPGetRequest (HTTPTransportUtils.java :249)
>         >                 at
>         >
>         org.apache.synapse.transport.nhttp.ServerWorker.processGet(ServerWorker.java:401)
>         >                 at
>         >         org.apache.synapse.transport.nhttp.ServerWorker.run
>         (ServerWorker.java:180)
>         >                 at java.util.concurrent.ThreadPoolExecutor
>         >         $Worker.runTask(ThreadPoolExecutor.java:650)
>         >                 at java.util.concurrent.ThreadPoolExecutor
>         >         $Worker.run(ThreadPoolExecutor.java:675)
>         >                 at java.lang.Thread.run(Thread.java:595)
>         >
>         >         [ERROR] ServerWorker - Error processing GET request
>         >
>         for: /soap/SimpleStockQuoteService/getQuote?symbol=IBM 
>         >         <org.apache.axis2.AxisFault: namespace mismatch
>         require
>         >         http://services.samples/xsd found
>         >
>         http://org.apache.axis2/xsd>org.apache.axis2.AxisFault:
>         >         namespace
>         >         mismatch require http://services.samples/xsd found
>         >         http://org.apache.axis2/xsd
>         >                 at
>         >
>         org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:177)
>         >                 at
>         >
>         org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic (RPCMessageReceiver.java:98)
>         >                 at
>         >
>         org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
>         >                 at
>         >
>         org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java :96)
>         >                 at
>         >
>         org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
>         >                 at 
>         >
>         org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPGetRequest(HTTPTransportUtils.java:249)
>         >                 at
>         >
>         org.apache.synapse.transport.nhttp.ServerWorker.processGet( ServerWorker.java:401)
>         >                 at
>         >
>         org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:180)
>         >                 at java.util.concurrent.ThreadPoolExecutor
>         >         $Worker.runTask( ThreadPoolExecutor.java:650)
>         >                 at java.util.concurrent.ThreadPoolExecutor
>         >         $Worker.run(ThreadPoolExecutor.java:675)
>         >                 at java.lang.Thread.run(Thread.java:595)
>         >
>         >         [DEBUG] headers - << HTTP/1.1 500 Internal Server
>         Error
>         >         [DEBUG] headers - << Content-Type: application/xml;
>         >         charset=UTF-8
>         >         [DEBUG] headers - << Date: Thu, 18 Oct 2007 10:51:41
>         GMT 
>         >         [DEBUG] headers - << Server:
>         Synapse-HttpComponents-NIO
>         >         [DEBUG] headers - << Transfer-Encoding: chunked
>         >         [DEBUG] headers - << Connection: Close
>         >         -------------------------------- 
>         >
>         >         Oleg
>         >
>         >
>         >         > On 10/17/07, Oleg Kalnichevski <ol...@apache.org>
>         wrote:
>         >         >         On Wed, 2007-10-17 at 17:27 +0100, Paul
>         Fremantle 
>         >         wrote:
>         >         >         > Oleg
>         >         >         >
>         >         >         > I have a scenario where if I call via
>         SOAP POST it
>         >         works
>         >         >         fine. When I 
>         >         >         > call by HTTP GET I get this
>         >         >         >
>         >         >         > 2007-10-17 17:27:01,718
>         [ 10.62.75.83-pzfdell]
>         >         >         [HttpServerWorker-1] 
>         >         >         > ERROR ServerHandler Unexpected HT
>         >         >         > TP protocol error : Transfer-encoding
>         header
>         >         already present
>         >         >         > org.apache.http.ProtocolException :
>         >         Transfer-encoding header
>         >         >         already
>         >         >         > present
>         >         >         >         at
>         >         >         >
>         >         >
>         org.apache.http.protocol.ResponseContent.process
>         >         (ResponseContent.java :67)
>         >         >         >         at
>         >         >         >
>         >         >
>         >         org.apache.http.protocol.BasicHttpProcessor.process
>         (BasicHttpProcessor.java :304)
>         >         >         >         at
>         >         >         >
>         >         >
>         >
>         org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(ServerHandler.java :220)
>         >         >         >         at
>         >         >         >
>         >         >
>         >
>         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncResponse
>         >         >         > (HttpCoreNIOSender. 
>         >         >         > java:350)
>         >         >         >         at
>         >         >         >
>         >         >
>         >
>         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke( HttpCoreNIOSender.java :215)
>         >         >         >         at
>         >         >         > org.apache.axis2.engine.AxisEngine.send
>         >         >         (AxisEngine.java:396)
>         >         >         >         at 
>         >         >         >
>         >         >
>         org.apache.synapse.core.axis2.Axis2Sender.sendBack
>         >         (Axis2Sender.java:104)
>         >         >         >         at
>         >         >         > 
>         >         >
>         >
>         org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java :1
>         >         >         > 96)
>         >         >         >
>         >         >         > So, I don't think its just the Fault
>         case :( 
>         >         >         >
>         >         >         > Paul
>         >         >         >
>         >         >
>         >         >         Hi Paul
>         >         >
>         >         >         That does not look good. 
>         >         >
>         >         >         I'll _try_ to come up with a fix for the
>         bug, but
>         >         it'll
>         >         >         require some
>         >         >         poking around with the Synapse and Axis2
>         code. 
>         >         >
>         >         >         Oleg
>         >         >
>         >         >         > On 10/17/07, Paul Fremantle <
>         pzfreo@gmail.com>
>         >         wrote: 
>         >         >         >         If I can get the success case
>         working I'll
>         >         be happy
>         >         >         for now.
>         >         >         >         Its just I thought I had that
>         case and 
>         >         that was
>         >         >         failing too :(
>         >         >         >
>         >         >         >         Let me dig around a bit.
>         However, I think
>         >         we need to
>         >         >         get this 
>         >         >         >         fixed and solid before 1.1 . I
>         think
>         >         there's also a
>         >         >         problem
>         >         >         >         with the logic, which is that
>         the 
>         >         assumption is that
>         >         >         if there
>         >         >         >         are no parameters then I don't
>         want to
>         >         invoke the
>         >         >         service - I 
>         >         >         >         just want to see the service
>         HTML.
>         >         However, I don't
>         >         >         agree with
>         >         >         >         that - I think there are lots of
>         cases 
>         >         where I want
>         >         >         no
>         >         >         >         parameters to equate to an empty
>         body. It
>         >         may be
>         >         >         that the same
>         >         >         >         problem exists in the standard
>         Axis2 HTTP 
>         >         tran as
>         >         >         well.
>         >         >         >
>         >         >         >         Paul
>         >         >         >
>         >         >         >
>         >         >         >         On 10/17/07, Oleg Kalnichevski 
>         >         <ol...@apache.org>
>         >         >         wrote:
>         >         >         >                 On Wed, 2007-10-17 at
>         16:01 +0100,
>         >         Paul 
>         >         >         Fremantle
>         >         >         >                 wrote:
>         >         >         >                 > Oleg
>         >         >         >                 >
>         >         >         >                 > Do you think the
>         problem will 
>         >         still happen
>         >         >         on the
>         >         >         >                 non-fault case.
>         >         >         >                 >
>         >         >         >                 > Paul 
>         >         >         >                 >
>         >         >         >
>         >         >         >                 No, I do not think so.
>         Only fault
>         >         responses
>         >         >         appear 
>         >         >         >                 affected. I can try
>         >         >         >                 to come up with a fix
>         for the bug
>         >         if the
>         >         >         issue is
>         >         >         >                 pressing. 
>         >         >         >
>         >         >         >                 Cheers
>         >         >         >
>         >         >         >                 Oleg
>         >         >         >
>         >         >         > 
>         >         >         >                 > On 10/17/07, Oleg
>         Kalnichevski
>         >         >         <ol...@apache.org>
>         >         >         >                 wrote: 
>         >         >         >                 >         On Tue,
>         2007-10-16 at
>         >         19:36 +0100,
>         >         >         Paul
>         >         >         >                 Fremantle wrote:
>         >         >         >                 >         > Using the QA
>         build 
>         >         that was
>         >         >         posted a
>         >         >         >                 couple of days ago, I
>         >         >         >                 >         deployed
>         >         >         >                 >         > sample 100
>         and typed 
>         >         >         >                 >         >
>         >         >         >                 >
>         >         >         >
>         >         >
>         >
>         http://localhost:8080/soap/StockQuoteProxy/getQuote?symbol=IBM
>         >         >         >                 >         into my
>         >         >         >                 >         > browser.
>         >         >         >                 >         > 
>         >         >         >                 >
>         >         >         >                 >         Asankha, Paul
>         >         >         >                 >
>         >         >         >                 >         This is what I
>         think is 
>         >         the cause
>         >         >         of the
>         >         >         >                 problem:
>         >         >         >                 >
>         >         >         >                 >         The
>         ServerWorker class 
>         >         uses the
>         >         >         following
>         >         >         >                 code to process HTTP
>         >         >         >                 >         GET
>         >         >         >                 >         requests 
>         >         >         >                 >
>         >         >         >                 >
>         ==================
>         >         >         >                 >         try {
>         >         >         >                 > 
>         >         serverHandler.commitResponse
>         >         >         (conn,
>         >         >         >                 response);
>         >         >         >                 >
>         >         >         HTTPTransportUtils.processHTTPGetRequest (
>         >         >         >                 >
>         msgContext, os,
>         >         >         >                 >
>         >         >         ( request.getFirstHeader (SOAPACTION) !=
>         >         >         >                 null ?
>         >         >         >                 >
>         >         request.getFirstHeader
>         >         >         >
>         (SOAPACTION).getValue() : null), 
>         >         >         >                 >
>         >         >         request.getRequestLine().getUri(),
>         >         >         >                 >             cfgCtx,
>         >         >         >                 >
>         parameters); 
>         >         >         >                 >         } catch
>         (AxisFault
>         >         axisFault) {
>         >         >         >                 >
>         >         handleException("Error
>         >         >         processing GET 
>         >         >         >                 request for: " +
>         >         >         >                 >
>         >         >         request.getRequestLine().getUri(),
>         >         >         >                 axisFault); 
>         >         >         >                 >         }
>         >         >         >                 >
>         ==================
>         >         >         >                 >
>         >         >         >                 >         (1)
>         ServerWorker submits 
>         >         200
>         >         >         response head
>         >         >         >                 prior to calling
>         >         >         >                 >
>         >         >         HTTPTransportUtils.processHTTPGetRequest 
>         >         >         >                 >         (2) AxisFault
>         gets
>         >         thrown
>         >         >         somewhere inside
>         >         >         >                 >
>         #processHTTPGetRequest 
>         >         >         >                 >         (3) The
>         #handleException
>         >         method is
>         >         >         called to
>         >         >         >                 handle the fault
>         >         >         >                 >         (4) At some
>         point
>         >         >         >
>         AxisEngine#sendFault(faultContext)
>         >         gets
>         >         >         >                 >         invoked 
>         >         >         >                 >         (5) AxisEngine
>         attempts
>         >         to submit
>         >         >         an 500
>         >         >         >                 response head
>         >         >         >                 >         (6) Things get
>         nasty 
>         >         >         >                 >
>         >         >         >                 >         I do not know
>         Axis2 well
>         >         enough to
>         >         >         be able
>         >         >         >                 to fix the problem 
>         >         >         >                 >         myself
>         >         >         >                 >         easily, but I
>         could dig
>         >         in deeper
>         >         >         into the 
>         >         >         >                 Axis2 code if need
>         >         >         >                 >         be.
>         >         >         >                 >
>         >         >         >                 >         Apparently the
>         bit of 
>         >         code above
>         >         >         needs some
>         >         >         >                 work.
>         >         >         >                 >
>         >         >         >                 >         The NIO HTTP
>         transport 
>         >         in Axis2
>         >         >         proper is
>         >         >         >                 very likely to be
>         >         >         >                 >         affected as
>         >         >         >                 >         well. 
>         >         >         >                 >
>         >         >         >                 >         Cheers
>         >         >         >                 >
>         >         >         >                 >         Oleg 
>         >         >         >                 >
>         >         >         >                 >
>         >         >         >                 >         > 2007-10-16
>         >         19:33:59,609
>         >         >         [10.0.0.3-pzfdell]
>         >         >         >                 >
>         [HttpClientWorker-1]
>         >         ERROR
>         >         >         >                 >         > ServerHand 
>         >         >         >                 >         > ler
>         Unexpected HTTP
>         >         protocol
>         >         >         error :
>         >         >         >                 Transfer-encoding
>         >         >         >                 >         header already
>         >         >         >                 >         > present
>         >         >         >                 >         >
>         >         >         org.apache.http.ProtocolException :
>         >         >         >                 Transfer-encoding header
>         >         >         >                 >         already
>         >         >         >                 >         > present 
>         >         >         >                 >         >         at
>         >         >         >                 >         >
>         >         >         >                 >
>         >         >         > 
>         >         >
>         org.apache.http.protocol.ResponseContent.process
>         >         >         (ResponseContent.java
>         >         >         >                 >         > :67)
>         >         >         >                 >         >         at 
>         >         >         >                 >         >
>         >         >         >                 >
>         >         >         >
>         >         >
>         org.apache.http.protocol.BasicHttpProcessor.process 
>         >         >         (BasicHttpProcesso
>         >         >         >                 >         > r.java:304)
>         >         >         >                 >         >         at
>         >         >         >                 >         > 
>         >         >         >                 >
>         >         >         >
>         >         >
>         >
>         org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(Serve
>         >         >         >                 >         >
>         rHandler.java:220)
>         >         >         >                 >         >         at
>         >         >         >                 >         >
>         >         >         >                 >
>         >         >         >
>         >         >
>         >
>         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons
>         >         >         >                 >         >
>         >         e( HttpCoreNIOSender.java :350)
>         >         >         >                 >         >         at
>         >         >         >                 >         >
>         >         >         >                 > 
>         >         >         >
>         >         >
>         >
>         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreN
>         >         >         >                 >         >
>         IOSender.java :215)
>         >         >         >                 >         >         at
>         >         >         >                 >         >
>         >         >         >
>         >         >
>         >
>         org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
>         >         >         >                 >         >         at
>         >         >         >                 >
>         >         >         > 
>         >         >
>         org.apache.synapse.core.axis2.Axis2Sender.sendBack
>         >         >         >                 >         >
>         (Axis2Sender.java:1
>         >         >         >                 >         > 04) 
>         >         >         >                 >         >
>         >         >         >                 >         >
>         >         >         >                 >         > On 10/16/07,
>         Asankha 
>         >         C. Perera
>         >         >         >                 < asankha@wso2.com>
>         wrote:
>         >         >         >                 >         >
>         Paul 
>         >         >         >                 >         >
>         >         >         >                 >         >         Can
>         you
>         >         re-create this
>         >         >         with the 
>         >         >         >                 sample #100 etc?
>         >         >         >                 >         Please send
>         >         >         >                 >         >         me
>         details to 
>         >         >         reproduce.. AFAIK we
>         >         >         >                 do not have a
>         >         >         >                 >         test case for
>         >         >         >                 >         >         GET
>         access... 
>         >         I will try
>         >         >         this out
>         >         >         >                 and see what may
>         >         >         >                 >         be wrong..
>         >         >         >                 >         >         I
>         believe you 
>         >         are not
>         >         >         doing a load
>         >         >         >                 test
>         >         >         >                 >         >
>         >         >         >                 >         >
>         asankha 
>         >         >         >                 >         >
>         >         >         >                 >         >
>         >         >         >                 >         >         Paul
>         Fremantle 
>         >         wrote:
>         >         >         >                 >         >         >
>         I'm trying
>         >         to use GET
>         >         >         on a proxy
>         >         >         >                 service hosted in 
>         >         >         >                 >         Synapse.
>         >         >         >                 >         >         >
>         I'm getting
>         >         this
>         >         >         error: 
>         >         >         >                 >         >         >
>         >         >         >                 >         >         >
>         2007-10-16
>         >         >         15:53:12,421
>         >         >         >                 [ 10.0.0.3-pzfdell] [I/O
>         >         >         >                 >         dispatcher
>         >         >         >                 >         >         >
>         7]  INFO
>         >         PipeImpl Usi
>         >         >         >                 >         >         > ng
>         simulated 
>         >         buffered
>         >         >         Pipes for
>         >         >         >                 event-driven to
>         >         >         >                 >         stream IO
>         >         >         >                 >         >         >
>         bridging 
>         >         >         >                 >         >         >
>         2007-10-16
>         >         >         15:53:12,906
>         >         >         >                 [ 10.0.0.3-pzfdell]
>         >         >         >                 >         >         > 
>         >         [HttpServerWorker-1]
>         >         >         ERROR
>         >         >         >                 ServerHand
>         >         >         >                 >         >         >
>         ler
>         >         Unexpected HTTP
>         >         >         protocol
>         >         >         >                 error :
>         >         >         >                 >
>         Transfer-encoding
>         >         >         >                 >         >         >
>         header 
>         >         already present
>         >         >         >                 >         >         >
>         >         >         >
>         >         org.apache.http.ProtocolException :
>         >         >         >                 >
>         Transfer-encoding header 
>         >         >         >                 >         >         >
>         already
>         >         present
>         >         >         >                 >         >         >
>         at
>         >         >         >                 >         >         > 
>         >         >         >                 >
>         >         >         >
>         >         >
>         >
>         org.apache.http.protocol.ResponseContent.process( ResponseContent.java
>         >         >         >                 >         >
>         > :67) 
>         >         >         >                 >         >         >
>         at
>         >         >         >                 >         >         >
>         >         >         >                 > 
>         >         >         >
>         >         >
>         org.apache.http.protocol.BasicHttpProcessor.process
>         >         >         (BasicHttpProcesso
>         >         >         >                 >         >         >
>         r.java:304)
>         >         >         >                 >         >         >
>         at
>         >         >         >                 >         >         >
>         >         >         >                 > 
>         >         >         >
>         >         >
>         >
>         org.apache.synapse.transport.nhttp.ServerHandler.commitResponse (Serve
>         >         >         >                 >         >         > 
>         >         rHandler.java:220)
>         >         >         >                 >         >         >
>         at
>         >         >         >                 >         >         >
>         >         >         >                 > 
>         >         >         >
>         >         >
>         >
>         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons
>         >         >         >                 >         >         > 
>         >         >         e( HttpCoreNIOSender.java:352)
>         >         >         >                 >         >         >
>         at
>         >         >         >                 >         >         > 
>         >         >         >                 >
>         >         >         >
>         >         >
>         >
>         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke
>         >         >         (HttpCoreN 
>         >         >         >                 >         >         >
>         >         IOSender.java:215)
>         >         >         >                 >         >         >
>         at
>         >         >         >                 >         >         > 
>         >         >         >                 >
>         >         >         >
>         >         >
>         >
>         org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
>         >         >         >                 >         >         >
>         at 
>         >         >         >                 >         >         >
>         >         >         >                 >
>         >         >         >
>         >         >
>         >         org.apache.synapse.core.axis2.Axis2Sender.sendBack
>         (Axis2Sender.java:1
>         >         >         >                 >         >         >
>         04)
>         >         >         >                 >         >         >
>         at
>         >         >         >                 >         >         > 
>         >         >         >                 >
>         >         >         >
>         >         >
>         >
>         org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send
>         >         >         >                 >         >         >
>         (Axis2Synap 
>         >         >         >                 >         >         >
>         >         >         seEnvironment.java:170)
>         >         >         >                 >         >         >
>         >         >         >                 >         >         > I
>         managed to 
>         >         get past
>         >         >         this one
>         >         >         >                 by commenting out:
>         >         >         >                 >         >         >
>         >         if 
>         >         >         >                 >         >         >
>         >         >         >
>         >         >
>         (httpVersion.greaterEquals(HttpVersion.HTTP_1_1 ))
>         >         >         >                 >         { 
>         >         >         >                 >         >
>         >         >         >
>         >         >                 //entity.setChunked(true);
>         >         >         >                 >         > 
>         >         >             }
>         >         >         >                 >         >         >
>         line 127
>         >         >         ServerHandler.java
>         >         >         >                 >         >         > 
>         >         >         >                 >         >         >
>         then I get
>         >         this one:
>         >         >         >                 >         >         >
>         >         >         >                 >         >         >
>         2007-10-16 
>         >         >         16:01:45,125
>         >         >         >                 [10.0.0.3-pzfdell]
>         >         >         >                 >         >         >
>         >         [HttpServerWorker-1] 
>         >         >         ERROR
>         >         >         >                 ServerHandler
>         >         >         >                 >         Unexpected
>         HTTP
>         >         >         >                 >         >         >
>         protocol 
>         >         error :
>         >         >         Response
>         >         >         >                 already submitted
>         >         >         >                 >         >         >
>         >         >         org.apache.http.HttpException :
>         >         >         >                 Response already
>         >         >         >                 >         submitted
>         >         >         >                 >         >         >
>         at 
>         >         >         >                 >         >         >
>         >         >         >                 >
>         >         >         >
>         >         >
>         >
>         org.apache.http.impl.nio.DefaultNHttpServerConnection.submitResponse (DefaultNHttpServerCo
>         >         >         >                 >         >         >
>         >         nnection.java:201)
>         >         >         >                 >         >         >
>         at 
>         >         >         >                 >         >         >
>         >         >         >                 >
>         >         >         >
>         >         >
>         >
>         org.apache.synapse.transport.nhttp.LoggingNHttpServerConnection.submitResponse (LoggingNHt
>         >         >         >                 >         >         >
>         >         >         tpServerConnection.java:54)
>         >         >         >                 >         >         >
>         at 
>         >         >         >                 >         >         >
>         >         >         >                 >
>         >         >         >
>         >         >
>         >
>         org.apache.synapse.transport.nhttp.ServerHandler.commitResponse (ServerHandler.java:221)
>         >         >         >                 >         >         >
>         at
>         >         >         >                 >         >         >
>         >         >         >                 > 
>         >         >         >
>         >         >
>         >
>         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncResponse (HttpCoreNIOSender.
>         >         >         >                 >         >         >
>         java:352) 
>         >         >         >                 >         >         >
>         at
>         >         >         >                 >         >         >
>         >         >         >                 > 
>         >         >         >
>         >         >
>         >
>         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke
>         >         >         >                 >
>         >         (HttpCoreNIOSender.java :215)
>         >         >         >                 >         >         >
>         at
>         >         >         >                 >         >         >
>         >         >         >                 > 
>         >         >         >
>         >         >
>         >
>         org.apache.axis2.engine.AxisEngine.send(AxisEngine.java :396)
>         >         >         >                 >         >         >
>         at 
>         >         >         >                 >         >         >
>         >         >         >
>         >         >
>         org.apache.synapse.core.axis2.Axis2Sender.sendBack
>         >         >         >                 >
>         ( Axis2Sender.java:104)
>         >         >         >                 >         >         >
>         >         >         >                 >         >         >
>         Help!!??
>         >         >         >                 >         >         > 
>         >         >         >                 >         >         >
>         Paul
>         >         >         >                 >         >         >
>         >         >         >                 >         >         >
>         -- 
>         >         >         >                 >         >         >
>         Paul
>         >         Fremantle
>         >         >         >                 >         >         >
>         Co-Founder
>         >         and VP of 
>         >         >         Technical
>         >         >         >                 Sales, WSO2
>         >         >         >                 >         >         >
>         OASIS WS-RX
>         >         TC
>         >         >         Co-chair 
>         >         >         >                 >         >         >
>         >         >         >                 >         >         >
>         blog:
>         >         >         http://pzf.fremantle.org
>         >         >         >                 >         >         >
>         >         paul@wso2.com
>         >         >         >                 >         >         > 
>         >         >         >                 >         >         >
>         "Oxygenating
>         >         the Web
>         >         >         Service
>         >         >         >                 Platform", 
>         >         >         >                 >         www.wso2.com
>         >         >         >                 >         >
>         >         >         >                 >         > 
>         >         >         >                 >         >
>         >         >         >                 >         > --
>         >         >         >                 >         > Paul
>         Fremantle 
>         >         >         >                 >         > Co-Founder
>         and VP of
>         >         Technical
>         >         >         Sales, WSO2
>         >         >         >                 >         > OASIS WS-RX
>         TC 
>         >         Co-chair
>         >         >         >                 >         >
>         >         >         >                 >         > blog:
>         >         http://pzf.fremantle.org
>         >         >         >                 >         >
>         paul@wso2.com
>         >         >         >                 >         >
>         >         >         >                 >         > "Oxygenating
>         the Web 
>         >         Service
>         >         >         Platform",
>         >         >         >                 www.wso2.com
>         >         >         >                 > 
>         >         >         >                 >
>         >         >         >                 >
>         >         >         >
>         >         >
>         >
>         --------------------------------------------------------------------- 
>         >         >         >                 >         To
>         unsubscribe, e-mail:
>         >         >         >
>         >         synapse-dev-unsubscribe@ws.apache.org
>         >         >         >                 >         For additional
>         commands,
>         >         e-mail:
>         >         >         >                 >
>         >         synapse-dev-help@ws.apache.org
>         >         >         >                 >
>         >         >         >                 >
>         >         >         >                 >
>         >         >         >                 > 
>         >         >         >                 > --
>         >         >         >                 > Paul Fremantle
>         >         >         >                 > Co-Founder and VP of
>         Technical
>         >         Sales, WSO2 
>         >         >         >                 > OASIS WS-RX TC
>         Co-chair
>         >         >         >                 >
>         >         >         >                 > blog:
>         http://pzf.fremantle.org
>         >         >         >                 > paul@wso2.com
>         >         >         >                 >
>         >         >         >                 > "Oxygenating the Web
>         Service 
>         >         Platform",
>         >         >         www.wso2.com
>         >         >         >
>         >         >         >
>         >         >         >
>         >         > 
>         >
>         ---------------------------------------------------------------------
>         >         >         >                 To unsubscribe, e-mail:
>         >         >         >
>         >         synapse-dev-unsubscribe@ws.apache.org
>         >         >         >                 For additional commands,
>         e-mail:
>         >         >         >
>         synapse-dev-help@ws.apache.org
>         >         >         >
>         >         >         >
>         >         >         >
>         >         >         >
>         >         >         >
>         >         >         >         -- 
>         >         >         >
>         >         >         >         Paul Fremantle
>         >         >         >         Co-Founder and VP of Technical
>         Sales,
>         >         WSO2
>         >         >         >         OASIS WS-RX TC Co-chair 
>         >         >         >
>         >         >         >         blog: http://pzf.fremantle.org
>         >         >         >         paul@wso2.com
>         >         >         >
>         >         >         >         "Oxygenating the Web Service
>         Platform",
>         >         www.wso2.com
>         >         >         > 
>         >         >         >
>         >         >         >
>         >         >         > --
>         >         >         > Paul Fremantle
>         >         >         > Co-Founder and VP of Technical Sales,
>         WSO2 
>         >         >         > OASIS WS-RX TC Co-chair
>         >         >         >
>         >         >         > blog: http://pzf.fremantle.org
>         >         >         > paul@wso2.com
>         >         >         >
>         >         >         > "Oxygenating the Web Service Platform",
>         >         www.wso2.com
>         >         >
>         >         >
>         >         >
>         >
>         ---------------------------------------------------------------------
>         >         >         To unsubscribe, e-mail:
>         >         synapse-dev-unsubscribe@ws.apache.org
>         >         >         For additional commands, e-mail:
>         >         >         synapse-dev-help@ws.apache.org
>         >         >
>         >         >
>         >         >
>         >         >
>         >         > --
>         >         > Paul Fremantle
>         >         > Co-Founder and VP of Technical Sales, WSO2 
>         >         > OASIS WS-RX TC Co-chair
>         >         >
>         >         > blog: http://pzf.fremantle.org
>         >         > paul@wso2.com
>         >         >
>         >         > "Oxygenating the Web Service Platform",
>         www.wso2.com
>         >
>         >
>         >
>         --------------------------------------------------------------------- 
>         >         To unsubscribe, e-mail:
>         synapse-dev-unsubscribe@ws.apache.org
>         >         For additional commands, e-mail:
>         >         synapse-dev-help@ws.apache.org
>         >
>         >
>         >
>         >
>         > --
>         > Paul Fremantle
>         > Co-Founder and VP of Technical Sales, WSO2
>         > OASIS WS-RX TC Co-chair
>         >
>         > blog: http://pzf.fremantle.org
>         > paul@wso2.com
>         >
>         > "Oxygenating the Web Service Platform", www.wso2.com
>         
>         
>         --------------------------------------------------------------------- 
>         To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
>         For additional commands, e-mail:
>         synapse-dev-help@ws.apache.org
>         
> 
> 
> 
> -- 
> Paul Fremantle
> Co-Founder and VP of Technical Sales, WSO2
> OASIS WS-RX TC Co-chair
> 
> blog: http://pzf.fremantle.org
> paul@wso2.com
> 
> "Oxygenating the Web Service Platform", www.wso2.com


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


Re: problem with using NIO HTTP and HTTP GET

Posted by Paul Fremantle <pz...@gmail.com>.
Great... the other problem is some kind of WSDL related mismatch.

Can I have the code :)

Paul

On 10/18/07, Oleg Kalnichevski <ol...@apache.org> wrote:
>
> On Thu, 2007-10-18 at 14:01 +0100, Paul Fremantle wrote:
> > Oleg
> >
> > Can you test with this Synapse.xml
> >
> >  <proxy name="test">
> >         <target>
> >             <inSequence>
> >                <script language="groovy"><![CDATA[
> >                   println mc.getReplyTo();
> >
> > mc.setTo("http://www.w3.org/2005/08/addressing/anonymous");
> >                   mc.setProperty ("RESPONSE", "true");
> >                   mc.setPayloadXML('''
> >                     <ns:getQuoteResponse
> > xmlns:ns="http://services.samples/xsd">
> >                       <ns:return>
> >                     <ns:last>99.9</ns:last>
> >                 </ns:return>
> >              </ns:getQuoteResponse>''');
> >        ]]></script>
> >             <send/>
> >             </inSequence>
> >             <outSequence>
> >               <send/>
> >             </outSequence>
> >         </target>
> >     </proxy>
> >
> > and url
> >
> > http://localhost:8080/soap/test/op?param1=hi
> >
>
> That seems to work fine with my patch
>
> ----------------------------------
> [INFO] PipeImpl - Using native OS Pipes for event-driven to stream IO
> bridging
> [DEBUG] headers - >> GET /soap/test/op?param1=hi HTTP/1.1
> [DEBUG] headers - >> Host: localhost:8080
> [DEBUG] headers - >> User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
> rv:1.8.1.6) Gecko/20061201 Firefox/2.0.0.6 (Ubuntu-feisty)
> [DEBUG] headers - >> Accept: text/xml,application/xml,application/xhtml
> +xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
> [DEBUG] headers - >> Accept-Language: en,it;q=0.5
> [DEBUG] headers - >> Accept-Encoding: gzip,deflate
> [DEBUG] headers - >> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
> [DEBUG] headers - >> Keep-Alive: 300
> [DEBUG] headers - >> Connection: keep-alive
> null
> [DEBUG] headers - << HTTP/1.1 200 OK
> [DEBUG] headers - << Content-Type: application/xml; charset=UTF-8
> [DEBUG] headers - << Host: localhost:8080
> [DEBUG] headers - << Accept-Encoding: gzip,deflate
> [DEBUG] headers - << Accept-Language: en,it;q=0.5
> [DEBUG] headers - << Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
> [DEBUG] headers - << Keep-Alive: 300
> [DEBUG] headers - << Accept: text/xml,application/xml,application/xhtml
> +xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
> [DEBUG] headers - << Date: Thu, 18 Oct 2007 13:06:44 GMT
> [DEBUG] headers - << Server: Synapse-HttpComponents-NIO
> [DEBUG] headers - << Transfer-Encoding: chunked
> [DEBUG] headers - << Connection: keep-alive
> ----------------------------------
> <ns:getQuoteResponse xmlns:ns="http://services.samples/xsd">
>                       <ns:return>
>                     <ns:last>99.9</ns:last>
>                 </ns:return>
>              </ns:getQuoteResponse>
> ----------------------------------
>
> Oleg
>
>
> > On 10/18/07, Oleg Kalnichevski < olegk@apache.org> wrote:
> >         On Wed, 2007-10-17 at 20:40 +0100, Paul Fremantle wrote:
> >         > THANKS!
> >         >
> >         > Paul
> >         >
> >
> >         Paul and all,
> >
> >         I think I have a partial fix for the problem. At the very
> >         least I am no
> >         longer getting "Transfer-encoding header already present" and
> >         "response
> >         already submitted" exceptions. However, I am still seeing some
> >         funny
> >         stuff happening when accessing sample Axis2 server with a
> >         browser.
> >
> >         Sample client works just fine
> >         --------------------------------
> >         samples/axis2Client$ ant stockquote
> >         -Daddurl=http://localhost:9000/soap/SimpleStockQuoteService
> >         -Dmode=quote
> >         -Dsymbol=IBMBuildfile: build.xml
> >
> >         init:
> >             [mkdir] Created
> >         dir:
> /home/oleg/src/apache.org/webservices/synapse/java/target/synapse-SNAPSHOT/samples/axis2Client/target/classes
> >
> >         compile:
> >             [javac] Compiling 10 source files
> >         to
> /home/oleg/src/apache.org/webservices/synapse/java/target/synapse-SNAPSHOT/samples/axis2Client/target/classes
> >
> >         stockquote:
> >              [java] Standard :: Stock price = $91.61813193560333
> >
> >         BUILD SUCCESSFUL
> >         Total time: 5 seconds
> >         --------------------------------
> >
> >         However when trying to execute the same request
> >         <
> http://localhost:9000/soap/SimpleStockQuoteService/getQuote?symbol=IBM>
> >         from a browser I am getting this fault. Is this expected? Am I
> >         doing it
> >         wrong?
> >
> >         --------------------------------
> >         [DEBUG] headers - >>
> >         GET /soap/SimpleStockQuoteService/getQuote?symbol=IBM HTTP/1.1
> >         [DEBUG] headers - >> Host: localhost:9000
> >         [DEBUG] headers - >> User-Agent: Mozilla/5.0 (X11; U; Linux
> >         i686; en-US;
> >         rv:1.8.1.6) Gecko/20061201 Firefox/2.0.0.6 (Ubuntu-feisty)
> >         [DEBUG] headers - >> Accept:
> >         text/xml,application/xml,application/xhtml
> >         +xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q= 0.5
> >         [DEBUG] headers - >> Accept-Language: en,it;q=0.5
> >         [DEBUG] headers - >> Accept-Encoding: gzip,deflate
> >         [DEBUG] headers - >> Accept-Charset:
> >         ISO-8859-1,utf-8;q=0.7,*;q=0.7
> >         [DEBUG] headers - >> Keep-Alive: 300
> >         [DEBUG] headers - >> Connection: keep-alive
> >         [ERROR] RPCMessageReceiver - Exception occurred while trying
> >         to invoke
> >         service method getQuote <org.apache.axis2.AxisFault: namespace
> >         mismatch
> >         require http://services.samples/xsd found
> >         http://org.apache.axis2/xsd>org.apache.axis2.AxisFault:
> >         namespace
> >         mismatch require http://services.samples/xsd found
> >         http://org.apache.axis2/xsd
> >                 at
> >         org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(
> RPCUtil.java:177)
> >                 at
> >
> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic (
> RPCMessageReceiver.java:98)
> >                 at
> >
> org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic
> (AbstractInOutMessageReceiver.java:40)
> >                 at
> >         org.apache.axis2.receivers.AbstractMessageReceiver.receive
> >         (AbstractMessageReceiver.java:96)
> >                 at
> >         org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
> >                 at
> >
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPGetRequest(
> HTTPTransportUtils.java :249)
> >                 at
> >         org.apache.synapse.transport.nhttp.ServerWorker.processGet(
> ServerWorker.java:401)
> >                 at
> >         org.apache.synapse.transport.nhttp.ServerWorker.run(
> ServerWorker.java:180)
> >                 at java.util.concurrent.ThreadPoolExecutor
> >         $Worker.runTask(ThreadPoolExecutor.java:650)
> >                 at java.util.concurrent.ThreadPoolExecutor
> >         $Worker.run(ThreadPoolExecutor.java:675)
> >                 at java.lang.Thread.run(Thread.java:595)
> >
> >         [ERROR] ServerWorker - Error processing GET request
> >         for: /soap/SimpleStockQuoteService/getQuote?symbol=IBM
> >         <org.apache.axis2.AxisFault: namespace mismatch require
> >         http://services.samples/xsd found
> >         http://org.apache.axis2/xsd>org.apache.axis2.AxisFault:
> >         namespace
> >         mismatch require http://services.samples/xsd found
> >         http://org.apache.axis2/xsd
> >                 at
> >         org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(
> RPCUtil.java:177)
> >                 at
> >
> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(
> RPCMessageReceiver.java:98)
> >                 at
> >
> org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic
> (AbstractInOutMessageReceiver.java:40)
> >                 at
> >         org.apache.axis2.receivers.AbstractMessageReceiver.receive(
> AbstractMessageReceiver.java :96)
> >                 at
> >         org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
> >                 at
> >
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPGetRequest(
> HTTPTransportUtils.java:249)
> >                 at
> >         org.apache.synapse.transport.nhttp.ServerWorker.processGet(
> ServerWorker.java:401)
> >                 at
> >         org.apache.synapse.transport.nhttp.ServerWorker.run(
> ServerWorker.java:180)
> >                 at java.util.concurrent.ThreadPoolExecutor
> >         $Worker.runTask(ThreadPoolExecutor.java:650)
> >                 at java.util.concurrent.ThreadPoolExecutor
> >         $Worker.run(ThreadPoolExecutor.java:675)
> >                 at java.lang.Thread.run(Thread.java:595)
> >
> >         [DEBUG] headers - << HTTP/1.1 500 Internal Server Error
> >         [DEBUG] headers - << Content-Type: application/xml;
> >         charset=UTF-8
> >         [DEBUG] headers - << Date: Thu, 18 Oct 2007 10:51:41 GMT
> >         [DEBUG] headers - << Server: Synapse-HttpComponents-NIO
> >         [DEBUG] headers - << Transfer-Encoding: chunked
> >         [DEBUG] headers - << Connection: Close
> >         --------------------------------
> >
> >         Oleg
> >
> >
> >         > On 10/17/07, Oleg Kalnichevski <ol...@apache.org> wrote:
> >         >         On Wed, 2007-10-17 at 17:27 +0100, Paul Fremantle
> >         wrote:
> >         >         > Oleg
> >         >         >
> >         >         > I have a scenario where if I call via SOAP POST it
> >         works
> >         >         fine. When I
> >         >         > call by HTTP GET I get this
> >         >         >
> >         >         > 2007-10-17 17:27:01,718 [ 10.62.75.83-pzfdell]
> >         >         [HttpServerWorker-1]
> >         >         > ERROR ServerHandler Unexpected HT
> >         >         > TP protocol error : Transfer-encoding header
> >         already present
> >         >         > org.apache.http.ProtocolException:
> >         Transfer-encoding header
> >         >         already
> >         >         > present
> >         >         >         at
> >         >         >
> >         >         org.apache.http.protocol.ResponseContent.process
> >         (ResponseContent.java :67)
> >         >         >         at
> >         >         >
> >         >
> >         org.apache.http.protocol.BasicHttpProcessor.process(
> BasicHttpProcessor.java :304)
> >         >         >         at
> >         >         >
> >         >
> >         org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(
> ServerHandler.java:220)
> >         >         >         at
> >         >         >
> >         >
> >
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncResponse
> >         >         > (HttpCoreNIOSender.
> >         >         > java:350)
> >         >         >         at
> >         >         >
> >         >
> >         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(
> HttpCoreNIOSender.java :215)
> >         >         >         at
> >         >         > org.apache.axis2.engine.AxisEngine.send
> >         >         (AxisEngine.java:396)
> >         >         >         at
> >         >         >
> >         >         org.apache.synapse.core.axis2.Axis2Sender.sendBack
> >         (Axis2Sender.java:104)
> >         >         >         at
> >         >         >
> >         >
> >         org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(
> Axis2SynapseEnvironment.java :1
> >         >         > 96)
> >         >         >
> >         >         > So, I don't think its just the Fault case :(
> >         >         >
> >         >         > Paul
> >         >         >
> >         >
> >         >         Hi Paul
> >         >
> >         >         That does not look good.
> >         >
> >         >         I'll _try_ to come up with a fix for the bug, but
> >         it'll
> >         >         require some
> >         >         poking around with the Synapse and Axis2 code.
> >         >
> >         >         Oleg
> >         >
> >         >         > On 10/17/07, Paul Fremantle < pzfreo@gmail.com>
> >         wrote:
> >         >         >         If I can get the success case working I'll
> >         be happy
> >         >         for now.
> >         >         >         Its just I thought I had that case and
> >         that was
> >         >         failing too :(
> >         >         >
> >         >         >         Let me dig around a bit. However, I think
> >         we need to
> >         >         get this
> >         >         >         fixed and solid before 1.1 . I think
> >         there's also a
> >         >         problem
> >         >         >         with the logic, which is that the
> >         assumption is that
> >         >         if there
> >         >         >         are no parameters then I don't want to
> >         invoke the
> >         >         service - I
> >         >         >         just want to see the service HTML.
> >         However, I don't
> >         >         agree with
> >         >         >         that - I think there are lots of cases
> >         where I want
> >         >         no
> >         >         >         parameters to equate to an empty body. It
> >         may be
> >         >         that the same
> >         >         >         problem exists in the standard Axis2 HTTP
> >         tran as
> >         >         well.
> >         >         >
> >         >         >         Paul
> >         >         >
> >         >         >
> >         >         >         On 10/17/07, Oleg Kalnichevski
> >         <ol...@apache.org>
> >         >         wrote:
> >         >         >                 On Wed, 2007-10-17 at 16:01 +0100,
> >         Paul
> >         >         Fremantle
> >         >         >                 wrote:
> >         >         >                 > Oleg
> >         >         >                 >
> >         >         >                 > Do you think the problem will
> >         still happen
> >         >         on the
> >         >         >                 non-fault case.
> >         >         >                 >
> >         >         >                 > Paul
> >         >         >                 >
> >         >         >
> >         >         >                 No, I do not think so. Only fault
> >         responses
> >         >         appear
> >         >         >                 affected. I can try
> >         >         >                 to come up with a fix for the bug
> >         if the
> >         >         issue is
> >         >         >                 pressing.
> >         >         >
> >         >         >                 Cheers
> >         >         >
> >         >         >                 Oleg
> >         >         >
> >         >         >
> >         >         >                 > On 10/17/07, Oleg Kalnichevski
> >         >         <ol...@apache.org>
> >         >         >                 wrote:
> >         >         >                 >         On Tue, 2007-10-16 at
> >         19:36 +0100,
> >         >         Paul
> >         >         >                 Fremantle wrote:
> >         >         >                 >         > Using the QA build
> >         that was
> >         >         posted a
> >         >         >                 couple of days ago, I
> >         >         >                 >         deployed
> >         >         >                 >         > sample 100 and typed
> >         >         >                 >         >
> >         >         >                 >
> >         >         >
> >         >
> >         http://localhost:8080/soap/StockQuoteProxy/getQuote?symbol=IBM
> >         >         >                 >         into my
> >         >         >                 >         > browser.
> >         >         >                 >         >
> >         >         >                 >
> >         >         >                 >         Asankha, Paul
> >         >         >                 >
> >         >         >                 >         This is what I think is
> >         the cause
> >         >         of the
> >         >         >                 problem:
> >         >         >                 >
> >         >         >                 >         The ServerWorker class
> >         uses the
> >         >         following
> >         >         >                 code to process HTTP
> >         >         >                 >         GET
> >         >         >                 >         requests
> >         >         >                 >
> >         >         >                 >         ==================
> >         >         >                 >         try {
> >         >         >                 >
> >         serverHandler.commitResponse
> >         >         (conn,
> >         >         >                 response);
> >         >         >                 >
> >         >         HTTPTransportUtils.processHTTPGetRequest (
> >         >         >                 >             msgContext, os,
> >         >         >                 >
> >         >         ( request.getFirstHeader(SOAPACTION) !=
> >         >         >                 null ?
> >         >         >                 >
> >         request.getFirstHeader
> >         >         >                 (SOAPACTION).getValue() : null),
> >         >         >                 >
> >         >         request.getRequestLine().getUri(),
> >         >         >                 >             cfgCtx,
> >         >         >                 >             parameters);
> >         >         >                 >         } catch (AxisFault
> >         axisFault) {
> >         >         >                 >
> >         handleException("Error
> >         >         processing GET
> >         >         >                 request for: " +
> >         >         >                 >
> >         >         request.getRequestLine().getUri(),
> >         >         >                 axisFault);
> >         >         >                 >         }
> >         >         >                 >         ==================
> >         >         >                 >
> >         >         >                 >         (1) ServerWorker submits
> >         200
> >         >         response head
> >         >         >                 prior to calling
> >         >         >                 >
> >         >         HTTPTransportUtils.processHTTPGetRequest
> >         >         >                 >         (2) AxisFault gets
> >         thrown
> >         >         somewhere inside
> >         >         >                 >         #processHTTPGetRequest
> >         >         >                 >         (3) The #handleException
> >         method is
> >         >         called to
> >         >         >                 handle the fault
> >         >         >                 >         (4) At some point
> >         >         >                 AxisEngine#sendFault(faultContext)
> >         gets
> >         >         >                 >         invoked
> >         >         >                 >         (5) AxisEngine attempts
> >         to submit
> >         >         an 500
> >         >         >                 response head
> >         >         >                 >         (6) Things get nasty
> >         >         >                 >
> >         >         >                 >         I do not know Axis2 well
> >         enough to
> >         >         be able
> >         >         >                 to fix the problem
> >         >         >                 >         myself
> >         >         >                 >         easily, but I could dig
> >         in deeper
> >         >         into the
> >         >         >                 Axis2 code if need
> >         >         >                 >         be.
> >         >         >                 >
> >         >         >                 >         Apparently the bit of
> >         code above
> >         >         needs some
> >         >         >                 work.
> >         >         >                 >
> >         >         >                 >         The NIO HTTP transport
> >         in Axis2
> >         >         proper is
> >         >         >                 very likely to be
> >         >         >                 >         affected as
> >         >         >                 >         well.
> >         >         >                 >
> >         >         >                 >         Cheers
> >         >         >                 >
> >         >         >                 >         Oleg
> >         >         >                 >
> >         >         >                 >
> >         >         >                 >         > 2007-10-16
> >         19:33:59,609
> >         >         [10.0.0.3-pzfdell]
> >         >         >                 >         [HttpClientWorker-1]
> >         ERROR
> >         >         >                 >         > ServerHand
> >         >         >                 >         > ler Unexpected HTTP
> >         protocol
> >         >         error :
> >         >         >                 Transfer-encoding
> >         >         >                 >         header already
> >         >         >                 >         > present
> >         >         >                 >         >
> >         >         org.apache.http.ProtocolException :
> >         >         >                 Transfer-encoding header
> >         >         >                 >         already
> >         >         >                 >         > present
> >         >         >                 >         >         at
> >         >         >                 >         >
> >         >         >                 >
> >         >         >
> >         >         org.apache.http.protocol.ResponseContent.process
> >         >         (ResponseContent.java
> >         >         >                 >         > :67)
> >         >         >                 >         >         at
> >         >         >                 >         >
> >         >         >                 >
> >         >         >
> >         >         org.apache.http.protocol.BasicHttpProcessor.process
> >         >         (BasicHttpProcesso
> >         >         >                 >         > r.java:304)
> >         >         >                 >         >         at
> >         >         >                 >         >
> >         >         >                 >
> >         >         >
> >         >
> >         org.apache.synapse.transport.nhttp.ServerHandler.commitResponse
> (Serve
> >         >         >                 >         > rHandler.java:220)
> >         >         >                 >         >         at
> >         >         >                 >         >
> >         >         >                 >
> >         >         >
> >         >
> >
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons
> >         >         >                 >         >
> >         e(HttpCoreNIOSender.java :350)
> >         >         >                 >         >         at
> >         >         >                 >         >
> >         >         >                 >
> >         >         >
> >         >
> >         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke
> (HttpCoreN
> >         >         >                 >         > IOSender.java :215)
> >         >         >                 >         >         at
> >         >         >                 >         >
> >         >         >
> >         >
> >         org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
> >         >         >                 >         >         at
> >         >         >                 >
> >         >         >
> >         >         org.apache.synapse.core.axis2.Axis2Sender.sendBack
> >         >         >                 >         > (Axis2Sender.java:1
> >         >         >                 >         > 04)
> >         >         >                 >         >
> >         >         >                 >         >
> >         >         >                 >         > On 10/16/07, Asankha
> >         C. Perera
> >         >         >                 < asankha@wso2.com> wrote:
> >         >         >                 >         >         Paul
> >         >         >                 >         >
> >         >         >                 >         >         Can you
> >         re-create this
> >         >         with the
> >         >         >                 sample #100 etc?
> >         >         >                 >         Please send
> >         >         >                 >         >         me details to
> >         >         reproduce.. AFAIK we
> >         >         >                 do not have a
> >         >         >                 >         test case for
> >         >         >                 >         >         GET access...
> >         I will try
> >         >         this out
> >         >         >                 and see what may
> >         >         >                 >         be wrong..
> >         >         >                 >         >         I believe you
> >         are not
> >         >         doing a load
> >         >         >                 test
> >         >         >                 >         >
> >         >         >                 >         >         asankha
> >         >         >                 >         >
> >         >         >                 >         >
> >         >         >                 >         >         Paul Fremantle
> >         wrote:
> >         >         >                 >         >         > I'm trying
> >         to use GET
> >         >         on a proxy
> >         >         >                 service hosted in
> >         >         >                 >         Synapse.
> >         >         >                 >         >         > I'm getting
> >         this
> >         >         error:
> >         >         >                 >         >         >
> >         >         >                 >         >         > 2007-10-16
> >         >         15:53:12,421
> >         >         >                 [ 10.0.0.3-pzfdell] [I/O
> >         >         >                 >         dispatcher
> >         >         >                 >         >         > 7]  INFO
> >         PipeImpl Usi
> >         >         >                 >         >         > ng simulated
> >         buffered
> >         >         Pipes for
> >         >         >                 event-driven to
> >         >         >                 >         stream IO
> >         >         >                 >         >         > bridging
> >         >         >                 >         >         > 2007-10-16
> >         >         15:53:12,906
> >         >         >                 [ 10.0.0.3-pzfdell]
> >         >         >                 >         >         >
> >         [HttpServerWorker-1]
> >         >         ERROR
> >         >         >                 ServerHand
> >         >         >                 >         >         > ler
> >         Unexpected HTTP
> >         >         protocol
> >         >         >                 error :
> >         >         >                 >         Transfer-encoding
> >         >         >                 >         >         > header
> >         already present
> >         >         >                 >         >         >
> >         >         >
> >         org.apache.http.ProtocolException :
> >         >         >                 >         Transfer-encoding header
> >         >         >                 >         >         > already
> >         present
> >         >         >                 >         >         >         at
> >         >         >                 >         >         >
> >         >         >                 >
> >         >         >
> >         >
> >         org.apache.http.protocol.ResponseContent.process(
> ResponseContent.java
> >         >         >                 >         >         > :67)
> >         >         >                 >         >         >         at
> >         >         >                 >         >         >
> >         >         >                 >
> >         >         >
> >         >         org.apache.http.protocol.BasicHttpProcessor.process
> >         >         (BasicHttpProcesso
> >         >         >                 >         >         > r.java:304)
> >         >         >                 >         >         >         at
> >         >         >                 >         >         >
> >         >         >                 >
> >         >         >
> >         >
> >         org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(Serve
> >         >         >                 >         >         >
> >         rHandler.java:220)
> >         >         >                 >         >         >         at
> >         >         >                 >         >         >
> >         >         >                 >
> >         >         >
> >         >
> >
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons
> >         >         >                 >         >         >
> >         >         e( HttpCoreNIOSender.java:352)
> >         >         >                 >         >         >         at
> >         >         >                 >         >         >
> >         >         >                 >
> >         >         >
> >         >
> >         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke
> >         >         (HttpCoreN
> >         >         >                 >         >         >
> >         IOSender.java:215)
> >         >         >                 >         >         >         at
> >         >         >                 >         >         >
> >         >         >                 >
> >         >         >
> >         >
> >         org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
> >         >         >                 >         >         >         at
> >         >         >                 >         >         >
> >         >         >                 >
> >         >         >
> >         >
> >         org.apache.synapse.core.axis2.Axis2Sender.sendBack(
> Axis2Sender.java:1
> >         >         >                 >         >         > 04)
> >         >         >                 >         >         >         at
> >         >         >                 >         >         >
> >         >         >                 >
> >         >         >
> >         >
> >         org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send
> >         >         >                 >         >         > (Axis2Synap
> >         >         >                 >         >         >
> >         >         seEnvironment.java:170)
> >         >         >                 >         >         >
> >         >         >                 >         >         > I managed to
> >         get past
> >         >         this one
> >         >         >                 by commenting out:
> >         >         >                 >         >         >
> >         if
> >         >         >                 >         >         >
> >         >         >
> >         >         (httpVersion.greaterEquals(HttpVersion.HTTP_1_1 ))
> >         >         >                 >         {
> >         >         >                 >         >
> >         >         >
> >         >                 //entity.setChunked(true);
> >         >         >                 >         >
> >         >             }
> >         >         >                 >         >         > line 127
> >         >         ServerHandler.java
> >         >         >                 >         >         >
> >         >         >                 >         >         > then I get
> >         this one:
> >         >         >                 >         >         >
> >         >         >                 >         >         > 2007-10-16
> >         >         16:01:45,125
> >         >         >                 [10.0.0.3-pzfdell]
> >         >         >                 >         >         >
> >         [HttpServerWorker-1]
> >         >         ERROR
> >         >         >                 ServerHandler
> >         >         >                 >         Unexpected HTTP
> >         >         >                 >         >         > protocol
> >         error :
> >         >         Response
> >         >         >                 already submitted
> >         >         >                 >         >         >
> >         >         org.apache.http.HttpException :
> >         >         >                 Response already
> >         >         >                 >         submitted
> >         >         >                 >         >         >         at
> >         >         >                 >         >         >
> >         >         >                 >
> >         >         >
> >         >
> >
> org.apache.http.impl.nio.DefaultNHttpServerConnection.submitResponse(DefaultNHttpServerCo
> >         >         >                 >         >         >
> >         nnection.java:201)
> >         >         >                 >         >         >         at
> >         >         >                 >         >         >
> >         >         >                 >
> >         >         >
> >         >
> >
> org.apache.synapse.transport.nhttp.LoggingNHttpServerConnection.submitResponse(LoggingNHt
> >         >         >                 >         >         >
> >         >         tpServerConnection.java:54)
> >         >         >                 >         >         >         at
> >         >         >                 >         >         >
> >         >         >                 >
> >         >         >
> >         >
> >         org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(
> ServerHandler.java:221)
> >         >         >                 >         >         >         at
> >         >         >                 >         >         >
> >         >         >                 >
> >         >         >
> >         >
> >
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncResponse(HttpCoreNIOSender.
> >         >         >                 >         >         > java:352)
> >         >         >                 >         >         >         at
> >         >         >                 >         >         >
> >         >         >                 >
> >         >         >
> >         >
> >         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke
> >         >         >                 >
> >         (HttpCoreNIOSender.java :215)
> >         >         >                 >         >         >         at
> >         >         >                 >         >         >
> >         >         >                 >
> >         >         >
> >         >
> >         org.apache.axis2.engine.AxisEngine.send(AxisEngine.java :396)
> >         >         >                 >         >         >         at
> >         >         >                 >         >         >
> >         >         >
> >         >         org.apache.synapse.core.axis2.Axis2Sender.sendBack
> >         >         >                 >         ( Axis2Sender.java:104)
> >         >         >                 >         >         >
> >         >         >                 >         >         > Help!!??
> >         >         >                 >         >         >
> >         >         >                 >         >         > Paul
> >         >         >                 >         >         >
> >         >         >                 >         >         > --
> >         >         >                 >         >         > Paul
> >         Fremantle
> >         >         >                 >         >         > Co-Founder
> >         and VP of
> >         >         Technical
> >         >         >                 Sales, WSO2
> >         >         >                 >         >         > OASIS WS-RX
> >         TC
> >         >         Co-chair
> >         >         >                 >         >         >
> >         >         >                 >         >         > blog:
> >         >         http://pzf.fremantle.org
> >         >         >                 >         >         >
> >         paul@wso2.com
> >         >         >                 >         >         >
> >         >         >                 >         >         > "Oxygenating
> >         the Web
> >         >         Service
> >         >         >                 Platform",
> >         >         >                 >         www.wso2.com
> >         >         >                 >         >
> >         >         >                 >         >
> >         >         >                 >         >
> >         >         >                 >         > --
> >         >         >                 >         > Paul Fremantle
> >         >         >                 >         > Co-Founder and VP of
> >         Technical
> >         >         Sales, WSO2
> >         >         >                 >         > OASIS WS-RX TC
> >         Co-chair
> >         >         >                 >         >
> >         >         >                 >         > blog:
> >         http://pzf.fremantle.org
> >         >         >                 >         > paul@wso2.com
> >         >         >                 >         >
> >         >         >                 >         > "Oxygenating the Web
> >         Service
> >         >         Platform",
> >         >         >                 www.wso2.com
> >         >         >                 >
> >         >         >                 >
> >         >         >                 >
> >         >         >
> >         >
> >
> ---------------------------------------------------------------------
> >         >         >                 >         To unsubscribe, e-mail:
> >         >         >
> >         synapse-dev-unsubscribe@ws.apache.org
> >         >         >                 >         For additional commands,
> >         e-mail:
> >         >         >                 >
> >         synapse-dev-help@ws.apache.org
> >         >         >                 >
> >         >         >                 >
> >         >         >                 >
> >         >         >                 >
> >         >         >                 > --
> >         >         >                 > Paul Fremantle
> >         >         >                 > Co-Founder and VP of Technical
> >         Sales, WSO2
> >         >         >                 > OASIS WS-RX TC Co-chair
> >         >         >                 >
> >         >         >                 > blog: http://pzf.fremantle.org
> >         >         >                 > paul@wso2.com
> >         >         >                 >
> >         >         >                 > "Oxygenating the Web Service
> >         Platform",
> >         >         www.wso2.com
> >         >         >
> >         >         >
> >         >         >
> >         >
> >
> ---------------------------------------------------------------------
> >         >         >                 To unsubscribe, e-mail:
> >         >         >
> >         synapse-dev-unsubscribe@ws.apache.org
> >         >         >                 For additional commands, e-mail:
> >         >         >                 synapse-dev-help@ws.apache.org
> >         >         >
> >         >         >
> >         >         >
> >         >         >
> >         >         >
> >         >         >         --
> >         >         >
> >         >         >         Paul Fremantle
> >         >         >         Co-Founder and VP of Technical Sales,
> >         WSO2
> >         >         >         OASIS WS-RX TC Co-chair
> >         >         >
> >         >         >         blog: http://pzf.fremantle.org
> >         >         >         paul@wso2.com
> >         >         >
> >         >         >         "Oxygenating the Web Service Platform",
> >         www.wso2.com
> >         >         >
> >         >         >
> >         >         >
> >         >         > --
> >         >         > Paul Fremantle
> >         >         > Co-Founder and VP of Technical Sales, WSO2
> >         >         > OASIS WS-RX TC Co-chair
> >         >         >
> >         >         > blog: http://pzf.fremantle.org
> >         >         > paul@wso2.com
> >         >         >
> >         >         > "Oxygenating the Web Service Platform",
> >         www.wso2.com
> >         >
> >         >
> >         >
> >
> ---------------------------------------------------------------------
> >         >         To unsubscribe, e-mail:
> >         synapse-dev-unsubscribe@ws.apache.org
> >         >         For additional commands, e-mail:
> >         >         synapse-dev-help@ws.apache.org
> >         >
> >         >
> >         >
> >         >
> >         > --
> >         > Paul Fremantle
> >         > Co-Founder and VP of Technical Sales, WSO2
> >         > OASIS WS-RX TC Co-chair
> >         >
> >         > blog: http://pzf.fremantle.org
> >         > paul@wso2.com
> >         >
> >         > "Oxygenating the Web Service Platform", www.wso2.com
> >
> >
> >
> ---------------------------------------------------------------------
> >         To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> >         For additional commands, e-mail:
> >         synapse-dev-help@ws.apache.org
> >
> >
> >
> >
> > --
> > Paul Fremantle
> > Co-Founder and VP of Technical Sales, WSO2
> > OASIS WS-RX TC Co-chair
> >
> > blog: http://pzf.fremantle.org
> > paul@wso2.com
> >
> > "Oxygenating the Web Service Platform", www.wso2.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>


-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

Re: problem with using NIO HTTP and HTTP GET

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Thu, 2007-10-18 at 14:01 +0100, Paul Fremantle wrote:
> Oleg
> 
> Can you test with this Synapse.xml
> 
>  <proxy name="test">
>         <target>
>             <inSequence>
>                <script language="groovy"><![CDATA[ 
>                   println mc.getReplyTo();
> 
> mc.setTo("http://www.w3.org/2005/08/addressing/anonymous");
>                   mc.setProperty ("RESPONSE", "true");
>                   mc.setPayloadXML('''
>                     <ns:getQuoteResponse
> xmlns:ns="http://services.samples/xsd">
>                       <ns:return>
>                     <ns:last>99.9</ns:last>
>                 </ns:return>
>              </ns:getQuoteResponse>''');
>        ]]></script> 
>             <send/>
>             </inSequence>
>             <outSequence>
>               <send/>
>             </outSequence>
>         </target>
>     </proxy>
> 
> and url
> 
> http://localhost:8080/soap/test/op?param1=hi
> 

That seems to work fine with my patch

----------------------------------
[INFO] PipeImpl - Using native OS Pipes for event-driven to stream IO
bridging
[DEBUG] headers - >> GET /soap/test/op?param1=hi HTTP/1.1
[DEBUG] headers - >> Host: localhost:8080
[DEBUG] headers - >> User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
rv:1.8.1.6) Gecko/20061201 Firefox/2.0.0.6 (Ubuntu-feisty)
[DEBUG] headers - >> Accept: text/xml,application/xml,application/xhtml
+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
[DEBUG] headers - >> Accept-Language: en,it;q=0.5
[DEBUG] headers - >> Accept-Encoding: gzip,deflate
[DEBUG] headers - >> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
[DEBUG] headers - >> Keep-Alive: 300
[DEBUG] headers - >> Connection: keep-alive
null
[DEBUG] headers - << HTTP/1.1 200 OK
[DEBUG] headers - << Content-Type: application/xml; charset=UTF-8
[DEBUG] headers - << Host: localhost:8080
[DEBUG] headers - << Accept-Encoding: gzip,deflate
[DEBUG] headers - << Accept-Language: en,it;q=0.5
[DEBUG] headers - << Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
[DEBUG] headers - << Keep-Alive: 300
[DEBUG] headers - << Accept: text/xml,application/xml,application/xhtml
+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
[DEBUG] headers - << Date: Thu, 18 Oct 2007 13:06:44 GMT
[DEBUG] headers - << Server: Synapse-HttpComponents-NIO
[DEBUG] headers - << Transfer-Encoding: chunked
[DEBUG] headers - << Connection: keep-alive
----------------------------------
<ns:getQuoteResponse xmlns:ns="http://services.samples/xsd">
                      <ns:return>
                    <ns:last>99.9</ns:last>
                </ns:return>
             </ns:getQuoteResponse>
----------------------------------

Oleg


> On 10/18/07, Oleg Kalnichevski < olegk@apache.org> wrote:
>         On Wed, 2007-10-17 at 20:40 +0100, Paul Fremantle wrote: 
>         > THANKS!
>         >
>         > Paul
>         >
>         
>         Paul and all,
>         
>         I think I have a partial fix for the problem. At the very
>         least I am no
>         longer getting "Transfer-encoding header already present" and
>         "response 
>         already submitted" exceptions. However, I am still seeing some
>         funny
>         stuff happening when accessing sample Axis2 server with a
>         browser.
>         
>         Sample client works just fine
>         --------------------------------
>         samples/axis2Client$ ant stockquote
>         -Daddurl=http://localhost:9000/soap/SimpleStockQuoteService
>         -Dmode=quote
>         -Dsymbol=IBMBuildfile: build.xml
>         
>         init: 
>             [mkdir] Created
>         dir: /home/oleg/src/apache.org/webservices/synapse/java/target/synapse-SNAPSHOT/samples/axis2Client/target/classes
>         
>         compile:
>             [javac] Compiling 10 source files
>         to /home/oleg/src/apache.org/webservices/synapse/java/target/synapse-SNAPSHOT/samples/axis2Client/target/classes 
>         
>         stockquote:
>              [java] Standard :: Stock price = $91.61813193560333
>         
>         BUILD SUCCESSFUL
>         Total time: 5 seconds
>         --------------------------------
>         
>         However when trying to execute the same request
>         <http://localhost:9000/soap/SimpleStockQuoteService/getQuote?symbol=IBM>
>         from a browser I am getting this fault. Is this expected? Am I
>         doing it 
>         wrong?
>         
>         --------------------------------
>         [DEBUG] headers - >>
>         GET /soap/SimpleStockQuoteService/getQuote?symbol=IBM HTTP/1.1
>         [DEBUG] headers - >> Host: localhost:9000
>         [DEBUG] headers - >> User-Agent: Mozilla/5.0 (X11; U; Linux
>         i686; en-US; 
>         rv:1.8.1.6) Gecko/20061201 Firefox/2.0.0.6 (Ubuntu-feisty)
>         [DEBUG] headers - >> Accept:
>         text/xml,application/xml,application/xhtml
>         +xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q= 0.5
>         [DEBUG] headers - >> Accept-Language: en,it;q=0.5
>         [DEBUG] headers - >> Accept-Encoding: gzip,deflate
>         [DEBUG] headers - >> Accept-Charset:
>         ISO-8859-1,utf-8;q=0.7,*;q=0.7
>         [DEBUG] headers - >> Keep-Alive: 300 
>         [DEBUG] headers - >> Connection: keep-alive
>         [ERROR] RPCMessageReceiver - Exception occurred while trying
>         to invoke
>         service method getQuote <org.apache.axis2.AxisFault: namespace
>         mismatch
>         require http://services.samples/xsd found
>         http://org.apache.axis2/xsd>org.apache.axis2.AxisFault:
>         namespace
>         mismatch require http://services.samples/xsd found
>         http://org.apache.axis2/xsd
>                 at
>         org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:177)
>                 at
>         org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic (RPCMessageReceiver.java:98)
>                 at
>         org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
>                 at
>         org.apache.axis2.receivers.AbstractMessageReceiver.receive
>         (AbstractMessageReceiver.java:96)
>                 at
>         org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
>                 at
>         org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPGetRequest(HTTPTransportUtils.java :249)
>                 at
>         org.apache.synapse.transport.nhttp.ServerWorker.processGet(ServerWorker.java:401)
>                 at
>         org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:180)
>                 at java.util.concurrent.ThreadPoolExecutor 
>         $Worker.runTask(ThreadPoolExecutor.java:650)
>                 at java.util.concurrent.ThreadPoolExecutor
>         $Worker.run(ThreadPoolExecutor.java:675)
>                 at java.lang.Thread.run(Thread.java:595)
>         
>         [ERROR] ServerWorker - Error processing GET request 
>         for: /soap/SimpleStockQuoteService/getQuote?symbol=IBM
>         <org.apache.axis2.AxisFault: namespace mismatch require
>         http://services.samples/xsd found
>         http://org.apache.axis2/xsd>org.apache.axis2.AxisFault:
>         namespace
>         mismatch require http://services.samples/xsd found
>         http://org.apache.axis2/xsd
>                 at
>         org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:177)
>                 at
>         org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:98)
>                 at 
>         org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
>                 at
>         org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java :96)
>                 at
>         org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
>                 at
>         org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPGetRequest(HTTPTransportUtils.java:249)
>                 at
>         org.apache.synapse.transport.nhttp.ServerWorker.processGet(ServerWorker.java:401)
>                 at
>         org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:180)
>                 at java.util.concurrent.ThreadPoolExecutor 
>         $Worker.runTask(ThreadPoolExecutor.java:650)
>                 at java.util.concurrent.ThreadPoolExecutor
>         $Worker.run(ThreadPoolExecutor.java:675)
>                 at java.lang.Thread.run(Thread.java:595)
>         
>         [DEBUG] headers - << HTTP/1.1 500 Internal Server Error 
>         [DEBUG] headers - << Content-Type: application/xml;
>         charset=UTF-8
>         [DEBUG] headers - << Date: Thu, 18 Oct 2007 10:51:41 GMT
>         [DEBUG] headers - << Server: Synapse-HttpComponents-NIO
>         [DEBUG] headers - << Transfer-Encoding: chunked 
>         [DEBUG] headers - << Connection: Close
>         --------------------------------
>         
>         Oleg
>         
>         
>         > On 10/17/07, Oleg Kalnichevski <ol...@apache.org> wrote:
>         >         On Wed, 2007-10-17 at 17:27 +0100, Paul Fremantle
>         wrote: 
>         >         > Oleg
>         >         >
>         >         > I have a scenario where if I call via SOAP POST it
>         works
>         >         fine. When I
>         >         > call by HTTP GET I get this
>         >         > 
>         >         > 2007-10-17 17:27:01,718 [ 10.62.75.83-pzfdell]
>         >         [HttpServerWorker-1]
>         >         > ERROR ServerHandler Unexpected HT
>         >         > TP protocol error : Transfer-encoding header
>         already present 
>         >         > org.apache.http.ProtocolException:
>         Transfer-encoding header
>         >         already
>         >         > present
>         >         >         at
>         >         >
>         >         org.apache.http.protocol.ResponseContent.process
>         (ResponseContent.java :67)
>         >         >         at
>         >         >
>         >
>         org.apache.http.protocol.BasicHttpProcessor.process(BasicHttpProcessor.java :304)
>         >         >         at
>         >         > 
>         >
>         org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(ServerHandler.java:220)
>         >         >         at
>         >         >
>         >
>         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncResponse 
>         >         > (HttpCoreNIOSender.
>         >         > java:350)
>         >         >         at
>         >         >
>         >
>         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreNIOSender.java :215)
>         >         >         at
>         >         > org.apache.axis2.engine.AxisEngine.send
>         >         (AxisEngine.java:396)
>         >         >         at
>         >         >
>         >         org.apache.synapse.core.axis2.Axis2Sender.sendBack
>         (Axis2Sender.java:104)
>         >         >         at
>         >         >
>         >
>         org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java :1
>         >         > 96)
>         >         > 
>         >         > So, I don't think its just the Fault case :(
>         >         >
>         >         > Paul
>         >         >
>         >
>         >         Hi Paul
>         >
>         >         That does not look good.
>         >
>         >         I'll _try_ to come up with a fix for the bug, but
>         it'll
>         >         require some
>         >         poking around with the Synapse and Axis2 code.
>         >
>         >         Oleg
>         >
>         >         > On 10/17/07, Paul Fremantle < pzfreo@gmail.com>
>         wrote:
>         >         >         If I can get the success case working I'll
>         be happy
>         >         for now.
>         >         >         Its just I thought I had that case and
>         that was 
>         >         failing too :(
>         >         >
>         >         >         Let me dig around a bit. However, I think
>         we need to
>         >         get this
>         >         >         fixed and solid before 1.1 . I think
>         there's also a 
>         >         problem
>         >         >         with the logic, which is that the
>         assumption is that
>         >         if there
>         >         >         are no parameters then I don't want to
>         invoke the
>         >         service - I 
>         >         >         just want to see the service HTML.
>         However, I don't
>         >         agree with
>         >         >         that - I think there are lots of cases
>         where I want
>         >         no
>         >         >         parameters to equate to an empty body. It
>         may be 
>         >         that the same
>         >         >         problem exists in the standard Axis2 HTTP
>         tran as
>         >         well.
>         >         >
>         >         >         Paul
>         >         >
>         >         > 
>         >         >         On 10/17/07, Oleg Kalnichevski
>         <ol...@apache.org>
>         >         wrote:
>         >         >                 On Wed, 2007-10-17 at 16:01 +0100,
>         Paul 
>         >         Fremantle
>         >         >                 wrote:
>         >         >                 > Oleg
>         >         >                 >
>         >         >                 > Do you think the problem will
>         still happen 
>         >         on the
>         >         >                 non-fault case.
>         >         >                 >
>         >         >                 > Paul
>         >         >                 >
>         >         > 
>         >         >                 No, I do not think so. Only fault
>         responses
>         >         appear
>         >         >                 affected. I can try
>         >         >                 to come up with a fix for the bug
>         if the 
>         >         issue is
>         >         >                 pressing.
>         >         >
>         >         >                 Cheers
>         >         >
>         >         >                 Oleg
>         >         > 
>         >         >
>         >         >                 > On 10/17/07, Oleg Kalnichevski
>         >         <ol...@apache.org>
>         >         >                 wrote:
>         >         >                 >         On Tue, 2007-10-16 at
>         19:36 +0100,
>         >         Paul
>         >         >                 Fremantle wrote:
>         >         >                 >         > Using the QA build
>         that was 
>         >         posted a
>         >         >                 couple of days ago, I
>         >         >                 >         deployed
>         >         >                 >         > sample 100 and typed
>         >         >                 >         >
>         >         >                 >
>         >         >
>         >
>         http://localhost:8080/soap/StockQuoteProxy/getQuote?symbol=IBM
>         >         >                 >         into my
>         >         >                 >         > browser.
>         >         >                 >         >
>         >         >                 > 
>         >         >                 >         Asankha, Paul
>         >         >                 >
>         >         >                 >         This is what I think is
>         the cause
>         >         of the
>         >         >                 problem: 
>         >         >                 >
>         >         >                 >         The ServerWorker class
>         uses the
>         >         following
>         >         >                 code to process HTTP
>         >         >                 >         GET 
>         >         >                 >         requests
>         >         >                 >
>         >         >                 >         ==================
>         >         >                 >         try { 
>         >         >                 >
>         serverHandler.commitResponse
>         >         (conn,
>         >         >                 response);
>         >         >                 >
>         >         HTTPTransportUtils.processHTTPGetRequest (
>         >         >                 >             msgContext, os,
>         >         >                 >
>         >         ( request.getFirstHeader(SOAPACTION) !=
>         >         >                 null ?
>         >         >                 >
>         request.getFirstHeader
>         >         >                 (SOAPACTION).getValue() : null),
>         >         >                 >
>         >         request.getRequestLine().getUri(),
>         >         >                 >             cfgCtx, 
>         >         >                 >             parameters);
>         >         >                 >         } catch (AxisFault
>         axisFault) {
>         >         >                 >
>         handleException("Error 
>         >         processing GET
>         >         >                 request for: " +
>         >         >                 >
>         >         request.getRequestLine().getUri(),
>         >         >                 axisFault); 
>         >         >                 >         }
>         >         >                 >         ==================
>         >         >                 >
>         >         >                 >         (1) ServerWorker submits
>         200 
>         >         response head
>         >         >                 prior to calling
>         >         >                 >
>         >         HTTPTransportUtils.processHTTPGetRequest
>         >         >                 >         (2) AxisFault gets
>         thrown 
>         >         somewhere inside
>         >         >                 >         #processHTTPGetRequest
>         >         >                 >         (3) The #handleException
>         method is
>         >         called to
>         >         >                 handle the fault
>         >         >                 >         (4) At some point
>         >         >                 AxisEngine#sendFault(faultContext)
>         gets
>         >         >                 >         invoked 
>         >         >                 >         (5) AxisEngine attempts
>         to submit
>         >         an 500
>         >         >                 response head
>         >         >                 >         (6) Things get nasty 
>         >         >                 >
>         >         >                 >         I do not know Axis2 well
>         enough to
>         >         be able
>         >         >                 to fix the problem
>         >         >                 >         myself 
>         >         >                 >         easily, but I could dig
>         in deeper
>         >         into the
>         >         >                 Axis2 code if need
>         >         >                 >         be.
>         >         >                 >
>         >         >                 >         Apparently the bit of
>         code above
>         >         needs some
>         >         >                 work.
>         >         >                 > 
>         >         >                 >         The NIO HTTP transport
>         in Axis2
>         >         proper is
>         >         >                 very likely to be
>         >         >                 >         affected as 
>         >         >                 >         well.
>         >         >                 >
>         >         >                 >         Cheers
>         >         >                 >
>         >         >                 >         Oleg 
>         >         >                 >
>         >         >                 >
>         >         >                 >         > 2007-10-16
>         19:33:59,609
>         >         [10.0.0.3-pzfdell]
>         >         >                 >         [HttpClientWorker-1]
>         ERROR 
>         >         >                 >         > ServerHand
>         >         >                 >         > ler Unexpected HTTP
>         protocol
>         >         error :
>         >         >                 Transfer-encoding 
>         >         >                 >         header already
>         >         >                 >         > present
>         >         >                 >         >
>         >         org.apache.http.ProtocolException :
>         >         >                 Transfer-encoding header
>         >         >                 >         already
>         >         >                 >         > present
>         >         >                 >         >         at 
>         >         >                 >         >
>         >         >                 >
>         >         >
>         >         org.apache.http.protocol.ResponseContent.process
>         >         (ResponseContent.java 
>         >         >                 >         > :67)
>         >         >                 >         >         at
>         >         >                 >         >
>         >         >                 > 
>         >         >
>         >         org.apache.http.protocol.BasicHttpProcessor.process
>         >         (BasicHttpProcesso
>         >         >                 >         > r.java:304)
>         >         >                 >         >         at 
>         >         >                 >         >
>         >         >                 >
>         >         >
>         >
>         org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(Serve
>         >         >                 >         > rHandler.java:220)
>         >         >                 >         >         at
>         >         >                 >         >
>         >         >                 >
>         >         >
>         >
>         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons 
>         >         >                 >         >
>         e(HttpCoreNIOSender.java :350)
>         >         >                 >         >         at
>         >         >                 >         >
>         >         >                 > 
>         >         >
>         >
>         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreN
>         >         >                 >         > IOSender.java :215)
>         >         >                 >         >         at 
>         >         >                 >         >
>         >         >
>         >
>         org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
>         >         >                 >         >         at
>         >         >                 >
>         >         >
>         >         org.apache.synapse.core.axis2.Axis2Sender.sendBack
>         >         >                 >         > (Axis2Sender.java:1
>         >         >                 >         > 04) 
>         >         >                 >         >
>         >         >                 >         >
>         >         >                 >         > On 10/16/07, Asankha
>         C. Perera
>         >         >                 < asankha@wso2.com> wrote:
>         >         >                 >         >         Paul
>         >         >                 >         >
>         >         >                 >         >         Can you
>         re-create this 
>         >         with the
>         >         >                 sample #100 etc?
>         >         >                 >         Please send
>         >         >                 >         >         me details to
>         >         reproduce.. AFAIK we
>         >         >                 do not have a
>         >         >                 >         test case for
>         >         >                 >         >         GET access...
>         I will try 
>         >         this out
>         >         >                 and see what may
>         >         >                 >         be wrong..
>         >         >                 >         >         I believe you
>         are not 
>         >         doing a load
>         >         >                 test
>         >         >                 >         >
>         >         >                 >         >         asankha
>         >         >                 >         > 
>         >         >                 >         >
>         >         >                 >         >         Paul Fremantle
>         wrote:
>         >         >                 >         >         > I'm trying
>         to use GET 
>         >         on a proxy
>         >         >                 service hosted in
>         >         >                 >         Synapse.
>         >         >                 >         >         > I'm getting
>         this 
>         >         error:
>         >         >                 >         >         >
>         >         >                 >         >         > 2007-10-16
>         >         15:53:12,421
>         >         >                 [ 10.0.0.3-pzfdell] [I/O
>         >         >                 >         dispatcher
>         >         >                 >         >         > 7]  INFO
>         PipeImpl Usi
>         >         >                 >         >         > ng simulated
>         buffered 
>         >         Pipes for
>         >         >                 event-driven to
>         >         >                 >         stream IO
>         >         >                 >         >         > bridging
>         >         >                 >         >         > 2007-10-16 
>         >         15:53:12,906
>         >         >                 [ 10.0.0.3-pzfdell]
>         >         >                 >         >         >
>         [HttpServerWorker-1]
>         >         ERROR
>         >         >                 ServerHand 
>         >         >                 >         >         > ler
>         Unexpected HTTP
>         >         protocol
>         >         >                 error :
>         >         >                 >         Transfer-encoding 
>         >         >                 >         >         > header
>         already present
>         >         >                 >         >         >
>         >         >
>         org.apache.http.ProtocolException :
>         >         >                 >         Transfer-encoding header
>         >         >                 >         >         > already
>         present
>         >         >                 >         >         >         at 
>         >         >                 >         >         >
>         >         >                 >
>         >         >
>         >
>         org.apache.http.protocol.ResponseContent.process( ResponseContent.java
>         >         >                 >         >         > :67)
>         >         >                 >         >         >         at
>         >         >                 >         >         >
>         >         >                 > 
>         >         >
>         >         org.apache.http.protocol.BasicHttpProcessor.process
>         >         (BasicHttpProcesso
>         >         >                 >         >         > r.java:304)
>         >         >                 >         >         >         at 
>         >         >                 >         >         >
>         >         >                 >
>         >         >
>         >
>         org.apache.synapse.transport.nhttp.ServerHandler.commitResponse (Serve
>         >         >                 >         >         >
>         rHandler.java:220)
>         >         >                 >         >         >         at
>         >         >                 >         >         > 
>         >         >                 >
>         >         >
>         >
>         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons
>         >         >                 >         >         >
>         >         e( HttpCoreNIOSender.java:352)
>         >         >                 >         >         >         at
>         >         >                 >         >         >
>         >         >                 > 
>         >         >
>         >
>         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke
>         >         (HttpCoreN
>         >         >                 >         >         >
>         IOSender.java:215)
>         >         >                 >         >         >         at 
>         >         >                 >         >         >
>         >         >                 >
>         >         >
>         >
>         org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
>         >         >                 >         >         >         at 
>         >         >                 >         >         >
>         >         >                 >
>         >         >
>         >
>         org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:1
>         >         >                 >         >         > 04)
>         >         >                 >         >         >         at
>         >         >                 >         >         >
>         >         >                 > 
>         >         >
>         >
>         org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send
>         >         >                 >         >         > (Axis2Synap
>         >         >                 >         >         > 
>         >         seEnvironment.java:170)
>         >         >                 >         >         >
>         >         >                 >         >         > I managed to
>         get past
>         >         this one 
>         >         >                 by commenting out:
>         >         >                 >         >         >
>         if
>         >         >                 >         >         >
>         >         > 
>         >         (httpVersion.greaterEquals(HttpVersion.HTTP_1_1 ))
>         >         >                 >         {
>         >         >                 >         >
>         >         >
>         >                 //entity.setChunked(true); 
>         >         >                 >         >
>         >             }
>         >         >                 >         >         > line 127
>         >         ServerHandler.java
>         >         >                 >         >         > 
>         >         >                 >         >         > then I get
>         this one:
>         >         >                 >         >         >
>         >         >                 >         >         > 2007-10-16 
>         >         16:01:45,125
>         >         >                 [10.0.0.3-pzfdell]
>         >         >                 >         >         >
>         [HttpServerWorker-1]
>         >         ERROR
>         >         >                 ServerHandler 
>         >         >                 >         Unexpected HTTP
>         >         >                 >         >         > protocol
>         error :
>         >         Response
>         >         >                 already submitted 
>         >         >                 >         >         >
>         >         org.apache.http.HttpException :
>         >         >                 Response already
>         >         >                 >         submitted 
>         >         >                 >         >         >         at
>         >         >                 >         >         >
>         >         >                 >
>         >         >
>         >
>         org.apache.http.impl.nio.DefaultNHttpServerConnection.submitResponse (DefaultNHttpServerCo
>         >         >                 >         >         >
>         nnection.java:201)
>         >         >                 >         >         >         at 
>         >         >                 >         >         >
>         >         >                 >
>         >         >
>         >
>         org.apache.synapse.transport.nhttp.LoggingNHttpServerConnection.submitResponse (LoggingNHt
>         >         >                 >         >         >
>         >         tpServerConnection.java:54)
>         >         >                 >         >         >         at
>         >         >                 >         >         > 
>         >         >                 >
>         >         >
>         >
>         org.apache.synapse.transport.nhttp.ServerHandler.commitResponse (ServerHandler.java:221)
>         >         >                 >         >         >         at 
>         >         >                 >         >         >
>         >         >                 >
>         >         >
>         >
>         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncResponse (HttpCoreNIOSender. 
>         >         >                 >         >         > java:352)
>         >         >                 >         >         >         at
>         >         >                 >         >         > 
>         >         >                 >
>         >         >
>         >
>         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke
>         >         >                 >
>         (HttpCoreNIOSender.java :215)
>         >         >                 >         >         >         at
>         >         >                 >         >         >
>         >         >                 >
>         >         >
>         >
>         org.apache.axis2.engine.AxisEngine.send(AxisEngine.java :396)
>         >         >                 >         >         >         at
>         >         >                 >         >         >
>         >         > 
>         >         org.apache.synapse.core.axis2.Axis2Sender.sendBack
>         >         >                 >         ( Axis2Sender.java:104)
>         >         >                 >         >         >
>         >         >                 >         >         > Help!!?? 
>         >         >                 >         >         >
>         >         >                 >         >         > Paul
>         >         >                 >         >         >
>         >         >                 >         >         > -- 
>         >         >                 >         >         > Paul
>         Fremantle
>         >         >                 >         >         > Co-Founder
>         and VP of
>         >         Technical
>         >         >                 Sales, WSO2 
>         >         >                 >         >         > OASIS WS-RX
>         TC
>         >         Co-chair
>         >         >                 >         >         >
>         >         >                 >         >         > blog: 
>         >         http://pzf.fremantle.org
>         >         >                 >         >         >
>         paul@wso2.com
>         >         >                 >         >         > 
>         >         >                 >         >         > "Oxygenating
>         the Web
>         >         Service
>         >         >                 Platform",
>         >         >                 >         www.wso2.com
>         >         >                 >         >
>         >         >                 >         >
>         >         >                 >         >
>         >         >                 >         > -- 
>         >         >                 >         > Paul Fremantle
>         >         >                 >         > Co-Founder and VP of
>         Technical
>         >         Sales, WSO2
>         >         >                 >         > OASIS WS-RX TC
>         Co-chair 
>         >         >                 >         >
>         >         >                 >         > blog:
>         http://pzf.fremantle.org
>         >         >                 >         > paul@wso2.com
>         >         >                 >         >
>         >         >                 >         > "Oxygenating the Web
>         Service
>         >         Platform", 
>         >         >                 www.wso2.com
>         >         >                 >
>         >         >                 >
>         >         >                 >
>         >         > 
>         >
>         ---------------------------------------------------------------------
>         >         >                 >         To unsubscribe, e-mail:
>         >         >
>         synapse-dev-unsubscribe@ws.apache.org
>         >         >                 >         For additional commands,
>         e-mail:
>         >         >                 >
>         synapse-dev-help@ws.apache.org
>         >         >                 >
>         >         >                 >
>         >         >                 >
>         >         >                 >
>         >         >                 > -- 
>         >         >                 > Paul Fremantle
>         >         >                 > Co-Founder and VP of Technical
>         Sales, WSO2
>         >         >                 > OASIS WS-RX TC Co-chair
>         >         >                 > 
>         >         >                 > blog: http://pzf.fremantle.org
>         >         >                 > paul@wso2.com
>         >         >                 > 
>         >         >                 > "Oxygenating the Web Service
>         Platform",
>         >         www.wso2.com
>         >         >
>         >         >
>         >         >
>         >
>         ---------------------------------------------------------------------
>         >         >                 To unsubscribe, e-mail:
>         >         >
>         synapse-dev-unsubscribe@ws.apache.org
>         >         >                 For additional commands, e-mail:
>         >         >                 synapse-dev-help@ws.apache.org
>         >         >
>         >         >
>         >         >
>         >         >
>         >         >
>         >         >         --
>         >         >
>         >         >         Paul Fremantle
>         >         >         Co-Founder and VP of Technical Sales,
>         WSO2 
>         >         >         OASIS WS-RX TC Co-chair
>         >         >
>         >         >         blog: http://pzf.fremantle.org
>         >         >         paul@wso2.com
>         >         >
>         >         >         "Oxygenating the Web Service Platform",
>         www.wso2.com
>         >         >
>         >         >
>         >         > 
>         >         > --
>         >         > Paul Fremantle
>         >         > Co-Founder and VP of Technical Sales, WSO2
>         >         > OASIS WS-RX TC Co-chair
>         >         >
>         >         > blog: http://pzf.fremantle.org
>         >         > paul@wso2.com
>         >         >
>         >         > "Oxygenating the Web Service Platform",
>         www.wso2.com
>         >
>         >
>         >
>         ---------------------------------------------------------------------
>         >         To unsubscribe, e-mail:
>         synapse-dev-unsubscribe@ws.apache.org
>         >         For additional commands, e-mail:
>         >         synapse-dev-help@ws.apache.org
>         >
>         >
>         >
>         >
>         > --
>         > Paul Fremantle
>         > Co-Founder and VP of Technical Sales, WSO2
>         > OASIS WS-RX TC Co-chair
>         >
>         > blog: http://pzf.fremantle.org
>         > paul@wso2.com 
>         >
>         > "Oxygenating the Web Service Platform", www.wso2.com
>         
>         
>         ---------------------------------------------------------------------
>         To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
>         For additional commands, e-mail:
>         synapse-dev-help@ws.apache.org
>         
> 
> 
> 
> -- 
> Paul Fremantle
> Co-Founder and VP of Technical Sales, WSO2
> OASIS WS-RX TC Co-chair
> 
> blog: http://pzf.fremantle.org
> paul@wso2.com
> 
> "Oxygenating the Web Service Platform", www.wso2.com


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


Re: problem with using NIO HTTP and HTTP GET

Posted by Paul Fremantle <pz...@gmail.com>.
Oleg

Can you test with this Synapse.xml

 <proxy name="test">
        <target>
            <inSequence>
               <script language="groovy"><![CDATA[
                  println mc.getReplyTo();
                  mc.setTo("http://www.w3.org/2005/08/addressing/anonymous
");
                  mc.setProperty("RESPONSE", "true");
                  mc.setPayloadXML('''
                    <ns:getQuoteResponse xmlns:ns="
http://services.samples/xsd">
                      <ns:return>
                    <ns:last>99.9</ns:last>
                </ns:return>
             </ns:getQuoteResponse>''');
       ]]></script>
            <send/>
            </inSequence>
            <outSequence>
              <send/>
            </outSequence>
        </target>
    </proxy>

and url

http://localhost:8080/soap/test/op?param1=hi

On 10/18/07, Oleg Kalnichevski <ol...@apache.org> wrote:
>
> On Wed, 2007-10-17 at 20:40 +0100, Paul Fremantle wrote:
> > THANKS!
> >
> > Paul
> >
>
> Paul and all,
>
> I think I have a partial fix for the problem. At the very least I am no
> longer getting "Transfer-encoding header already present" and "response
> already submitted" exceptions. However, I am still seeing some funny
> stuff happening when accessing sample Axis2 server with a browser.
>
> Sample client works just fine
> --------------------------------
> samples/axis2Client$ ant stockquote
> -Daddurl=http://localhost:9000/soap/SimpleStockQuoteService -Dmode=quote
> -Dsymbol=IBMBuildfile: build.xml
>
> init:
>     [mkdir] Created
> dir:
> /home/oleg/src/apache.org/webservices/synapse/java/target/synapse-SNAPSHOT/samples/axis2Client/target/classes
>
> compile:
>     [javac] Compiling 10 source files
> to
> /home/oleg/src/apache.org/webservices/synapse/java/target/synapse-SNAPSHOT/samples/axis2Client/target/classes
>
> stockquote:
>      [java] Standard :: Stock price = $91.61813193560333
>
> BUILD SUCCESSFUL
> Total time: 5 seconds
> --------------------------------
>
> However when trying to execute the same request
> <http://localhost:9000/soap/SimpleStockQuoteService/getQuote?symbol=IBM>
> from a browser I am getting this fault. Is this expected? Am I doing it
> wrong?
>
> --------------------------------
> [DEBUG] headers - >>
> GET /soap/SimpleStockQuoteService/getQuote?symbol=IBM HTTP/1.1
> [DEBUG] headers - >> Host: localhost:9000
> [DEBUG] headers - >> User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
> rv:1.8.1.6) Gecko/20061201 Firefox/2.0.0.6 (Ubuntu-feisty)
> [DEBUG] headers - >> Accept: text/xml,application/xml,application/xhtml
> +xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
> [DEBUG] headers - >> Accept-Language: en,it;q=0.5
> [DEBUG] headers - >> Accept-Encoding: gzip,deflate
> [DEBUG] headers - >> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
> [DEBUG] headers - >> Keep-Alive: 300
> [DEBUG] headers - >> Connection: keep-alive
> [ERROR] RPCMessageReceiver - Exception occurred while trying to invoke
> service method getQuote <org.apache.axis2.AxisFault: namespace mismatch
> require http://services.samples/xsd found
> http://org.apache.axis2/xsd>org.apache.axis2.AxisFault: namespace
> mismatch require http://services.samples/xsd found
> http://org.apache.axis2/xsd
>         at
> org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java
> :177)
>         at
> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(
> RPCMessageReceiver.java:98)
>         at
>
> org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic
> (AbstractInOutMessageReceiver.java:40)
>         at
> org.apache.axis2.receivers.AbstractMessageReceiver.receive(
> AbstractMessageReceiver.java:96)
>         at
> org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
>         at
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPGetRequest(
> HTTPTransportUtils.java:249)
>         at
> org.apache.synapse.transport.nhttp.ServerWorker.processGet(
> ServerWorker.java:401)
>         at
> org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:180)
>         at java.util.concurrent.ThreadPoolExecutor
> $Worker.runTask(ThreadPoolExecutor.java:650)
>         at java.util.concurrent.ThreadPoolExecutor
> $Worker.run(ThreadPoolExecutor.java:675)
>         at java.lang.Thread.run(Thread.java:595)
>
> [ERROR] ServerWorker - Error processing GET request
> for: /soap/SimpleStockQuoteService/getQuote?symbol=IBM
> <org.apache.axis2.AxisFault: namespace mismatch require
> http://services.samples/xsd found
> http://org.apache.axis2/xsd>org.apache.axis2.AxisFault: namespace
> mismatch require http://services.samples/xsd found
> http://org.apache.axis2/xsd
>         at
> org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java
> :177)
>         at
> org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(
> RPCMessageReceiver.java:98)
>         at
>
> org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic
> (AbstractInOutMessageReceiver.java:40)
>         at
> org.apache.axis2.receivers.AbstractMessageReceiver.receive(
> AbstractMessageReceiver.java:96)
>         at
> org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
>         at
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPGetRequest(
> HTTPTransportUtils.java:249)
>         at
> org.apache.synapse.transport.nhttp.ServerWorker.processGet(
> ServerWorker.java:401)
>         at
> org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:180)
>         at java.util.concurrent.ThreadPoolExecutor
> $Worker.runTask(ThreadPoolExecutor.java:650)
>         at java.util.concurrent.ThreadPoolExecutor
> $Worker.run(ThreadPoolExecutor.java:675)
>         at java.lang.Thread.run(Thread.java:595)
>
> [DEBUG] headers - << HTTP/1.1 500 Internal Server Error
> [DEBUG] headers - << Content-Type: application/xml; charset=UTF-8
> [DEBUG] headers - << Date: Thu, 18 Oct 2007 10:51:41 GMT
> [DEBUG] headers - << Server: Synapse-HttpComponents-NIO
> [DEBUG] headers - << Transfer-Encoding: chunked
> [DEBUG] headers - << Connection: Close
> --------------------------------
>
> Oleg
>
>
> > On 10/17/07, Oleg Kalnichevski <ol...@apache.org> wrote:
> >         On Wed, 2007-10-17 at 17:27 +0100, Paul Fremantle wrote:
> >         > Oleg
> >         >
> >         > I have a scenario where if I call via SOAP POST it works
> >         fine. When I
> >         > call by HTTP GET I get this
> >         >
> >         > 2007-10-17 17:27:01,718 [ 10.62.75.83-pzfdell]
> >         [HttpServerWorker-1]
> >         > ERROR ServerHandler Unexpected HT
> >         > TP protocol error : Transfer-encoding header already present
> >         > org.apache.http.ProtocolException: Transfer-encoding header
> >         already
> >         > present
> >         >         at
> >         >
> >         org.apache.http.protocol.ResponseContent.process(
> ResponseContent.java :67)
> >         >         at
> >         >
> >         org.apache.http.protocol.BasicHttpProcessor.process(
> BasicHttpProcessor.java :304)
> >         >         at
> >         >
> >         org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(
> ServerHandler.java:220)
> >         >         at
> >         >
> >
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncResponse
> >         > (HttpCoreNIOSender.
> >         > java:350)
> >         >         at
> >         >
> >         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(
> HttpCoreNIOSender.java:215)
> >         >         at
> >         > org.apache.axis2.engine.AxisEngine.send
> >         (AxisEngine.java:396)
> >         >         at
> >         >
> >         org.apache.synapse.core.axis2.Axis2Sender.sendBack(
> Axis2Sender.java:104)
> >         >         at
> >         >
> >         org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(
> Axis2SynapseEnvironment.java :1
> >         > 96)
> >         >
> >         > So, I don't think its just the Fault case :(
> >         >
> >         > Paul
> >         >
> >
> >         Hi Paul
> >
> >         That does not look good.
> >
> >         I'll _try_ to come up with a fix for the bug, but it'll
> >         require some
> >         poking around with the Synapse and Axis2 code.
> >
> >         Oleg
> >
> >         > On 10/17/07, Paul Fremantle <pz...@gmail.com> wrote:
> >         >         If I can get the success case working I'll be happy
> >         for now.
> >         >         Its just I thought I had that case and that was
> >         failing too :(
> >         >
> >         >         Let me dig around a bit. However, I think we need to
> >         get this
> >         >         fixed and solid before 1.1 . I think there's also a
> >         problem
> >         >         with the logic, which is that the assumption is that
> >         if there
> >         >         are no parameters then I don't want to invoke the
> >         service - I
> >         >         just want to see the service HTML. However, I don't
> >         agree with
> >         >         that - I think there are lots of cases where I want
> >         no
> >         >         parameters to equate to an empty body. It may be
> >         that the same
> >         >         problem exists in the standard Axis2 HTTP tran as
> >         well.
> >         >
> >         >         Paul
> >         >
> >         >
> >         >         On 10/17/07, Oleg Kalnichevski <ol...@apache.org>
> >         wrote:
> >         >                 On Wed, 2007-10-17 at 16:01 +0100, Paul
> >         Fremantle
> >         >                 wrote:
> >         >                 > Oleg
> >         >                 >
> >         >                 > Do you think the problem will still happen
> >         on the
> >         >                 non-fault case.
> >         >                 >
> >         >                 > Paul
> >         >                 >
> >         >
> >         >                 No, I do not think so. Only fault responses
> >         appear
> >         >                 affected. I can try
> >         >                 to come up with a fix for the bug if the
> >         issue is
> >         >                 pressing.
> >         >
> >         >                 Cheers
> >         >
> >         >                 Oleg
> >         >
> >         >
> >         >                 > On 10/17/07, Oleg Kalnichevski
> >         <ol...@apache.org>
> >         >                 wrote:
> >         >                 >         On Tue, 2007-10-16 at 19:36 +0100,
> >         Paul
> >         >                 Fremantle wrote:
> >         >                 >         > Using the QA build that was
> >         posted a
> >         >                 couple of days ago, I
> >         >                 >         deployed
> >         >                 >         > sample 100 and typed
> >         >                 >         >
> >         >                 >
> >         >
> >         http://localhost:8080/soap/StockQuoteProxy/getQuote?symbol=IBM
> >         >                 >         into my
> >         >                 >         > browser.
> >         >                 >         >
> >         >                 >
> >         >                 >         Asankha, Paul
> >         >                 >
> >         >                 >         This is what I think is the cause
> >         of the
> >         >                 problem:
> >         >                 >
> >         >                 >         The ServerWorker class uses the
> >         following
> >         >                 code to process HTTP
> >         >                 >         GET
> >         >                 >         requests
> >         >                 >
> >         >                 >         ==================
> >         >                 >         try {
> >         >                 >           serverHandler.commitResponse
> >         (conn,
> >         >                 response);
> >         >                 >
> >         HTTPTransportUtils.processHTTPGetRequest(
> >         >                 >             msgContext, os,
> >         >                 >
> >         ( request.getFirstHeader(SOAPACTION) !=
> >         >                 null ?
> >         >                 >             request.getFirstHeader
> >         >                 (SOAPACTION).getValue() : null),
> >         >                 >
> >         request.getRequestLine().getUri(),
> >         >                 >             cfgCtx,
> >         >                 >             parameters);
> >         >                 >         } catch (AxisFault axisFault) {
> >         >                 >           handleException("Error
> >         processing GET
> >         >                 request for: " +
> >         >                 >
> >         request.getRequestLine().getUri(),
> >         >                 axisFault);
> >         >                 >         }
> >         >                 >         ==================
> >         >                 >
> >         >                 >         (1) ServerWorker submits 200
> >         response head
> >         >                 prior to calling
> >         >                 >
> >         HTTPTransportUtils.processHTTPGetRequest
> >         >                 >         (2) AxisFault gets thrown
> >         somewhere inside
> >         >                 >         #processHTTPGetRequest
> >         >                 >         (3) The #handleException method is
> >         called to
> >         >                 handle the fault
> >         >                 >         (4) At some point
> >         >                 AxisEngine#sendFault(faultContext) gets
> >         >                 >         invoked
> >         >                 >         (5) AxisEngine attempts to submit
> >         an 500
> >         >                 response head
> >         >                 >         (6) Things get nasty
> >         >                 >
> >         >                 >         I do not know Axis2 well enough to
> >         be able
> >         >                 to fix the problem
> >         >                 >         myself
> >         >                 >         easily, but I could dig in deeper
> >         into the
> >         >                 Axis2 code if need
> >         >                 >         be.
> >         >                 >
> >         >                 >         Apparently the bit of code above
> >         needs some
> >         >                 work.
> >         >                 >
> >         >                 >         The NIO HTTP transport in Axis2
> >         proper is
> >         >                 very likely to be
> >         >                 >         affected as
> >         >                 >         well.
> >         >                 >
> >         >                 >         Cheers
> >         >                 >
> >         >                 >         Oleg
> >         >                 >
> >         >                 >
> >         >                 >         > 2007-10-16 19:33:59,609
> >         [10.0.0.3-pzfdell]
> >         >                 >         [HttpClientWorker-1] ERROR
> >         >                 >         > ServerHand
> >         >                 >         > ler Unexpected HTTP protocol
> >         error :
> >         >                 Transfer-encoding
> >         >                 >         header already
> >         >                 >         > present
> >         >                 >         >
> >         org.apache.http.ProtocolException :
> >         >                 Transfer-encoding header
> >         >                 >         already
> >         >                 >         > present
> >         >                 >         >         at
> >         >                 >         >
> >         >                 >
> >         >
> >         org.apache.http.protocol.ResponseContent.process
> >         (ResponseContent.java
> >         >                 >         > :67)
> >         >                 >         >         at
> >         >                 >         >
> >         >                 >
> >         >
> >         org.apache.http.protocol.BasicHttpProcessor.process
> >         (BasicHttpProcesso
> >         >                 >         > r.java:304)
> >         >                 >         >         at
> >         >                 >         >
> >         >                 >
> >         >
> >         org.apache.synapse.transport.nhttp.ServerHandler.commitResponse
> (Serve
> >         >                 >         > rHandler.java:220)
> >         >                 >         >         at
> >         >                 >         >
> >         >                 >
> >         >
> >
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons
> >         >                 >         > e(HttpCoreNIOSender.java :350)
> >         >                 >         >         at
> >         >                 >         >
> >         >                 >
> >         >
> >         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke
> (HttpCoreN
> >         >                 >         > IOSender.java :215)
> >         >                 >         >         at
> >         >                 >         >
> >         >
> >         org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
> >         >                 >         >         at
> >         >                 >
> >         >
> >         org.apache.synapse.core.axis2.Axis2Sender.sendBack
> >         >                 >         > (Axis2Sender.java:1
> >         >                 >         > 04)
> >         >                 >         >
> >         >                 >         >
> >         >                 >         > On 10/16/07, Asankha C. Perera
> >         >                 <as...@wso2.com> wrote:
> >         >                 >         >         Paul
> >         >                 >         >
> >         >                 >         >         Can you re-create this
> >         with the
> >         >                 sample #100 etc?
> >         >                 >         Please send
> >         >                 >         >         me details to
> >         reproduce.. AFAIK we
> >         >                 do not have a
> >         >                 >         test case for
> >         >                 >         >         GET access... I will try
> >         this out
> >         >                 and see what may
> >         >                 >         be wrong..
> >         >                 >         >         I believe you are not
> >         doing a load
> >         >                 test
> >         >                 >         >
> >         >                 >         >         asankha
> >         >                 >         >
> >         >                 >         >
> >         >                 >         >         Paul Fremantle wrote:
> >         >                 >         >         > I'm trying to use GET
> >         on a proxy
> >         >                 service hosted in
> >         >                 >         Synapse.
> >         >                 >         >         > I'm getting this
> >         error:
> >         >                 >         >         >
> >         >                 >         >         > 2007-10-16
> >         15:53:12,421
> >         >                 [10.0.0.3-pzfdell] [I/O
> >         >                 >         dispatcher
> >         >                 >         >         > 7]  INFO PipeImpl Usi
> >         >                 >         >         > ng simulated buffered
> >         Pipes for
> >         >                 event-driven to
> >         >                 >         stream IO
> >         >                 >         >         > bridging
> >         >                 >         >         > 2007-10-16
> >         15:53:12,906
> >         >                 [ 10.0.0.3-pzfdell]
> >         >                 >         >         > [HttpServerWorker-1]
> >         ERROR
> >         >                 ServerHand
> >         >                 >         >         > ler Unexpected HTTP
> >         protocol
> >         >                 error :
> >         >                 >         Transfer-encoding
> >         >                 >         >         > header already present
> >         >                 >         >         >
> >         >                 org.apache.http.ProtocolException:
> >         >                 >         Transfer-encoding header
> >         >                 >         >         > already present
> >         >                 >         >         >         at
> >         >                 >         >         >
> >         >                 >
> >         >
> >         org.apache.http.protocol.ResponseContent.process(
> ResponseContent.java
> >         >                 >         >         > :67)
> >         >                 >         >         >         at
> >         >                 >         >         >
> >         >                 >
> >         >
> >         org.apache.http.protocol.BasicHttpProcessor.process
> >         (BasicHttpProcesso
> >         >                 >         >         > r.java:304)
> >         >                 >         >         >         at
> >         >                 >         >         >
> >         >                 >
> >         >
> >         org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(Serve
> >         >                 >         >         > rHandler.java:220)
> >         >                 >         >         >         at
> >         >                 >         >         >
> >         >                 >
> >         >
> >
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons
> >         >                 >         >         >
> >         e( HttpCoreNIOSender.java:352)
> >         >                 >         >         >         at
> >         >                 >         >         >
> >         >                 >
> >         >
> >         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke
> >         (HttpCoreN
> >         >                 >         >         > IOSender.java:215)
> >         >                 >         >         >         at
> >         >                 >         >         >
> >         >                 >
> >         >
> >         org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
> >         >                 >         >         >         at
> >         >                 >         >         >
> >         >                 >
> >         >
> >         org.apache.synapse.core.axis2.Axis2Sender.sendBack(
> Axis2Sender.java:1
> >         >                 >         >         > 04)
> >         >                 >         >         >         at
> >         >                 >         >         >
> >         >                 >
> >         >
> >         org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send
> >         >                 >         >         > (Axis2Synap
> >         >                 >         >         >
> >         seEnvironment.java:170)
> >         >                 >         >         >
> >         >                 >         >         > I managed to get past
> >         this one
> >         >                 by commenting out:
> >         >                 >         >         >             if
> >         >                 >         >         >
> >         >
> >         (httpVersion.greaterEquals(HttpVersion.HTTP_1_1 ))
> >         >                 >         {
> >         >                 >         >
> >         >                 >                 //entity.setChunked(true);
> >         >                 >         >         >             }
> >         >                 >         >         > line 127
> >         ServerHandler.java
> >         >                 >         >         >
> >         >                 >         >         > then I get this one:
> >         >                 >         >         >
> >         >                 >         >         > 2007-10-16
> >         16:01:45,125
> >         >                 [10.0.0.3-pzfdell]
> >         >                 >         >         > [HttpServerWorker-1]
> >         ERROR
> >         >                 ServerHandler
> >         >                 >         Unexpected HTTP
> >         >                 >         >         > protocol error :
> >         Response
> >         >                 already submitted
> >         >                 >         >         >
> >         org.apache.http.HttpException :
> >         >                 Response already
> >         >                 >         submitted
> >         >                 >         >         >         at
> >         >                 >         >         >
> >         >                 >
> >         >
> >
> org.apache.http.impl.nio.DefaultNHttpServerConnection.submitResponse(DefaultNHttpServerCo
> >         >                 >         >         > nnection.java:201)
> >         >                 >         >         >         at
> >         >                 >         >         >
> >         >                 >
> >         >
> >
> org.apache.synapse.transport.nhttp.LoggingNHttpServerConnection.submitResponse(LoggingNHt
> >         >                 >         >         >
> >         tpServerConnection.java:54)
> >         >                 >         >         >         at
> >         >                 >         >         >
> >         >                 >
> >         >
> >         org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(
> ServerHandler.java:221)
> >         >                 >         >         >         at
> >         >                 >         >         >
> >         >                 >
> >         >
> >
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncResponse(HttpCoreNIOSender.
> >         >                 >         >         > java:352)
> >         >                 >         >         >         at
> >         >                 >         >         >
> >         >                 >
> >         >
> >         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke
> >         >                 >         (HttpCoreNIOSender.java :215)
> >         >                 >         >         >         at
> >         >                 >         >         >
> >         >                 >
> >         >
> >         org.apache.axis2.engine.AxisEngine.send(AxisEngine.java :396)
> >         >                 >         >         >         at
> >         >                 >         >         >
> >         >
> >         org.apache.synapse.core.axis2.Axis2Sender.sendBack
> >         >                 >         ( Axis2Sender.java:104)
> >         >                 >         >         >
> >         >                 >         >         > Help!!??
> >         >                 >         >         >
> >         >                 >         >         > Paul
> >         >                 >         >         >
> >         >                 >         >         > --
> >         >                 >         >         > Paul Fremantle
> >         >                 >         >         > Co-Founder and VP of
> >         Technical
> >         >                 Sales, WSO2
> >         >                 >         >         > OASIS WS-RX TC
> >         Co-chair
> >         >                 >         >         >
> >         >                 >         >         > blog:
> >         http://pzf.fremantle.org
> >         >                 >         >         > paul@wso2.com
> >         >                 >         >         >
> >         >                 >         >         > "Oxygenating the Web
> >         Service
> >         >                 Platform",
> >         >                 >         www.wso2.com
> >         >                 >         >
> >         >                 >         >
> >         >                 >         >
> >         >                 >         > --
> >         >                 >         > Paul Fremantle
> >         >                 >         > Co-Founder and VP of Technical
> >         Sales, WSO2
> >         >                 >         > OASIS WS-RX TC Co-chair
> >         >                 >         >
> >         >                 >         > blog: http://pzf.fremantle.org
> >         >                 >         > paul@wso2.com
> >         >                 >         >
> >         >                 >         > "Oxygenating the Web Service
> >         Platform",
> >         >                 www.wso2.com
> >         >                 >
> >         >                 >
> >         >                 >
> >         >
> >
> ---------------------------------------------------------------------
> >         >                 >         To unsubscribe, e-mail:
> >         >                 synapse-dev-unsubscribe@ws.apache.org
> >         >                 >         For additional commands, e-mail:
> >         >                 >         synapse-dev-help@ws.apache.org
> >         >                 >
> >         >                 >
> >         >                 >
> >         >                 >
> >         >                 > --
> >         >                 > Paul Fremantle
> >         >                 > Co-Founder and VP of Technical Sales, WSO2
> >         >                 > OASIS WS-RX TC Co-chair
> >         >                 >
> >         >                 > blog: http://pzf.fremantle.org
> >         >                 > paul@wso2.com
> >         >                 >
> >         >                 > "Oxygenating the Web Service Platform",
> >         www.wso2.com
> >         >
> >         >
> >         >
> >
> ---------------------------------------------------------------------
> >         >                 To unsubscribe, e-mail:
> >         >                 synapse-dev-unsubscribe@ws.apache.org
> >         >                 For additional commands, e-mail:
> >         >                 synapse-dev-help@ws.apache.org
> >         >
> >         >
> >         >
> >         >
> >         >
> >         >         --
> >         >
> >         >         Paul Fremantle
> >         >         Co-Founder and VP of Technical Sales, WSO2
> >         >         OASIS WS-RX TC Co-chair
> >         >
> >         >         blog: http://pzf.fremantle.org
> >         >         paul@wso2.com
> >         >
> >         >         "Oxygenating the Web Service Platform", www.wso2.com
> >         >
> >         >
> >         >
> >         > --
> >         > Paul Fremantle
> >         > Co-Founder and VP of Technical Sales, WSO2
> >         > OASIS WS-RX TC Co-chair
> >         >
> >         > blog: http://pzf.fremantle.org
> >         > paul@wso2.com
> >         >
> >         > "Oxygenating the Web Service Platform", www.wso2.com
> >
> >
> >
> ---------------------------------------------------------------------
> >         To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> >         For additional commands, e-mail:
> >         synapse-dev-help@ws.apache.org
> >
> >
> >
> >
> > --
> > Paul Fremantle
> > Co-Founder and VP of Technical Sales, WSO2
> > OASIS WS-RX TC Co-chair
> >
> > blog: http://pzf.fremantle.org
> > paul@wso2.com
> >
> > "Oxygenating the Web Service Platform", www.wso2.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>


-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

Re: problem with using NIO HTTP and HTTP GET

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Wed, 2007-10-17 at 20:40 +0100, Paul Fremantle wrote:
> THANKS!
> 
> Paul
> 

Paul and all,

I think I have a partial fix for the problem. At the very least I am no
longer getting "Transfer-encoding header already present" and "response
already submitted" exceptions. However, I am still seeing some funny
stuff happening when accessing sample Axis2 server with a browser.  

Sample client works just fine
--------------------------------
samples/axis2Client$ ant stockquote
-Daddurl=http://localhost:9000/soap/SimpleStockQuoteService -Dmode=quote
-Dsymbol=IBMBuildfile: build.xml

init:
    [mkdir] Created
dir: /home/oleg/src/apache.org/webservices/synapse/java/target/synapse-SNAPSHOT/samples/axis2Client/target/classes

compile:
    [javac] Compiling 10 source files
to /home/oleg/src/apache.org/webservices/synapse/java/target/synapse-SNAPSHOT/samples/axis2Client/target/classes

stockquote:
     [java] Standard :: Stock price = $91.61813193560333

BUILD SUCCESSFUL
Total time: 5 seconds
-------------------------------- 

However when trying to execute the same request
<http://localhost:9000/soap/SimpleStockQuoteService/getQuote?symbol=IBM>
from a browser I am getting this fault. Is this expected? Am I doing it
wrong?

-------------------------------- 
[DEBUG] headers - >>
GET /soap/SimpleStockQuoteService/getQuote?symbol=IBM HTTP/1.1
[DEBUG] headers - >> Host: localhost:9000
[DEBUG] headers - >> User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
rv:1.8.1.6) Gecko/20061201 Firefox/2.0.0.6 (Ubuntu-feisty)
[DEBUG] headers - >> Accept: text/xml,application/xml,application/xhtml
+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
[DEBUG] headers - >> Accept-Language: en,it;q=0.5
[DEBUG] headers - >> Accept-Encoding: gzip,deflate
[DEBUG] headers - >> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
[DEBUG] headers - >> Keep-Alive: 300
[DEBUG] headers - >> Connection: keep-alive
[ERROR] RPCMessageReceiver - Exception occurred while trying to invoke
service method getQuote <org.apache.axis2.AxisFault: namespace mismatch
require http://services.samples/xsd found
http://org.apache.axis2/xsd>org.apache.axis2.AxisFault: namespace
mismatch require http://services.samples/xsd found
http://org.apache.axis2/xsd
        at
org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:177)
        at
org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:98)
        at
org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
        at
org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:96)
        at
org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
        at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPGetRequest(HTTPTransportUtils.java:249)
        at
org.apache.synapse.transport.nhttp.ServerWorker.processGet(ServerWorker.java:401)
        at
org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:180)
        at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:650)
        at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)

[ERROR] ServerWorker - Error processing GET request
for: /soap/SimpleStockQuoteService/getQuote?symbol=IBM
<org.apache.axis2.AxisFault: namespace mismatch require
http://services.samples/xsd found
http://org.apache.axis2/xsd>org.apache.axis2.AxisFault: namespace
mismatch require http://services.samples/xsd found
http://org.apache.axis2/xsd
        at
org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:177)
        at
org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:98)
        at
org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
        at
org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:96)
        at
org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
        at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPGetRequest(HTTPTransportUtils.java:249)
        at
org.apache.synapse.transport.nhttp.ServerWorker.processGet(ServerWorker.java:401)
        at
org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:180)
        at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:650)
        at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)

[DEBUG] headers - << HTTP/1.1 500 Internal Server Error
[DEBUG] headers - << Content-Type: application/xml; charset=UTF-8
[DEBUG] headers - << Date: Thu, 18 Oct 2007 10:51:41 GMT
[DEBUG] headers - << Server: Synapse-HttpComponents-NIO
[DEBUG] headers - << Transfer-Encoding: chunked
[DEBUG] headers - << Connection: Close
-------------------------------- 

Oleg


> On 10/17/07, Oleg Kalnichevski <ol...@apache.org> wrote:
>         On Wed, 2007-10-17 at 17:27 +0100, Paul Fremantle wrote:
>         > Oleg
>         >
>         > I have a scenario where if I call via SOAP POST it works
>         fine. When I
>         > call by HTTP GET I get this
>         >
>         > 2007-10-17 17:27:01,718 [ 10.62.75.83-pzfdell]
>         [HttpServerWorker-1]
>         > ERROR ServerHandler Unexpected HT
>         > TP protocol error : Transfer-encoding header already present
>         > org.apache.http.ProtocolException: Transfer-encoding header
>         already 
>         > present
>         >         at
>         >
>         org.apache.http.protocol.ResponseContent.process(ResponseContent.java :67)
>         >         at
>         >
>         org.apache.http.protocol.BasicHttpProcessor.process(BasicHttpProcessor.java :304)
>         >         at
>         >
>         org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(ServerHandler.java:220)
>         >         at
>         >
>         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncResponse
>         > (HttpCoreNIOSender.
>         > java:350)
>         >         at
>         >
>         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreNIOSender.java:215)
>         >         at
>         > org.apache.axis2.engine.AxisEngine.send
>         (AxisEngine.java:396)
>         >         at
>         >
>         org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:104)
>         >         at
>         >
>         org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java :1
>         > 96)
>         >
>         > So, I don't think its just the Fault case :(
>         >
>         > Paul
>         >
>         
>         Hi Paul
>         
>         That does not look good.
>         
>         I'll _try_ to come up with a fix for the bug, but it'll
>         require some 
>         poking around with the Synapse and Axis2 code.
>         
>         Oleg
>         
>         > On 10/17/07, Paul Fremantle <pz...@gmail.com> wrote:
>         >         If I can get the success case working I'll be happy
>         for now. 
>         >         Its just I thought I had that case and that was
>         failing too :(
>         >
>         >         Let me dig around a bit. However, I think we need to
>         get this
>         >         fixed and solid before 1.1 . I think there's also a
>         problem 
>         >         with the logic, which is that the assumption is that
>         if there
>         >         are no parameters then I don't want to invoke the
>         service - I
>         >         just want to see the service HTML. However, I don't
>         agree with 
>         >         that - I think there are lots of cases where I want
>         no
>         >         parameters to equate to an empty body. It may be
>         that the same
>         >         problem exists in the standard Axis2 HTTP tran as
>         well. 
>         >
>         >         Paul
>         >
>         >
>         >         On 10/17/07, Oleg Kalnichevski <ol...@apache.org>
>         wrote:
>         >                 On Wed, 2007-10-17 at 16:01 +0100, Paul
>         Fremantle 
>         >                 wrote:
>         >                 > Oleg
>         >                 >
>         >                 > Do you think the problem will still happen
>         on the
>         >                 non-fault case.
>         >                 > 
>         >                 > Paul
>         >                 >
>         >
>         >                 No, I do not think so. Only fault responses
>         appear
>         >                 affected. I can try
>         >                 to come up with a fix for the bug if the
>         issue is 
>         >                 pressing.
>         >
>         >                 Cheers
>         >
>         >                 Oleg
>         >
>         >
>         >                 > On 10/17/07, Oleg Kalnichevski
>         <ol...@apache.org>
>         >                 wrote:
>         >                 >         On Tue, 2007-10-16 at 19:36 +0100,
>         Paul
>         >                 Fremantle wrote:
>         >                 >         > Using the QA build that was
>         posted a 
>         >                 couple of days ago, I
>         >                 >         deployed
>         >                 >         > sample 100 and typed
>         >                 >         >
>         >                 > 
>         >
>         http://localhost:8080/soap/StockQuoteProxy/getQuote?symbol=IBM
>         >                 >         into my
>         >                 >         > browser. 
>         >                 >         >
>         >                 >
>         >                 >         Asankha, Paul
>         >                 >
>         >                 >         This is what I think is the cause
>         of the 
>         >                 problem:
>         >                 >
>         >                 >         The ServerWorker class uses the
>         following
>         >                 code to process HTTP
>         >                 >         GET 
>         >                 >         requests
>         >                 >
>         >                 >         ==================
>         >                 >         try {
>         >                 >           serverHandler.commitResponse
>         (conn,
>         >                 response);
>         >                 >
>         HTTPTransportUtils.processHTTPGetRequest(
>         >                 >             msgContext, os,
>         >                 >
>         ( request.getFirstHeader(SOAPACTION) !=
>         >                 null ?
>         >                 >             request.getFirstHeader
>         >                 (SOAPACTION).getValue() : null),
>         >                 >
>         request.getRequestLine().getUri(),
>         >                 >             cfgCtx,
>         >                 >             parameters);
>         >                 >         } catch (AxisFault axisFault) {
>         >                 >           handleException("Error
>         processing GET 
>         >                 request for: " +
>         >                 >
>         request.getRequestLine().getUri(),
>         >                 axisFault);
>         >                 >         }
>         >                 >         ================== 
>         >                 >
>         >                 >         (1) ServerWorker submits 200
>         response head
>         >                 prior to calling
>         >                 >
>         HTTPTransportUtils.processHTTPGetRequest 
>         >                 >         (2) AxisFault gets thrown
>         somewhere inside
>         >                 >         #processHTTPGetRequest
>         >                 >         (3) The #handleException method is
>         called to 
>         >                 handle the fault
>         >                 >         (4) At some point
>         >                 AxisEngine#sendFault(faultContext) gets
>         >                 >         invoked
>         >                 >         (5) AxisEngine attempts to submit
>         an 500 
>         >                 response head
>         >                 >         (6) Things get nasty
>         >                 >
>         >                 >         I do not know Axis2 well enough to
>         be able
>         >                 to fix the problem 
>         >                 >         myself
>         >                 >         easily, but I could dig in deeper
>         into the
>         >                 Axis2 code if need
>         >                 >         be.
>         >                 > 
>         >                 >         Apparently the bit of code above
>         needs some
>         >                 work.
>         >                 >
>         >                 >         The NIO HTTP transport in Axis2
>         proper is
>         >                 very likely to be
>         >                 >         affected as
>         >                 >         well.
>         >                 >
>         >                 >         Cheers
>         >                 > 
>         >                 >         Oleg
>         >                 >
>         >                 >
>         >                 >         > 2007-10-16 19:33:59,609
>         [10.0.0.3-pzfdell]
>         >                 >         [HttpClientWorker-1] ERROR 
>         >                 >         > ServerHand
>         >                 >         > ler Unexpected HTTP protocol
>         error :
>         >                 Transfer-encoding
>         >                 >         header already 
>         >                 >         > present
>         >                 >         >
>         org.apache.http.ProtocolException :
>         >                 Transfer-encoding header
>         >                 >         already 
>         >                 >         > present
>         >                 >         >         at
>         >                 >         >
>         >                 >
>         >
>         org.apache.http.protocol.ResponseContent.process
>         (ResponseContent.java
>         >                 >         > :67)
>         >                 >         >         at
>         >                 >         >
>         >                 >
>         >
>         org.apache.http.protocol.BasicHttpProcessor.process
>         (BasicHttpProcesso
>         >                 >         > r.java:304)
>         >                 >         >         at
>         >                 >         >
>         >                 >
>         >
>         org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(Serve
>         >                 >         > rHandler.java:220)
>         >                 >         >         at
>         >                 >         > 
>         >                 >
>         >
>         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons
>         >                 >         > e(HttpCoreNIOSender.java :350)
>         >                 >         >         at 
>         >                 >         >
>         >                 >
>         >
>         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreN
>         >                 >         > IOSender.java :215)
>         >                 >         >         at
>         >                 >         >
>         >
>         org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
>         >                 >         >         at 
>         >                 >
>         >
>         org.apache.synapse.core.axis2.Axis2Sender.sendBack
>         >                 >         > (Axis2Sender.java:1
>         >                 >         > 04)
>         >                 >         > 
>         >                 >         >
>         >                 >         > On 10/16/07, Asankha C. Perera
>         >                 <as...@wso2.com> wrote:
>         >                 >         >         Paul 
>         >                 >         >
>         >                 >         >         Can you re-create this
>         with the
>         >                 sample #100 etc?
>         >                 >         Please send
>         >                 >         >         me details to
>         reproduce.. AFAIK we 
>         >                 do not have a
>         >                 >         test case for
>         >                 >         >         GET access... I will try
>         this out
>         >                 and see what may
>         >                 >         be wrong.. 
>         >                 >         >         I believe you are not
>         doing a load
>         >                 test
>         >                 >         >
>         >                 >         >         asankha
>         >                 >         > 
>         >                 >         >
>         >                 >         >         Paul Fremantle wrote:
>         >                 >         >         > I'm trying to use GET
>         on a proxy
>         >                 service hosted in 
>         >                 >         Synapse.
>         >                 >         >         > I'm getting this
>         error:
>         >                 >         >         >
>         >                 >         >         > 2007-10-16
>         15:53:12,421 
>         >                 [10.0.0.3-pzfdell] [I/O
>         >                 >         dispatcher
>         >                 >         >         > 7]  INFO PipeImpl Usi
>         >                 >         >         > ng simulated buffered
>         Pipes for 
>         >                 event-driven to
>         >                 >         stream IO
>         >                 >         >         > bridging
>         >                 >         >         > 2007-10-16
>         15:53:12,906 
>         >                 [ 10.0.0.3-pzfdell]
>         >                 >         >         > [HttpServerWorker-1]
>         ERROR
>         >                 ServerHand
>         >                 >         >         > ler Unexpected HTTP
>         protocol 
>         >                 error :
>         >                 >         Transfer-encoding
>         >                 >         >         > header already present
>         >                 >         >         >
>         >                 org.apache.http.ProtocolException:
>         >                 >         Transfer-encoding header
>         >                 >         >         > already present
>         >                 >         >         >         at 
>         >                 >         >         >
>         >                 >
>         >
>         org.apache.http.protocol.ResponseContent.process( ResponseContent.java
>         >                 >         >         > :67) 
>         >                 >         >         >         at
>         >                 >         >         >
>         >                 >
>         >
>         org.apache.http.protocol.BasicHttpProcessor.process
>         (BasicHttpProcesso
>         >                 >         >         > r.java:304)
>         >                 >         >         >         at
>         >                 >         >         >
>         >                 > 
>         >
>         org.apache.synapse.transport.nhttp.ServerHandler.commitResponse (Serve
>         >                 >         >         > rHandler.java:220)
>         >                 >         >         >         at 
>         >                 >         >         >
>         >                 >
>         >
>         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons
>         >                 >         >         >
>         e( HttpCoreNIOSender.java:352)
>         >                 >         >         >         at
>         >                 >         >         >
>         >                 >
>         >
>         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke
>         (HttpCoreN
>         >                 >         >         > IOSender.java:215)
>         >                 >         >         >         at
>         >                 >         >         >
>         >                 > 
>         >
>         org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
>         >                 >         >         >         at
>         >                 >         >         >
>         >                 > 
>         >
>         org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:1
>         >                 >         >         > 04)
>         >                 >         >         >         at
>         >                 >         >         >
>         >                 >
>         >
>         org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send
>         >                 >         >         > (Axis2Synap 
>         >                 >         >         >
>         seEnvironment.java:170)
>         >                 >         >         >
>         >                 >         >         > I managed to get past
>         this one
>         >                 by commenting out:
>         >                 >         >         >             if
>         >                 >         >         >
>         >
>         (httpVersion.greaterEquals(HttpVersion.HTTP_1_1 ))
>         >                 >         {
>         >                 >         >
>         >                 >                 //entity.setChunked(true);
>         >                 >         >         >             } 
>         >                 >         >         > line 127
>         ServerHandler.java
>         >                 >         >         >
>         >                 >         >         > then I get this one:
>         >                 >         >         > 
>         >                 >         >         > 2007-10-16
>         16:01:45,125
>         >                 [10.0.0.3-pzfdell]
>         >                 >         >         > [HttpServerWorker-1]
>         ERROR
>         >                 ServerHandler 
>         >                 >         Unexpected HTTP
>         >                 >         >         > protocol error :
>         Response
>         >                 already submitted
>         >                 >         >         >
>         org.apache.http.HttpException :
>         >                 Response already
>         >                 >         submitted
>         >                 >         >         >         at
>         >                 >         >         > 
>         >                 >
>         >
>         org.apache.http.impl.nio.DefaultNHttpServerConnection.submitResponse (DefaultNHttpServerCo
>         >                 >         >         > nnection.java:201)
>         >                 >         >         >         at
>         >                 >         >         >
>         >                 >
>         >
>         org.apache.synapse.transport.nhttp.LoggingNHttpServerConnection.submitResponse (LoggingNHt
>         >                 >         >         >
>         tpServerConnection.java:54)
>         >                 >         >         >         at
>         >                 >         >         >
>         >                 > 
>         >
>         org.apache.synapse.transport.nhttp.ServerHandler.commitResponse (ServerHandler.java:221)
>         >                 >         >         >         at
>         >                 >         >         > 
>         >                 >
>         >
>         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncResponse (HttpCoreNIOSender.
>         >                 >         >         > java:352)
>         >                 >         >         >         at 
>         >                 >         >         >
>         >                 >
>         >
>         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke
>         >                 >         (HttpCoreNIOSender.java :215)
>         >                 >         >         >         at
>         >                 >         >         >
>         >                 >
>         >
>         org.apache.axis2.engine.AxisEngine.send(AxisEngine.java :396)
>         >                 >         >         >         at
>         >                 >         >         >
>         >
>         org.apache.synapse.core.axis2.Axis2Sender.sendBack
>         >                 >         ( Axis2Sender.java:104)
>         >                 >         >         >
>         >                 >         >         > Help!!??
>         >                 >         >         >
>         >                 >         >         > Paul 
>         >                 >         >         >
>         >                 >         >         > --
>         >                 >         >         > Paul Fremantle
>         >                 >         >         > Co-Founder and VP of
>         Technical 
>         >                 Sales, WSO2
>         >                 >         >         > OASIS WS-RX TC
>         Co-chair
>         >                 >         >         >
>         >                 >         >         > blog:
>         http://pzf.fremantle.org
>         >                 >         >         > paul@wso2.com
>         >                 >         >         > 
>         >                 >         >         > "Oxygenating the Web
>         Service
>         >                 Platform",
>         >                 >         www.wso2.com
>         >                 >         > 
>         >                 >         >
>         >                 >         >
>         >                 >         > --
>         >                 >         > Paul Fremantle
>         >                 >         > Co-Founder and VP of Technical
>         Sales, WSO2 
>         >                 >         > OASIS WS-RX TC Co-chair
>         >                 >         >
>         >                 >         > blog: http://pzf.fremantle.org
>         >                 >         > paul@wso2.com
>         >                 >         >
>         >                 >         > "Oxygenating the Web Service
>         Platform", 
>         >                 www.wso2.com
>         >                 >
>         >                 >
>         >                 >
>         >
>         --------------------------------------------------------------------- 
>         >                 >         To unsubscribe, e-mail:
>         >                 synapse-dev-unsubscribe@ws.apache.org
>         >                 >         For additional commands, e-mail: 
>         >                 >         synapse-dev-help@ws.apache.org
>         >                 >
>         >                 >
>         >                 >
>         >                 > 
>         >                 > --
>         >                 > Paul Fremantle
>         >                 > Co-Founder and VP of Technical Sales, WSO2
>         >                 > OASIS WS-RX TC Co-chair
>         >                 > 
>         >                 > blog: http://pzf.fremantle.org
>         >                 > paul@wso2.com
>         >                 >
>         >                 > "Oxygenating the Web Service Platform",
>         www.wso2.com
>         >
>         >
>         >
>         ---------------------------------------------------------------------
>         >                 To unsubscribe, e-mail:
>         >                 synapse-dev-unsubscribe@ws.apache.org
>         >                 For additional commands, e-mail:
>         >                 synapse-dev-help@ws.apache.org
>         >
>         >
>         >
>         >
>         >
>         >         --
>         >
>         >         Paul Fremantle
>         >         Co-Founder and VP of Technical Sales, WSO2
>         >         OASIS WS-RX TC Co-chair 
>         >
>         >         blog: http://pzf.fremantle.org
>         >         paul@wso2.com
>         >
>         >         "Oxygenating the Web Service Platform", www.wso2.com
>         >
>         >
>         >
>         > --
>         > Paul Fremantle
>         > Co-Founder and VP of Technical Sales, WSO2
>         > OASIS WS-RX TC Co-chair
>         >
>         > blog: http://pzf.fremantle.org
>         > paul@wso2.com
>         >
>         > "Oxygenating the Web Service Platform", www.wso2.com
>         
>         
>         --------------------------------------------------------------------- 
>         To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
>         For additional commands, e-mail:
>         synapse-dev-help@ws.apache.org
>         
> 
> 
> 
> -- 
> Paul Fremantle
> Co-Founder and VP of Technical Sales, WSO2
> OASIS WS-RX TC Co-chair
> 
> blog: http://pzf.fremantle.org
> paul@wso2.com
> 
> "Oxygenating the Web Service Platform", www.wso2.com


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


Re: problem with using NIO HTTP and HTTP GET

Posted by Paul Fremantle <pz...@gmail.com>.
THANKS!

Paul

On 10/17/07, Oleg Kalnichevski <ol...@apache.org> wrote:
>
> On Wed, 2007-10-17 at 17:27 +0100, Paul Fremantle wrote:
> > Oleg
> >
> > I have a scenario where if I call via SOAP POST it works fine. When I
> > call by HTTP GET I get this
> >
> > 2007-10-17 17:27:01,718 [10.62.75.83-pzfdell] [HttpServerWorker-1]
> > ERROR ServerHandler Unexpected HT
> > TP protocol error : Transfer-encoding header already present
> > org.apache.http.ProtocolException: Transfer-encoding header already
> > present
> >         at
> > org.apache.http.protocol.ResponseContent.process(ResponseContent.java:67)
> >         at
> > org.apache.http.protocol.BasicHttpProcessor.process(
> BasicHttpProcessor.java:304)
> >         at
> > org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(
> ServerHandler.java:220)
> >         at
> > org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncResponse
> > (HttpCoreNIOSender.
> > java:350)
> >         at
> > org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(
> HttpCoreNIOSender.java:215)
> >         at
> > org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
> >         at
> > org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:104)
> >         at
> > org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(
> Axis2SynapseEnvironment.java:1
> > 96)
> >
> > So, I don't think its just the Fault case :(
> >
> > Paul
> >
>
> Hi Paul
>
> That does not look good.
>
> I'll _try_ to come up with a fix for the bug, but it'll require some
> poking around with the Synapse and Axis2 code.
>
> Oleg
>
> > On 10/17/07, Paul Fremantle <pz...@gmail.com> wrote:
> >         If I can get the success case working I'll be happy for now.
> >         Its just I thought I had that case and that was failing too :(
> >
> >         Let me dig around a bit. However, I think we need to get this
> >         fixed and solid before 1.1 . I think there's also a problem
> >         with the logic, which is that the assumption is that if there
> >         are no parameters then I don't want to invoke the service - I
> >         just want to see the service HTML. However, I don't agree with
> >         that - I think there are lots of cases where I want no
> >         parameters to equate to an empty body. It may be that the same
> >         problem exists in the standard Axis2 HTTP tran as well.
> >
> >         Paul
> >
> >
> >         On 10/17/07, Oleg Kalnichevski <ol...@apache.org> wrote:
> >                 On Wed, 2007-10-17 at 16:01 +0100, Paul Fremantle
> >                 wrote:
> >                 > Oleg
> >                 >
> >                 > Do you think the problem will still happen on the
> >                 non-fault case.
> >                 >
> >                 > Paul
> >                 >
> >
> >                 No, I do not think so. Only fault responses appear
> >                 affected. I can try
> >                 to come up with a fix for the bug if the issue is
> >                 pressing.
> >
> >                 Cheers
> >
> >                 Oleg
> >
> >
> >                 > On 10/17/07, Oleg Kalnichevski <ol...@apache.org>
> >                 wrote:
> >                 >         On Tue, 2007-10-16 at 19:36 +0100, Paul
> >                 Fremantle wrote:
> >                 >         > Using the QA build that was posted a
> >                 couple of days ago, I
> >                 >         deployed
> >                 >         > sample 100 and typed
> >                 >         >
> >                 >
> >
> http://localhost:8080/soap/StockQuoteProxy/getQuote?symbol=IBM
> >                 >         into my
> >                 >         > browser.
> >                 >         >
> >                 >
> >                 >         Asankha, Paul
> >                 >
> >                 >         This is what I think is the cause of the
> >                 problem:
> >                 >
> >                 >         The ServerWorker class uses the following
> >                 code to process HTTP
> >                 >         GET
> >                 >         requests
> >                 >
> >                 >         ==================
> >                 >         try {
> >                 >           serverHandler.commitResponse (conn,
> >                 response);
> >                 >           HTTPTransportUtils.processHTTPGetRequest(
> >                 >             msgContext, os,
> >                 >             (request.getFirstHeader(SOAPACTION) !=
> >                 null ?
> >                 >             request.getFirstHeader
> >                 (SOAPACTION).getValue() : null),
> >                 >             request.getRequestLine().getUri(),
> >                 >             cfgCtx,
> >                 >             parameters);
> >                 >         } catch (AxisFault axisFault) {
> >                 >           handleException("Error processing GET
> >                 request for: " +
> >                 >           request.getRequestLine().getUri(),
> >                 axisFault);
> >                 >         }
> >                 >         ==================
> >                 >
> >                 >         (1) ServerWorker submits 200 response head
> >                 prior to calling
> >                 >         HTTPTransportUtils.processHTTPGetRequest
> >                 >         (2) AxisFault gets thrown somewhere inside
> >                 >         #processHTTPGetRequest
> >                 >         (3) The #handleException method is called to
> >                 handle the fault
> >                 >         (4) At some point
> >                 AxisEngine#sendFault(faultContext) gets
> >                 >         invoked
> >                 >         (5) AxisEngine attempts to submit an 500
> >                 response head
> >                 >         (6) Things get nasty
> >                 >
> >                 >         I do not know Axis2 well enough to be able
> >                 to fix the problem
> >                 >         myself
> >                 >         easily, but I could dig in deeper into the
> >                 Axis2 code if need
> >                 >         be.
> >                 >
> >                 >         Apparently the bit of code above needs some
> >                 work.
> >                 >
> >                 >         The NIO HTTP transport in Axis2 proper is
> >                 very likely to be
> >                 >         affected as
> >                 >         well.
> >                 >
> >                 >         Cheers
> >                 >
> >                 >         Oleg
> >                 >
> >                 >
> >                 >         > 2007-10-16 19:33:59,609 [10.0.0.3-pzfdell]
> >                 >         [HttpClientWorker-1] ERROR
> >                 >         > ServerHand
> >                 >         > ler Unexpected HTTP protocol error :
> >                 Transfer-encoding
> >                 >         header already
> >                 >         > present
> >                 >         > org.apache.http.ProtocolException :
> >                 Transfer-encoding header
> >                 >         already
> >                 >         > present
> >                 >         >         at
> >                 >         >
> >                 >
> >                 org.apache.http.protocol.ResponseContent.process(
> ResponseContent.java
> >                 >         > :67)
> >                 >         >         at
> >                 >         >
> >                 >
> >                 org.apache.http.protocol.BasicHttpProcessor.process
> (BasicHttpProcesso
> >                 >         > r.java:304)
> >                 >         >         at
> >                 >         >
> >                 >
> >
> org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(Serve
> >                 >         > rHandler.java:220)
> >                 >         >         at
> >                 >         >
> >                 >
> >
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons
> >                 >         > e(HttpCoreNIOSender.java :350)
> >                 >         >         at
> >                 >         >
> >                 >
> >
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreN
> >                 >         > IOSender.java :215)
> >                 >         >         at
> >                 >         >
> >                 org.apache.axis2.engine.AxisEngine.send(AxisEngine.java
> :396)
> >                 >         >         at
> >                 >
> >                 org.apache.synapse.core.axis2.Axis2Sender.sendBack
> >                 >         > (Axis2Sender.java:1
> >                 >         > 04)
> >                 >         >
> >                 >         >
> >                 >         > On 10/16/07, Asankha C. Perera
> >                 <as...@wso2.com> wrote:
> >                 >         >         Paul
> >                 >         >
> >                 >         >         Can you re-create this with the
> >                 sample #100 etc?
> >                 >         Please send
> >                 >         >         me details to reproduce.. AFAIK we
> >                 do not have a
> >                 >         test case for
> >                 >         >         GET access... I will try this out
> >                 and see what may
> >                 >         be wrong..
> >                 >         >         I believe you are not doing a load
> >                 test
> >                 >         >
> >                 >         >         asankha
> >                 >         >
> >                 >         >
> >                 >         >         Paul Fremantle wrote:
> >                 >         >         > I'm trying to use GET on a proxy
> >                 service hosted in
> >                 >         Synapse.
> >                 >         >         > I'm getting this error:
> >                 >         >         >
> >                 >         >         > 2007-10-16 15:53:12,421
> >                 [10.0.0.3-pzfdell] [I/O
> >                 >         dispatcher
> >                 >         >         > 7]  INFO PipeImpl Usi
> >                 >         >         > ng simulated buffered Pipes for
> >                 event-driven to
> >                 >         stream IO
> >                 >         >         > bridging
> >                 >         >         > 2007-10-16 15:53:12,906
> >                 [ 10.0.0.3-pzfdell]
> >                 >         >         > [HttpServerWorker-1] ERROR
> >                 ServerHand
> >                 >         >         > ler Unexpected HTTP protocol
> >                 error :
> >                 >         Transfer-encoding
> >                 >         >         > header already present
> >                 >         >         >
> >                 org.apache.http.ProtocolException:
> >                 >         Transfer-encoding header
> >                 >         >         > already present
> >                 >         >         >         at
> >                 >         >         >
> >                 >
> >                 org.apache.http.protocol.ResponseContent.process(
> ResponseContent.java
> >                 >         >         > :67)
> >                 >         >         >         at
> >                 >         >         >
> >                 >
> >                 org.apache.http.protocol.BasicHttpProcessor.process
> (BasicHttpProcesso
> >                 >         >         > r.java:304)
> >                 >         >         >         at
> >                 >         >         >
> >                 >
> >
> org.apache.synapse.transport.nhttp.ServerHandler.commitResponse (Serve
> >                 >         >         > rHandler.java:220)
> >                 >         >         >         at
> >                 >         >         >
> >                 >
> >
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons
> >                 >         >         > e(HttpCoreNIOSender.java:352)
> >                 >         >         >         at
> >                 >         >         >
> >                 >
> >
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreN
> >                 >         >         > IOSender.java:215)
> >                 >         >         >         at
> >                 >         >         >
> >                 >
> >                 org.apache.axis2.engine.AxisEngine.send(AxisEngine.java
> :396)
> >                 >         >         >         at
> >                 >         >         >
> >                 >
> >                 org.apache.synapse.core.axis2.Axis2Sender.sendBack(
> Axis2Sender.java:1
> >                 >         >         > 04)
> >                 >         >         >         at
> >                 >         >         >
> >                 >
> >
> org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send
> >                 >         >         > (Axis2Synap
> >                 >         >         > seEnvironment.java:170)
> >                 >         >         >
> >                 >         >         > I managed to get past this one
> >                 by commenting out:
> >                 >         >         >             if
> >                 >         >         >
> >                 (httpVersion.greaterEquals(HttpVersion.HTTP_1_1))
> >                 >         {
> >                 >         >
> >                 >                 //entity.setChunked(true);
> >                 >         >         >             }
> >                 >         >         > line 127 ServerHandler.java
> >                 >         >         >
> >                 >         >         > then I get this one:
> >                 >         >         >
> >                 >         >         > 2007-10-16 16:01:45,125
> >                 [10.0.0.3-pzfdell]
> >                 >         >         > [HttpServerWorker-1] ERROR
> >                 ServerHandler
> >                 >         Unexpected HTTP
> >                 >         >         > protocol error : Response
> >                 already submitted
> >                 >         >         > org.apache.http.HttpException :
> >                 Response already
> >                 >         submitted
> >                 >         >         >         at
> >                 >         >         >
> >                 >
> >
> org.apache.http.impl.nio.DefaultNHttpServerConnection.submitResponse(DefaultNHttpServerCo
> >                 >         >         > nnection.java:201)
> >                 >         >         >         at
> >                 >         >         >
> >                 >
> >
> org.apache.synapse.transport.nhttp.LoggingNHttpServerConnection.submitResponse(LoggingNHt
> >                 >         >         > tpServerConnection.java:54)
> >                 >         >         >         at
> >                 >         >         >
> >                 >
> >
> org.apache.synapse.transport.nhttp.ServerHandler.commitResponse (
> ServerHandler.java:221)
> >                 >         >         >         at
> >                 >         >         >
> >                 >
> >
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncResponse(HttpCoreNIOSender.
> >                 >         >         > java:352)
> >                 >         >         >         at
> >                 >         >         >
> >                 >
> >
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke
> >                 >         (HttpCoreNIOSender.java:215)
> >                 >         >         >         at
> >                 >         >         >
> >                 >
> >                 org.apache.axis2.engine.AxisEngine.send(AxisEngine.java
> :396)
> >                 >         >         >         at
> >                 >         >         >
> >                 org.apache.synapse.core.axis2.Axis2Sender.sendBack
> >                 >         (Axis2Sender.java:104)
> >                 >         >         >
> >                 >         >         > Help!!??
> >                 >         >         >
> >                 >         >         > Paul
> >                 >         >         >
> >                 >         >         > --
> >                 >         >         > Paul Fremantle
> >                 >         >         > Co-Founder and VP of Technical
> >                 Sales, WSO2
> >                 >         >         > OASIS WS-RX TC Co-chair
> >                 >         >         >
> >                 >         >         > blog: http://pzf.fremantle.org
> >                 >         >         > paul@wso2.com
> >                 >         >         >
> >                 >         >         > "Oxygenating the Web Service
> >                 Platform",
> >                 >         www.wso2.com
> >                 >         >
> >                 >         >
> >                 >         >
> >                 >         > --
> >                 >         > Paul Fremantle
> >                 >         > Co-Founder and VP of Technical Sales, WSO2
> >                 >         > OASIS WS-RX TC Co-chair
> >                 >         >
> >                 >         > blog: http://pzf.fremantle.org
> >                 >         > paul@wso2.com
> >                 >         >
> >                 >         > "Oxygenating the Web Service Platform",
> >                 www.wso2.com
> >                 >
> >                 >
> >                 >
> >
> ---------------------------------------------------------------------
> >                 >         To unsubscribe, e-mail:
> >                 synapse-dev-unsubscribe@ws.apache.org
> >                 >         For additional commands, e-mail:
> >                 >         synapse-dev-help@ws.apache.org
> >                 >
> >                 >
> >                 >
> >                 >
> >                 > --
> >                 > Paul Fremantle
> >                 > Co-Founder and VP of Technical Sales, WSO2
> >                 > OASIS WS-RX TC Co-chair
> >                 >
> >                 > blog: http://pzf.fremantle.org
> >                 > paul@wso2.com
> >                 >
> >                 > "Oxygenating the Web Service Platform", www.wso2.com
> >
> >
> >
> ---------------------------------------------------------------------
> >                 To unsubscribe, e-mail:
> >                 synapse-dev-unsubscribe@ws.apache.org
> >                 For additional commands, e-mail:
> >                 synapse-dev-help@ws.apache.org
> >
> >
> >
> >
> >
> >         --
> >
> >         Paul Fremantle
> >         Co-Founder and VP of Technical Sales, WSO2
> >         OASIS WS-RX TC Co-chair
> >
> >         blog: http://pzf.fremantle.org
> >         paul@wso2.com
> >
> >         "Oxygenating the Web Service Platform", www.wso2.com
> >
> >
> >
> > --
> > Paul Fremantle
> > Co-Founder and VP of Technical Sales, WSO2
> > OASIS WS-RX TC Co-chair
> >
> > blog: http://pzf.fremantle.org
> > paul@wso2.com
> >
> > "Oxygenating the Web Service Platform", www.wso2.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>


-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

Re: problem with using NIO HTTP and HTTP GET

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Wed, 2007-10-17 at 17:27 +0100, Paul Fremantle wrote:
> Oleg
> 
> I have a scenario where if I call via SOAP POST it works fine. When I
> call by HTTP GET I get this 
> 
> 2007-10-17 17:27:01,718 [10.62.75.83-pzfdell] [HttpServerWorker-1]
> ERROR ServerHandler Unexpected HT
> TP protocol error : Transfer-encoding header already present
> org.apache.http.ProtocolException: Transfer-encoding header already
> present
>         at
> org.apache.http.protocol.ResponseContent.process(ResponseContent.java :67)
>         at
> org.apache.http.protocol.BasicHttpProcessor.process(BasicHttpProcessor.java:304)
>         at
> org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(ServerHandler.java:220)
>         at
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncResponse
> (HttpCoreNIOSender.
> java:350)
>         at
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreNIOSender.java:215)
>         at
> org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
>         at
> org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:104)
>         at
> org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:1
> 96)
> 
> So, I don't think its just the Fault case :( 
> 
> Paul
> 

Hi Paul

That does not look good. 

I'll _try_ to come up with a fix for the bug, but it'll require some
poking around with the Synapse and Axis2 code.

Oleg

> On 10/17/07, Paul Fremantle <pz...@gmail.com> wrote:
>         If I can get the success case working I'll be happy for now.
>         Its just I thought I had that case and that was failing too :(
>         
>         Let me dig around a bit. However, I think we need to get this
>         fixed and solid before 1.1 . I think there's also a problem
>         with the logic, which is that the assumption is that if there
>         are no parameters then I don't want to invoke the service - I
>         just want to see the service HTML. However, I don't agree with
>         that - I think there are lots of cases where I want no
>         parameters to equate to an empty body. It may be that the same
>         problem exists in the standard Axis2 HTTP tran as well. 
>         
>         Paul
>         
>         
>         On 10/17/07, Oleg Kalnichevski <ol...@apache.org> wrote:
>                 On Wed, 2007-10-17 at 16:01 +0100, Paul Fremantle
>                 wrote:
>                 > Oleg
>                 >
>                 > Do you think the problem will still happen on the
>                 non-fault case.
>                 >
>                 > Paul
>                 >
>                 
>                 No, I do not think so. Only fault responses appear
>                 affected. I can try 
>                 to come up with a fix for the bug if the issue is
>                 pressing.
>                 
>                 Cheers
>                 
>                 Oleg
>                 
>                 
>                 > On 10/17/07, Oleg Kalnichevski <ol...@apache.org>
>                 wrote:
>                 >         On Tue, 2007-10-16 at 19:36 +0100, Paul
>                 Fremantle wrote: 
>                 >         > Using the QA build that was posted a
>                 couple of days ago, I
>                 >         deployed
>                 >         > sample 100 and typed
>                 >         >
>                 >
>                 http://localhost:8080/soap/StockQuoteProxy/getQuote?symbol=IBM
>                 >         into my
>                 >         > browser.
>                 >         >
>                 >
>                 >         Asankha, Paul
>                 >
>                 >         This is what I think is the cause of the
>                 problem: 
>                 >
>                 >         The ServerWorker class uses the following
>                 code to process HTTP
>                 >         GET
>                 >         requests
>                 >
>                 >         ==================
>                 >         try {
>                 >           serverHandler.commitResponse (conn,
>                 response);
>                 >           HTTPTransportUtils.processHTTPGetRequest(
>                 >             msgContext, os,
>                 >             (request.getFirstHeader(SOAPACTION) !=
>                 null ?
>                 >             request.getFirstHeader
>                 (SOAPACTION).getValue() : null),
>                 >             request.getRequestLine().getUri(),
>                 >             cfgCtx,
>                 >             parameters);
>                 >         } catch (AxisFault axisFault) {
>                 >           handleException("Error processing GET
>                 request for: " + 
>                 >           request.getRequestLine().getUri(),
>                 axisFault);
>                 >         }
>                 >         ==================
>                 >
>                 >         (1) ServerWorker submits 200 response head
>                 prior to calling
>                 >         HTTPTransportUtils.processHTTPGetRequest 
>                 >         (2) AxisFault gets thrown somewhere inside
>                 >         #processHTTPGetRequest
>                 >         (3) The #handleException method is called to
>                 handle the fault
>                 >         (4) At some point
>                 AxisEngine#sendFault(faultContext) gets 
>                 >         invoked
>                 >         (5) AxisEngine attempts to submit an 500
>                 response head
>                 >         (6) Things get nasty
>                 >
>                 >         I do not know Axis2 well enough to be able
>                 to fix the problem
>                 >         myself
>                 >         easily, but I could dig in deeper into the
>                 Axis2 code if need
>                 >         be.
>                 >
>                 >         Apparently the bit of code above needs some
>                 work.
>                 >
>                 >         The NIO HTTP transport in Axis2 proper is
>                 very likely to be 
>                 >         affected as
>                 >         well.
>                 >
>                 >         Cheers
>                 >
>                 >         Oleg
>                 >
>                 >
>                 >         > 2007-10-16 19:33:59,609 [10.0.0.3-pzfdell]
>                 >         [HttpClientWorker-1] ERROR 
>                 >         > ServerHand
>                 >         > ler Unexpected HTTP protocol error :
>                 Transfer-encoding
>                 >         header already
>                 >         > present
>                 >         > org.apache.http.ProtocolException :
>                 Transfer-encoding header
>                 >         already
>                 >         > present
>                 >         >         at
>                 >         >
>                 >
>                 org.apache.http.protocol.ResponseContent.process(ResponseContent.java
>                 >         > :67)
>                 >         >         at
>                 >         >
>                 >
>                 org.apache.http.protocol.BasicHttpProcessor.process(BasicHttpProcesso
>                 >         > r.java:304)
>                 >         >         at 
>                 >         >
>                 >
>                 org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(Serve
>                 >         > rHandler.java:220)
>                 >         >         at
>                 >         >
>                 >
>                 org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons 
>                 >         > e(HttpCoreNIOSender.java :350)
>                 >         >         at
>                 >         >
>                 >
>                 org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreN
>                 >         > IOSender.java :215)
>                 >         >         at
>                 >         >
>                 org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
>                 >         >         at
>                 >
>                 org.apache.synapse.core.axis2.Axis2Sender.sendBack
>                 >         > (Axis2Sender.java:1
>                 >         > 04)
>                 >         >
>                 >         >
>                 >         > On 10/16/07, Asankha C. Perera
>                 <as...@wso2.com> wrote: 
>                 >         >         Paul
>                 >         >
>                 >         >         Can you re-create this with the
>                 sample #100 etc?
>                 >         Please send
>                 >         >         me details to reproduce.. AFAIK we
>                 do not have a 
>                 >         test case for
>                 >         >         GET access... I will try this out
>                 and see what may
>                 >         be wrong..
>                 >         >         I believe you are not doing a load
>                 test
>                 >         > 
>                 >         >         asankha
>                 >         >
>                 >         >
>                 >         >         Paul Fremantle wrote:
>                 >         >         > I'm trying to use GET on a proxy
>                 service hosted in
>                 >         Synapse.
>                 >         >         > I'm getting this error:
>                 >         >         >
>                 >         >         > 2007-10-16 15:53:12,421
>                 [10.0.0.3-pzfdell] [I/O
>                 >         dispatcher 
>                 >         >         > 7]  INFO PipeImpl Usi
>                 >         >         > ng simulated buffered Pipes for
>                 event-driven to
>                 >         stream IO
>                 >         >         > bridging
>                 >         >         > 2007-10-16 15:53:12,906
>                 [ 10.0.0.3-pzfdell]
>                 >         >         > [HttpServerWorker-1] ERROR
>                 ServerHand
>                 >         >         > ler Unexpected HTTP protocol
>                 error :
>                 >         Transfer-encoding
>                 >         >         > header already present 
>                 >         >         >
>                 org.apache.http.ProtocolException:
>                 >         Transfer-encoding header
>                 >         >         > already present
>                 >         >         >         at
>                 >         >         > 
>                 >
>                 org.apache.http.protocol.ResponseContent.process( ResponseContent.java
>                 >         >         > :67)
>                 >         >         >         at
>                 >         >         >
>                 >
>                 org.apache.http.protocol.BasicHttpProcessor.process(BasicHttpProcesso
>                 >         >         > r.java:304)
>                 >         >         >         at
>                 >         >         >
>                 >
>                 org.apache.synapse.transport.nhttp.ServerHandler.commitResponse (Serve
>                 >         >         > rHandler.java:220)
>                 >         >         >         at
>                 >         >         >
>                 >
>                 org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons 
>                 >         >         > e(HttpCoreNIOSender.java:352)
>                 >         >         >         at
>                 >         >         >
>                 >
>                 org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreN 
>                 >         >         > IOSender.java:215)
>                 >         >         >         at
>                 >         >         >
>                 >
>                 org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
>                 >         >         >         at 
>                 >         >         >
>                 >
>                 org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:1
>                 >         >         > 04)
>                 >         >         >         at
>                 >         >         > 
>                 >
>                 org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send
>                 >         >         > (Axis2Synap
>                 >         >         > seEnvironment.java:170)
>                 >         >         >
>                 >         >         > I managed to get past this one
>                 by commenting out: 
>                 >         >         >             if
>                 >         >         >
>                 (httpVersion.greaterEquals(HttpVersion.HTTP_1_1))
>                 >         {
>                 >         >
>                 >                 //entity.setChunked(true); 
>                 >         >         >             }
>                 >         >         > line 127 ServerHandler.java
>                 >         >         >
>                 >         >         > then I get this one:
>                 >         >         > 
>                 >         >         > 2007-10-16 16:01:45,125
>                 [10.0.0.3-pzfdell]
>                 >         >         > [HttpServerWorker-1] ERROR
>                 ServerHandler
>                 >         Unexpected HTTP
>                 >         >         > protocol error : Response
>                 already submitted 
>                 >         >         > org.apache.http.HttpException :
>                 Response already
>                 >         submitted
>                 >         >         >         at
>                 >         >         >
>                 >
>                 org.apache.http.impl.nio.DefaultNHttpServerConnection.submitResponse (DefaultNHttpServerCo
>                 >         >         > nnection.java:201)
>                 >         >         >         at
>                 >         >         >
>                 >
>                 org.apache.synapse.transport.nhttp.LoggingNHttpServerConnection.submitResponse (LoggingNHt
>                 >         >         > tpServerConnection.java:54)
>                 >         >         >         at
>                 >         >         >
>                 >
>                 org.apache.synapse.transport.nhttp.ServerHandler.commitResponse (ServerHandler.java:221)
>                 >         >         >         at
>                 >         >         >
>                 >
>                 org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncResponse (HttpCoreNIOSender.
>                 >         >         > java:352) 
>                 >         >         >         at
>                 >         >         >
>                 >
>                 org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke
>                 >         (HttpCoreNIOSender.java:215)
>                 >         >         >         at 
>                 >         >         >
>                 >
>                 org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
>                 >         >         >         at
>                 >         >         >
>                 org.apache.synapse.core.axis2.Axis2Sender.sendBack 
>                 >         (Axis2Sender.java:104)
>                 >         >         >
>                 >         >         > Help!!??
>                 >         >         >
>                 >         >         > Paul
>                 >         >         > 
>                 >         >         > --
>                 >         >         > Paul Fremantle
>                 >         >         > Co-Founder and VP of Technical
>                 Sales, WSO2
>                 >         >         > OASIS WS-RX TC Co-chair 
>                 >         >         >
>                 >         >         > blog: http://pzf.fremantle.org
>                 >         >         > paul@wso2.com 
>                 >         >         >
>                 >         >         > "Oxygenating the Web Service
>                 Platform",
>                 >         www.wso2.com
>                 >         >
>                 >         > 
>                 >         >
>                 >         > --
>                 >         > Paul Fremantle
>                 >         > Co-Founder and VP of Technical Sales, WSO2
>                 >         > OASIS WS-RX TC Co-chair
>                 >         >
>                 >         > blog: http://pzf.fremantle.org
>                 >         > paul@wso2.com
>                 >         >
>                 >         > "Oxygenating the Web Service Platform",
>                 www.wso2.com
>                 >
>                 >
>                 >
>                 ---------------------------------------------------------------------
>                 >         To unsubscribe, e-mail:
>                 synapse-dev-unsubscribe@ws.apache.org
>                 >         For additional commands, e-mail:
>                 >         synapse-dev-help@ws.apache.org
>                 >
>                 >
>                 >
>                 > 
>                 > --
>                 > Paul Fremantle
>                 > Co-Founder and VP of Technical Sales, WSO2
>                 > OASIS WS-RX TC Co-chair
>                 >
>                 > blog: http://pzf.fremantle.org
>                 > paul@wso2.com
>                 >
>                 > "Oxygenating the Web Service Platform", www.wso2.com
>                 
>                 
>                 --------------------------------------------------------------------- 
>                 To unsubscribe, e-mail:
>                 synapse-dev-unsubscribe@ws.apache.org
>                 For additional commands, e-mail:
>                 synapse-dev-help@ws.apache.org
>                 
>         
>         
>         
>         
>         -- 
>         
>         Paul Fremantle
>         Co-Founder and VP of Technical Sales, WSO2
>         OASIS WS-RX TC Co-chair
>         
>         blog: http://pzf.fremantle.org
>         paul@wso2.com
>         
>         "Oxygenating the Web Service Platform", www.wso2.com
> 
> 
> 
> -- 
> Paul Fremantle
> Co-Founder and VP of Technical Sales, WSO2
> OASIS WS-RX TC Co-chair
> 
> blog: http://pzf.fremantle.org
> paul@wso2.com
> 
> "Oxygenating the Web Service Platform", www.wso2.com


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


Re: problem with using NIO HTTP and HTTP GET

Posted by Paul Fremantle <pz...@gmail.com>.
Oleg

I have a scenario where if I call via SOAP POST it works fine. When I call
by HTTP GET I get this

2007-10-17 17:27:01,718 [10.62.75.83-pzfdell] [HttpServerWorker-1] ERROR
ServerHandler Unexpected HT
TP protocol error : Transfer-encoding header already present
org.apache.http.ProtocolException: Transfer-encoding header already present
        at org.apache.http.protocol.ResponseContent.process(
ResponseContent.java:67)
        at org.apache.http.protocol.BasicHttpProcessor.process(
BasicHttpProcessor.java:304)
        at org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(
ServerHandler.java:220)
        at
org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncResponse
(HttpCoreNIOSender.
java:350)
        at org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(
HttpCoreNIOSender.java:215)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
        at org.apache.synapse.core.axis2.Axis2Sender.sendBack(
Axis2Sender.java:104)
        at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(
Axis2SynapseEnvironment.java:1
96)

So, I don't think its just the Fault case :(

Paul

On 10/17/07, Paul Fremantle <pz...@gmail.com> wrote:
>
> If I can get the success case working I'll be happy for now. Its just I
> thought I had that case and that was failing too :(
>
> Let me dig around a bit. However, I think we need to get this fixed and
> solid before 1.1 . I think there's also a problem with the logic, which is
> that the assumption is that if there are no parameters then I don't want to
> invoke the service - I just want to see the service HTML. However, I don't
> agree with that - I think there are lots of cases where I want no parameters
> to equate to an empty body. It may be that the same problem exists in the
> standard Axis2 HTTP tran as well.
>
> Paul
>
> On 10/17/07, Oleg Kalnichevski <ol...@apache.org> wrote:
> >
> > On Wed, 2007-10-17 at 16:01 +0100, Paul Fremantle wrote:
> > > Oleg
> > >
> > > Do you think the problem will still happen on the non-fault case.
> > >
> > > Paul
> > >
> >
> > No, I do not think so. Only fault responses appear affected. I can try
> > to come up with a fix for the bug if the issue is pressing.
> >
> > Cheers
> >
> > Oleg
> >
> >
> > > On 10/17/07, Oleg Kalnichevski <ol...@apache.org> wrote:
> > >         On Tue, 2007-10-16 at 19:36 +0100, Paul Fremantle wrote:
> > >         > Using the QA build that was posted a couple of days ago, I
> > >         deployed
> > >         > sample 100 and typed
> > >         >
> > >         http://localhost:8080/soap/StockQuoteProxy/getQuote?symbol=IBM
> > >         into my
> > >         > browser.
> > >         >
> > >
> > >         Asankha, Paul
> > >
> > >         This is what I think is the cause of the problem:
> > >
> > >         The ServerWorker class uses the following code to process HTTP
> > >         GET
> > >         requests
> > >
> > >         ==================
> > >         try {
> > >           serverHandler.commitResponse (conn, response);
> > >           HTTPTransportUtils.processHTTPGetRequest(
> > >             msgContext, os,
> > >             (request.getFirstHeader(SOAPACTION) != null ?
> > >             request.getFirstHeader (SOAPACTION).getValue() : null),
> > >             request.getRequestLine().getUri(),
> > >             cfgCtx,
> > >             parameters);
> > >         } catch (AxisFault axisFault) {
> > >           handleException("Error processing GET request for: " +
> > >           request.getRequestLine().getUri(), axisFault);
> > >         }
> > >         ==================
> > >
> > >         (1) ServerWorker submits 200 response head prior to calling
> > >         HTTPTransportUtils.processHTTPGetRequest
> > >         (2) AxisFault gets thrown somewhere inside
> > >         #processHTTPGetRequest
> > >         (3) The #handleException method is called to handle the fault
> > >         (4) At some point AxisEngine#sendFault(faultContext) gets
> > >         invoked
> > >         (5) AxisEngine attempts to submit an 500 response head
> > >         (6) Things get nasty
> > >
> > >         I do not know Axis2 well enough to be able to fix the problem
> > >         myself
> > >         easily, but I could dig in deeper into the Axis2 code if need
> > >         be.
> > >
> > >         Apparently the bit of code above needs some work.
> > >
> > >         The NIO HTTP transport in Axis2 proper is very likely to be
> > >         affected as
> > >         well.
> > >
> > >         Cheers
> > >
> > >         Oleg
> > >
> > >
> > >         > 2007-10-16 19:33:59,609 [10.0.0.3-pzfdell]
> > >         [HttpClientWorker-1] ERROR
> > >         > ServerHand
> > >         > ler Unexpected HTTP protocol error : Transfer-encoding
> > >         header already
> > >         > present
> > >         > org.apache.http.ProtocolException : Transfer-encoding header
> > >         already
> > >         > present
> > >         >         at
> > >         >
> > >         org.apache.http.protocol.ResponseContent.process(
> > ResponseContent.java
> > >         > :67)
> > >         >         at
> > >         >
> > >         org.apache.http.protocol.BasicHttpProcessor.process
> > (BasicHttpProcesso
> > >         > r.java:304)
> > >         >         at
> > >         >
> > >
> > org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(Serve
> > >         > rHandler.java:220)
> > >         >         at
> > >         >
> > >
> > org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons
> > >         > e(HttpCoreNIOSender.java :350)
> > >         >         at
> > >         >
> > >         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke
> > (HttpCoreN
> > >         > IOSender.java :215)
> > >         >         at
> > >         > org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
> > >         >         at
> > >         org.apache.synapse.core.axis2.Axis2Sender.sendBack
> > >         > (Axis2Sender.java:1
> > >         > 04)
> > >         >
> > >         >
> > >         > On 10/16/07, Asankha C. Perera <as...@wso2.com> wrote:
> > >         >         Paul
> > >         >
> > >         >         Can you re-create this with the sample #100 etc?
> > >         Please send
> > >         >         me details to reproduce.. AFAIK we do not have a
> > >         test case for
> > >         >         GET access... I will try this out and see what may
> > >         be wrong..
> > >         >         I believe you are not doing a load test
> > >         >
> > >         >         asankha
> > >         >
> > >         >
> > >         >         Paul Fremantle wrote:
> > >         >         > I'm trying to use GET on a proxy service hosted in
> > >         Synapse.
> > >         >         > I'm getting this error:
> > >         >         >
> > >         >         > 2007-10-16 15:53:12,421 [10.0.0.3-pzfdell] [I/O
> > >         dispatcher
> > >         >         > 7]  INFO PipeImpl Usi
> > >         >         > ng simulated buffered Pipes for event-driven to
> > >         stream IO
> > >         >         > bridging
> > >         >         > 2007-10-16 15:53:12,906 [ 10.0.0.3-pzfdell]
> > >         >         > [HttpServerWorker-1] ERROR ServerHand
> > >         >         > ler Unexpected HTTP protocol error :
> > >         Transfer-encoding
> > >         >         > header already present
> > >         >         > org.apache.http.ProtocolException:
> > >         Transfer-encoding header
> > >         >         > already present
> > >         >         >         at
> > >         >         >
> > >         org.apache.http.protocol.ResponseContent.process(
> > ResponseContent.java
> > >         >         > :67)
> > >         >         >         at
> > >         >         >
> > >         org.apache.http.protocol.BasicHttpProcessor.process
> > (BasicHttpProcesso
> > >         >         > r.java:304)
> > >         >         >         at
> > >         >         >
> > >
> > org.apache.synapse.transport.nhttp.ServerHandler.commitResponse (Serve
> > >         >         > rHandler.java:220)
> > >         >         >         at
> > >         >         >
> > >
> > org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons
> > >         >         > e(HttpCoreNIOSender.java:352)
> > >         >         >         at
> > >         >         >
> > >         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreN
> >
> > >         >         > IOSender.java:215)
> > >         >         >         at
> > >         >         >
> > >         org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
> > >         >         >         at
> > >         >         >
> > >         org.apache.synapse.core.axis2.Axis2Sender.sendBack(
> > Axis2Sender.java:1
> > >         >         > 04)
> > >         >         >         at
> > >         >         >
> > >         org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send
> > >         >         > (Axis2Synap
> > >         >         > seEnvironment.java:170)
> > >         >         >
> > >         >         > I managed to get past this one by commenting out:
> > >         >         >             if
> > >         >         > (httpVersion.greaterEquals(HttpVersion.HTTP_1_1))
> > >         {
> > >         >         >                 //entity.setChunked(true);
> > >         >         >             }
> > >         >         > line 127 ServerHandler.java
> > >         >         >
> > >         >         > then I get this one:
> > >         >         >
> > >         >         > 2007-10-16 16:01:45,125 [10.0.0.3-pzfdell]
> > >         >         > [HttpServerWorker-1] ERROR ServerHandler
> > >         Unexpected HTTP
> > >         >         > protocol error : Response already submitted
> > >         >         > org.apache.http.HttpException : Response already
> > >         submitted
> > >         >         >         at
> > >         >         >
> > >
> > org.apache.http.impl.nio.DefaultNHttpServerConnection.submitResponse(DefaultNHttpServerCo
> > >         >         > nnection.java:201)
> > >         >         >         at
> > >         >         >
> > >
> > org.apache.synapse.transport.nhttp.LoggingNHttpServerConnection.submitResponse(LoggingNHt
> > >         >         > tpServerConnection.java:54)
> > >         >         >         at
> > >         >         >
> > >
> > org.apache.synapse.transport.nhttp.ServerHandler.commitResponse (
> > ServerHandler.java:221)
> > >         >         >         at
> > >         >         >
> > >
> > org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncResponse(HttpCoreNIOSender.
> > >         >         > java:352)
> > >         >         >         at
> > >         >         >
> > >         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke
> > >         (HttpCoreNIOSender.java:215)
> > >         >         >         at
> > >         >         >
> > >         org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
> > >         >         >         at
> > >         >         > org.apache.synapse.core.axis2.Axis2Sender.sendBack
> > >         (Axis2Sender.java:104)
> > >         >         >
> > >         >         > Help!!??
> > >         >         >
> > >         >         > Paul
> > >         >         >
> > >         >         > --
> > >         >         > Paul Fremantle
> > >         >         > Co-Founder and VP of Technical Sales, WSO2
> > >         >         > OASIS WS-RX TC Co-chair
> > >         >         >
> > >         >         > blog: http://pzf.fremantle.org
> > >         >         > paul@wso2.com
> > >         >         >
> > >         >         > "Oxygenating the Web Service Platform",
> > >         www.wso2.com
> > >         >
> > >         >
> > >         >
> > >         > --
> > >         > Paul Fremantle
> > >         > Co-Founder and VP of Technical Sales, WSO2
> > >         > OASIS WS-RX TC Co-chair
> > >         >
> > >         > blog: http://pzf.fremantle.org
> > >         > paul@wso2.com
> > >         >
> > >         > "Oxygenating the Web Service Platform", www.wso2.com
> > >
> > >
> > >
> > ---------------------------------------------------------------------
> > >         To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> > >         For additional commands, e-mail:
> > >         synapse-dev-help@ws.apache.org
> > >
> > >
> > >
> > >
> > > --
> > > Paul Fremantle
> > > Co-Founder and VP of Technical Sales, WSO2
> > > OASIS WS-RX TC Co-chair
> > >
> > > blog: http://pzf.fremantle.org
> > > paul@wso2.com
> > >
> > > "Oxygenating the Web Service Platform", www.wso2.com
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: synapse-dev-help@ws.apache.org
> >
> >
>
>
> --
> Paul Fremantle
> Co-Founder and VP of Technical Sales, WSO2
> OASIS WS-RX TC Co-chair
>
> blog: http://pzf.fremantle.org
> paul@wso2.com
>
> "Oxygenating the Web Service Platform", www.wso2.com
>



-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

Re: problem with using NIO HTTP and HTTP GET

Posted by Paul Fremantle <pz...@gmail.com>.
If I can get the success case working I'll be happy for now. Its just I
thought I had that case and that was failing too :(

Let me dig around a bit. However, I think we need to get this fixed and
solid before 1.1. I think there's also a problem with the logic, which is
that the assumption is that if there are no parameters then I don't want to
invoke the service - I just want to see the service HTML. However, I don't
agree with that - I think there are lots of cases where I want no parameters
to equate to an empty body. It may be that the same problem exists in the
standard Axis2 HTTP tran as well.

Paul

On 10/17/07, Oleg Kalnichevski <ol...@apache.org> wrote:
>
> On Wed, 2007-10-17 at 16:01 +0100, Paul Fremantle wrote:
> > Oleg
> >
> > Do you think the problem will still happen on the non-fault case.
> >
> > Paul
> >
>
> No, I do not think so. Only fault responses appear affected. I can try
> to come up with a fix for the bug if the issue is pressing.
>
> Cheers
>
> Oleg
>
>
> > On 10/17/07, Oleg Kalnichevski <ol...@apache.org> wrote:
> >         On Tue, 2007-10-16 at 19:36 +0100, Paul Fremantle wrote:
> >         > Using the QA build that was posted a couple of days ago, I
> >         deployed
> >         > sample 100 and typed
> >         >
> >         http://localhost:8080/soap/StockQuoteProxy/getQuote?symbol=IBM
> >         into my
> >         > browser.
> >         >
> >
> >         Asankha, Paul
> >
> >         This is what I think is the cause of the problem:
> >
> >         The ServerWorker class uses the following code to process HTTP
> >         GET
> >         requests
> >
> >         ==================
> >         try {
> >           serverHandler.commitResponse(conn, response);
> >           HTTPTransportUtils.processHTTPGetRequest(
> >             msgContext, os,
> >             (request.getFirstHeader(SOAPACTION) != null ?
> >             request.getFirstHeader(SOAPACTION).getValue() : null),
> >             request.getRequestLine().getUri(),
> >             cfgCtx,
> >             parameters);
> >         } catch (AxisFault axisFault) {
> >           handleException("Error processing GET request for: " +
> >           request.getRequestLine().getUri(), axisFault);
> >         }
> >         ==================
> >
> >         (1) ServerWorker submits 200 response head prior to calling
> >         HTTPTransportUtils.processHTTPGetRequest
> >         (2) AxisFault gets thrown somewhere inside
> >         #processHTTPGetRequest
> >         (3) The #handleException method is called to handle the fault
> >         (4) At some point AxisEngine#sendFault(faultContext) gets
> >         invoked
> >         (5) AxisEngine attempts to submit an 500 response head
> >         (6) Things get nasty
> >
> >         I do not know Axis2 well enough to be able to fix the problem
> >         myself
> >         easily, but I could dig in deeper into the Axis2 code if need
> >         be.
> >
> >         Apparently the bit of code above needs some work.
> >
> >         The NIO HTTP transport in Axis2 proper is very likely to be
> >         affected as
> >         well.
> >
> >         Cheers
> >
> >         Oleg
> >
> >
> >         > 2007-10-16 19:33:59,609 [10.0.0.3-pzfdell]
> >         [HttpClientWorker-1] ERROR
> >         > ServerHand
> >         > ler Unexpected HTTP protocol error : Transfer-encoding
> >         header already
> >         > present
> >         > org.apache.http.ProtocolException : Transfer-encoding header
> >         already
> >         > present
> >         >         at
> >         >
> >         org.apache.http.protocol.ResponseContent.process(
> ResponseContent.java
> >         > :67)
> >         >         at
> >         >
> >         org.apache.http.protocol.BasicHttpProcessor.process
> (BasicHttpProcesso
> >         > r.java:304)
> >         >         at
> >         >
> >         org.apache.synapse.transport.nhttp.ServerHandler.commitResponse
> (Serve
> >         > rHandler.java:220)
> >         >         at
> >         >
> >
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons
> >         > e(HttpCoreNIOSender.java :350)
> >         >         at
> >         >
> >         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke
> (HttpCoreN
> >         > IOSender.java:215)
> >         >         at
> >         > org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
> >         >         at
> >         org.apache.synapse.core.axis2.Axis2Sender.sendBack
> >         > (Axis2Sender.java:1
> >         > 04)
> >         >
> >         >
> >         > On 10/16/07, Asankha C. Perera <as...@wso2.com> wrote:
> >         >         Paul
> >         >
> >         >         Can you re-create this with the sample #100 etc?
> >         Please send
> >         >         me details to reproduce.. AFAIK we do not have a
> >         test case for
> >         >         GET access... I will try this out and see what may
> >         be wrong..
> >         >         I believe you are not doing a load test
> >         >
> >         >         asankha
> >         >
> >         >
> >         >         Paul Fremantle wrote:
> >         >         > I'm trying to use GET on a proxy service hosted in
> >         Synapse.
> >         >         > I'm getting this error:
> >         >         >
> >         >         > 2007-10-16 15:53:12,421 [10.0.0.3-pzfdell] [I/O
> >         dispatcher
> >         >         > 7]  INFO PipeImpl Usi
> >         >         > ng simulated buffered Pipes for event-driven to
> >         stream IO
> >         >         > bridging
> >         >         > 2007-10-16 15:53:12,906 [10.0.0.3-pzfdell]
> >         >         > [HttpServerWorker-1] ERROR ServerHand
> >         >         > ler Unexpected HTTP protocol error :
> >         Transfer-encoding
> >         >         > header already present
> >         >         > org.apache.http.ProtocolException:
> >         Transfer-encoding header
> >         >         > already present
> >         >         >         at
> >         >         >
> >         org.apache.http.protocol.ResponseContent.process(
> ResponseContent.java
> >         >         > :67)
> >         >         >         at
> >         >         >
> >         org.apache.http.protocol.BasicHttpProcessor.process
> (BasicHttpProcesso
> >         >         > r.java:304)
> >         >         >         at
> >         >         >
> >         org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(Serve
> >         >         > rHandler.java:220)
> >         >         >         at
> >         >         >
> >
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons
> >         >         > e(HttpCoreNIOSender.java:352)
> >         >         >         at
> >         >         >
> >         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke
> (HttpCoreN
> >         >         > IOSender.java:215)
> >         >         >         at
> >         >         >
> >         org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
> >         >         >         at
> >         >         >
> >         org.apache.synapse.core.axis2.Axis2Sender.sendBack(
> Axis2Sender.java:1
> >         >         > 04)
> >         >         >         at
> >         >         >
> >         org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send
> >         >         > (Axis2Synap
> >         >         > seEnvironment.java:170)
> >         >         >
> >         >         > I managed to get past this one by commenting out:
> >         >         >             if
> >         >         > (httpVersion.greaterEquals(HttpVersion.HTTP_1_1))
> >         {
> >         >         >                 //entity.setChunked(true);
> >         >         >             }
> >         >         > line 127 ServerHandler.java
> >         >         >
> >         >         > then I get this one:
> >         >         >
> >         >         > 2007-10-16 16:01:45,125 [10.0.0.3-pzfdell]
> >         >         > [HttpServerWorker-1] ERROR ServerHandler
> >         Unexpected HTTP
> >         >         > protocol error : Response already submitted
> >         >         > org.apache.http.HttpException : Response already
> >         submitted
> >         >         >         at
> >         >         >
> >
> org.apache.http.impl.nio.DefaultNHttpServerConnection.submitResponse(DefaultNHttpServerCo
> >         >         > nnection.java:201)
> >         >         >         at
> >         >         >
> >
> org.apache.synapse.transport.nhttp.LoggingNHttpServerConnection.submitResponse(LoggingNHt
> >         >         > tpServerConnection.java:54)
> >         >         >         at
> >         >         >
> >         org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(
> ServerHandler.java:221)
> >         >         >         at
> >         >         >
> >
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncResponse(HttpCoreNIOSender.
> >         >         > java:352)
> >         >         >         at
> >         >         >
> >         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke
> >         (HttpCoreNIOSender.java:215)
> >         >         >         at
> >         >         >
> >         org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
> >         >         >         at
> >         >         > org.apache.synapse.core.axis2.Axis2Sender.sendBack
> >         (Axis2Sender.java:104)
> >         >         >
> >         >         > Help!!??
> >         >         >
> >         >         > Paul
> >         >         >
> >         >         > --
> >         >         > Paul Fremantle
> >         >         > Co-Founder and VP of Technical Sales, WSO2
> >         >         > OASIS WS-RX TC Co-chair
> >         >         >
> >         >         > blog: http://pzf.fremantle.org
> >         >         > paul@wso2.com
> >         >         >
> >         >         > "Oxygenating the Web Service Platform",
> >         www.wso2.com
> >         >
> >         >
> >         >
> >         > --
> >         > Paul Fremantle
> >         > Co-Founder and VP of Technical Sales, WSO2
> >         > OASIS WS-RX TC Co-chair
> >         >
> >         > blog: http://pzf.fremantle.org
> >         > paul@wso2.com
> >         >
> >         > "Oxygenating the Web Service Platform", www.wso2.com
> >
> >
> >
> ---------------------------------------------------------------------
> >         To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> >         For additional commands, e-mail:
> >         synapse-dev-help@ws.apache.org
> >
> >
> >
> >
> > --
> > Paul Fremantle
> > Co-Founder and VP of Technical Sales, WSO2
> > OASIS WS-RX TC Co-chair
> >
> > blog: http://pzf.fremantle.org
> > paul@wso2.com
> >
> > "Oxygenating the Web Service Platform", www.wso2.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>


-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

Re: problem with using NIO HTTP and HTTP GET

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Wed, 2007-10-17 at 16:01 +0100, Paul Fremantle wrote:
> Oleg
> 
> Do you think the problem will still happen on the non-fault case.
> 
> Paul
> 

No, I do not think so. Only fault responses appear affected. I can try
to come up with a fix for the bug if the issue is pressing.

Cheers

Oleg


> On 10/17/07, Oleg Kalnichevski <ol...@apache.org> wrote:
>         On Tue, 2007-10-16 at 19:36 +0100, Paul Fremantle wrote: 
>         > Using the QA build that was posted a couple of days ago, I
>         deployed
>         > sample 100 and typed
>         >
>         http://localhost:8080/soap/StockQuoteProxy/getQuote?symbol=IBM
>         into my
>         > browser.
>         >
>         
>         Asankha, Paul
>         
>         This is what I think is the cause of the problem:
>         
>         The ServerWorker class uses the following code to process HTTP
>         GET
>         requests
>         
>         ================== 
>         try {
>           serverHandler.commitResponse(conn, response);
>           HTTPTransportUtils.processHTTPGetRequest(
>             msgContext, os,
>             (request.getFirstHeader(SOAPACTION) != null ?
>             request.getFirstHeader(SOAPACTION).getValue() : null), 
>             request.getRequestLine().getUri(),
>             cfgCtx,
>             parameters);
>         } catch (AxisFault axisFault) {
>           handleException("Error processing GET request for: " +
>           request.getRequestLine().getUri(), axisFault); 
>         }
>         ==================
>         
>         (1) ServerWorker submits 200 response head prior to calling
>         HTTPTransportUtils.processHTTPGetRequest
>         (2) AxisFault gets thrown somewhere inside
>         #processHTTPGetRequest
>         (3) The #handleException method is called to handle the fault 
>         (4) At some point AxisEngine#sendFault(faultContext) gets
>         invoked
>         (5) AxisEngine attempts to submit an 500 response head
>         (6) Things get nasty
>         
>         I do not know Axis2 well enough to be able to fix the problem
>         myself 
>         easily, but I could dig in deeper into the Axis2 code if need
>         be.
>         
>         Apparently the bit of code above needs some work.
>         
>         The NIO HTTP transport in Axis2 proper is very likely to be
>         affected as
>         well.
>         
>         Cheers
>         
>         Oleg
>         
>         
>         > 2007-10-16 19:33:59,609 [10.0.0.3-pzfdell]
>         [HttpClientWorker-1] ERROR
>         > ServerHand
>         > ler Unexpected HTTP protocol error : Transfer-encoding
>         header already
>         > present
>         > org.apache.http.ProtocolException : Transfer-encoding header
>         already
>         > present
>         >         at
>         >
>         org.apache.http.protocol.ResponseContent.process(ResponseContent.java
>         > :67)
>         >         at
>         >
>         org.apache.http.protocol.BasicHttpProcessor.process(BasicHttpProcesso
>         > r.java:304)
>         >         at
>         >
>         org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(Serve
>         > rHandler.java:220)
>         >         at
>         >
>         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons
>         > e(HttpCoreNIOSender.java :350)
>         >         at
>         >
>         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreN 
>         > IOSender.java:215)
>         >         at
>         > org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
>         >         at
>         org.apache.synapse.core.axis2.Axis2Sender.sendBack
>         > (Axis2Sender.java:1
>         > 04) 
>         >
>         >
>         > On 10/16/07, Asankha C. Perera <as...@wso2.com> wrote:
>         >         Paul
>         >
>         >         Can you re-create this with the sample #100 etc?
>         Please send 
>         >         me details to reproduce.. AFAIK we do not have a
>         test case for
>         >         GET access... I will try this out and see what may
>         be wrong..
>         >         I believe you are not doing a load test
>         > 
>         >         asankha
>         >
>         >
>         >         Paul Fremantle wrote:
>         >         > I'm trying to use GET on a proxy service hosted in
>         Synapse.
>         >         > I'm getting this error:
>         >         > 
>         >         > 2007-10-16 15:53:12,421 [10.0.0.3-pzfdell] [I/O
>         dispatcher
>         >         > 7]  INFO PipeImpl Usi
>         >         > ng simulated buffered Pipes for event-driven to
>         stream IO
>         >         > bridging 
>         >         > 2007-10-16 15:53:12,906 [10.0.0.3-pzfdell]
>         >         > [HttpServerWorker-1] ERROR ServerHand
>         >         > ler Unexpected HTTP protocol error :
>         Transfer-encoding
>         >         > header already present 
>         >         > org.apache.http.ProtocolException:
>         Transfer-encoding header
>         >         > already present
>         >         >         at
>         >         >
>         org.apache.http.protocol.ResponseContent.process( ResponseContent.java
>         >         > :67)
>         >         >         at
>         >         >
>         org.apache.http.protocol.BasicHttpProcessor.process(BasicHttpProcesso
>         >         > r.java:304)
>         >         >         at 
>         >         >
>         org.apache.synapse.transport.nhttp.ServerHandler.commitResponse (Serve
>         >         > rHandler.java:220)
>         >         >         at
>         >         >
>         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons 
>         >         > e(HttpCoreNIOSender.java:352)
>         >         >         at
>         >         >
>         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreN
>         >         > IOSender.java:215)
>         >         >         at 
>         >         >
>         org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
>         >         >         at
>         >         >
>         org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:1
>         >         > 04) 
>         >         >         at
>         >         >
>         org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send
>         >         > (Axis2Synap
>         >         > seEnvironment.java:170)
>         >         >
>         >         > I managed to get past this one by commenting out: 
>         >         >             if
>         >         > (httpVersion.greaterEquals(HttpVersion.HTTP_1_1))
>         {
>         >         >                 //entity.setChunked(true);
>         >         >             }
>         >         > line 127 ServerHandler.java
>         >         >
>         >         > then I get this one:
>         >         >
>         >         > 2007-10-16 16:01:45,125 [10.0.0.3-pzfdell]
>         >         > [HttpServerWorker-1] ERROR ServerHandler
>         Unexpected HTTP 
>         >         > protocol error : Response already submitted
>         >         > org.apache.http.HttpException : Response already
>         submitted
>         >         >         at
>         >         >
>         org.apache.http.impl.nio.DefaultNHttpServerConnection.submitResponse (DefaultNHttpServerCo
>         >         > nnection.java:201)
>         >         >         at
>         >         >
>         org.apache.synapse.transport.nhttp.LoggingNHttpServerConnection.submitResponse (LoggingNHt
>         >         > tpServerConnection.java:54)
>         >         >         at
>         >         >
>         org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(ServerHandler.java:221)
>         >         >         at
>         >         >
>         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncResponse (HttpCoreNIOSender.
>         >         > java:352)
>         >         >         at
>         >         >
>         org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke
>         (HttpCoreNIOSender.java:215)
>         >         >         at
>         >         >
>         org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
>         >         >         at
>         >         > org.apache.synapse.core.axis2.Axis2Sender.sendBack
>         (Axis2Sender.java:104)
>         >         >
>         >         > Help!!??
>         >         >
>         >         > Paul
>         >         >
>         >         > --
>         >         > Paul Fremantle
>         >         > Co-Founder and VP of Technical Sales, WSO2 
>         >         > OASIS WS-RX TC Co-chair
>         >         >
>         >         > blog: http://pzf.fremantle.org
>         >         > paul@wso2.com
>         >         >
>         >         > "Oxygenating the Web Service Platform",
>         www.wso2.com
>         >
>         >
>         >
>         > --
>         > Paul Fremantle
>         > Co-Founder and VP of Technical Sales, WSO2 
>         > OASIS WS-RX TC Co-chair
>         >
>         > blog: http://pzf.fremantle.org
>         > paul@wso2.com
>         >
>         > "Oxygenating the Web Service Platform", www.wso2.com
>         
>         
>         ---------------------------------------------------------------------
>         To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
>         For additional commands, e-mail:
>         synapse-dev-help@ws.apache.org
>         
> 
> 
> 
> -- 
> Paul Fremantle
> Co-Founder and VP of Technical Sales, WSO2 
> OASIS WS-RX TC Co-chair
> 
> blog: http://pzf.fremantle.org
> paul@wso2.com
> 
> "Oxygenating the Web Service Platform", www.wso2.com


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


Re: problem with using NIO HTTP and HTTP GET

Posted by Paul Fremantle <pz...@gmail.com>.
Oleg

Do you think the problem will still happen on the non-fault case.

Paul

On 10/17/07, Oleg Kalnichevski <ol...@apache.org> wrote:
>
> On Tue, 2007-10-16 at 19:36 +0100, Paul Fremantle wrote:
> > Using the QA build that was posted a couple of days ago, I deployed
> > sample 100 and typed
> > http://localhost:8080/soap/StockQuoteProxy/getQuote?symbol=IBM into my
> > browser.
> >
>
> Asankha, Paul
>
> This is what I think is the cause of the problem:
>
> The ServerWorker class uses the following code to process HTTP GET
> requests
>
> ==================
> try {
>   serverHandler.commitResponse(conn, response);
>   HTTPTransportUtils.processHTTPGetRequest(
>     msgContext, os,
>     (request.getFirstHeader(SOAPACTION) != null ?
>     request.getFirstHeader(SOAPACTION).getValue() : null),
>     request.getRequestLine().getUri(),
>     cfgCtx,
>     parameters);
> } catch (AxisFault axisFault) {
>   handleException("Error processing GET request for: " +
>   request.getRequestLine().getUri(), axisFault);
> }
> ==================
>
> (1) ServerWorker submits 200 response head prior to calling
> HTTPTransportUtils.processHTTPGetRequest
> (2) AxisFault gets thrown somewhere inside #processHTTPGetRequest
> (3) The #handleException method is called to handle the fault
> (4) At some point AxisEngine#sendFault(faultContext) gets invoked
> (5) AxisEngine attempts to submit an 500 response head
> (6) Things get nasty
>
> I do not know Axis2 well enough to be able to fix the problem myself
> easily, but I could dig in deeper into the Axis2 code if need be.
>
> Apparently the bit of code above needs some work.
>
> The NIO HTTP transport in Axis2 proper is very likely to be affected as
> well.
>
> Cheers
>
> Oleg
>
>
> > 2007-10-16 19:33:59,609 [10.0.0.3-pzfdell] [HttpClientWorker-1] ERROR
> > ServerHand
> > ler Unexpected HTTP protocol error : Transfer-encoding header already
> > present
> > org.apache.http.ProtocolException : Transfer-encoding header already
> > present
> >         at
> > org.apache.http.protocol.ResponseContent.process(ResponseContent.java
> > :67)
> >         at
> > org.apache.http.protocol.BasicHttpProcessor.process(BasicHttpProcesso
> > r.java:304)
> >         at
> > org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(Serve
> > rHandler.java:220)
> >         at
> > org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons
> > e(HttpCoreNIOSender.java :350)
> >         at
> > org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreN
> > IOSender.java:215)
> >         at
> > org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
> >         at org.apache.synapse.core.axis2.Axis2Sender.sendBack
> > (Axis2Sender.java:1
> > 04)
> >
> >
> > On 10/16/07, Asankha C. Perera <as...@wso2.com> wrote:
> >         Paul
> >
> >         Can you re-create this with the sample #100 etc? Please send
> >         me details to reproduce.. AFAIK we do not have a test case for
> >         GET access... I will try this out and see what may be wrong..
> >         I believe you are not doing a load test
> >
> >         asankha
> >
> >
> >         Paul Fremantle wrote:
> >         > I'm trying to use GET on a proxy service hosted in Synapse.
> >         > I'm getting this error:
> >         >
> >         > 2007-10-16 15:53:12,421 [10.0.0.3-pzfdell] [I/O dispatcher
> >         > 7]  INFO PipeImpl Usi
> >         > ng simulated buffered Pipes for event-driven to stream IO
> >         > bridging
> >         > 2007-10-16 15:53:12,906 [10.0.0.3-pzfdell]
> >         > [HttpServerWorker-1] ERROR ServerHand
> >         > ler Unexpected HTTP protocol error : Transfer-encoding
> >         > header already present
> >         > org.apache.http.ProtocolException: Transfer-encoding header
> >         > already present
> >         >         at
> >         > org.apache.http.protocol.ResponseContent.process(
> ResponseContent.java
> >         > :67)
> >         >         at
> >         > org.apache.http.protocol.BasicHttpProcessor.process
> (BasicHttpProcesso
> >         > r.java:304)
> >         >         at
> >         >
> org.apache.synapse.transport.nhttp.ServerHandler.commitResponse (Serve
> >         > rHandler.java:220)
> >         >         at
> >         >
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons
> >         > e(HttpCoreNIOSender.java:352)
> >         >         at
> >         > org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke
> (HttpCoreN
> >         > IOSender.java:215)
> >         >         at
> >         > org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
> >         >         at
> >         > org.apache.synapse.core.axis2.Axis2Sender.sendBack(
> Axis2Sender.java:1
> >         > 04)
> >         >         at
> >         > org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send
> >         > (Axis2Synap
> >         > seEnvironment.java:170)
> >         >
> >         > I managed to get past this one by commenting out:
> >         >             if
> >         > (httpVersion.greaterEquals(HttpVersion.HTTP_1_1)) {
> >         >                 //entity.setChunked(true);
> >         >             }
> >         > line 127 ServerHandler.java
> >         >
> >         > then I get this one:
> >         >
> >         > 2007-10-16 16:01:45,125 [10.0.0.3-pzfdell]
> >         > [HttpServerWorker-1] ERROR ServerHandler Unexpected HTTP
> >         > protocol error : Response already submitted
> >         > org.apache.http.HttpException : Response already submitted
> >         >         at
> >         >
> org.apache.http.impl.nio.DefaultNHttpServerConnection.submitResponse
> (DefaultNHttpServerCo
> >         > nnection.java:201)
> >         >         at
> >         >
> org.apache.synapse.transport.nhttp.LoggingNHttpServerConnection.submitResponse(LoggingNHt
> >         > tpServerConnection.java:54)
> >         >         at
> >         >
> org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(
> ServerHandler.java:221)
> >         >         at
> >         >
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncResponse(HttpCoreNIOSender.
> >         > java:352)
> >         >         at
> >         > org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(
> HttpCoreNIOSender.java:215)
> >         >         at
> >         > org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
> >         >         at
> >         > org.apache.synapse.core.axis2.Axis2Sender.sendBack(
> Axis2Sender.java:104)
> >         >
> >         > Help!!??
> >         >
> >         > Paul
> >         >
> >         > --
> >         > Paul Fremantle
> >         > Co-Founder and VP of Technical Sales, WSO2
> >         > OASIS WS-RX TC Co-chair
> >         >
> >         > blog: http://pzf.fremantle.org
> >         > paul@wso2.com
> >         >
> >         > "Oxygenating the Web Service Platform", www.wso2.com
> >
> >
> >
> > --
> > Paul Fremantle
> > Co-Founder and VP of Technical Sales, WSO2
> > OASIS WS-RX TC Co-chair
> >
> > blog: http://pzf.fremantle.org
> > paul@wso2.com
> >
> > "Oxygenating the Web Service Platform", www.wso2.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>


-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

Re: problem with using NIO HTTP and HTTP GET

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Tue, 2007-10-16 at 19:36 +0100, Paul Fremantle wrote:
> Using the QA build that was posted a couple of days ago, I deployed
> sample 100 and typed
> http://localhost:8080/soap/StockQuoteProxy/getQuote?symbol=IBM into my
> browser. 
> 

Asankha, Paul

This is what I think is the cause of the problem:

The ServerWorker class uses the following code to process HTTP GET
requests

==================
try {
  serverHandler.commitResponse(conn, response);
  HTTPTransportUtils.processHTTPGetRequest(
    msgContext, os,
    (request.getFirstHeader(SOAPACTION) != null ?
    request.getFirstHeader(SOAPACTION).getValue() : null),
    request.getRequestLine().getUri(),
    cfgCtx,
    parameters);
} catch (AxisFault axisFault) {
  handleException("Error processing GET request for: " +
  request.getRequestLine().getUri(), axisFault);
}
==================

(1) ServerWorker submits 200 response head prior to calling
HTTPTransportUtils.processHTTPGetRequest
(2) AxisFault gets thrown somewhere inside #processHTTPGetRequest 
(3) The #handleException method is called to handle the fault
(4) At some point AxisEngine#sendFault(faultContext) gets invoked
(5) AxisEngine attempts to submit an 500 response head
(6) Things get nasty 

I do not know Axis2 well enough to be able to fix the problem myself
easily, but I could dig in deeper into the Axis2 code if need be. 

Apparently the bit of code above needs some work.

The NIO HTTP transport in Axis2 proper is very likely to be affected as
well. 

Cheers

Oleg


> 2007-10-16 19:33:59,609 [10.0.0.3-pzfdell] [HttpClientWorker-1] ERROR
> ServerHand
> ler Unexpected HTTP protocol error : Transfer-encoding header already
> present
> org.apache.http.ProtocolException : Transfer-encoding header already
> present
>         at
> org.apache.http.protocol.ResponseContent.process(ResponseContent.java
> :67)
>         at
> org.apache.http.protocol.BasicHttpProcessor.process(BasicHttpProcesso
> r.java:304)
>         at
> org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(Serve
> rHandler.java:220)
>         at
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons
> e(HttpCoreNIOSender.java :350)
>         at
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreN
> IOSender.java:215)
>         at
> org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
>         at org.apache.synapse.core.axis2.Axis2Sender.sendBack
> (Axis2Sender.java:1
> 04)
> 
> 
> On 10/16/07, Asankha C. Perera <as...@wso2.com> wrote:
>         Paul
>         
>         Can you re-create this with the sample #100 etc? Please send
>         me details to reproduce.. AFAIK we do not have a test case for
>         GET access... I will try this out and see what may be wrong..
>         I believe you are not doing a load test
>         
>         asankha
>         
>         
>         Paul Fremantle wrote: 
>         > I'm trying to use GET on a proxy service hosted in Synapse. 
>         > I'm getting this error:
>         > 
>         > 2007-10-16 15:53:12,421 [10.0.0.3-pzfdell] [I/O dispatcher
>         > 7]  INFO PipeImpl Usi
>         > ng simulated buffered Pipes for event-driven to stream IO
>         > bridging 
>         > 2007-10-16 15:53:12,906 [10.0.0.3-pzfdell]
>         > [HttpServerWorker-1] ERROR ServerHand
>         > ler Unexpected HTTP protocol error : Transfer-encoding
>         > header already present
>         > org.apache.http.ProtocolException: Transfer-encoding header
>         > already present 
>         >         at
>         > org.apache.http.protocol.ResponseContent.process(ResponseContent.java
>         > :67)
>         >         at
>         > org.apache.http.protocol.BasicHttpProcessor.process(BasicHttpProcesso
>         > r.java:304)
>         >         at
>         > org.apache.synapse.transport.nhttp.ServerHandler.commitResponse (Serve
>         > rHandler.java:220)
>         >         at
>         > org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons
>         > e(HttpCoreNIOSender.java:352)
>         >         at
>         > org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreN 
>         > IOSender.java:215)
>         >         at
>         > org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
>         >         at
>         > org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:1
>         > 04)
>         >         at
>         > org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send
>         > (Axis2Synap
>         > seEnvironment.java:170)
>         > 
>         > I managed to get past this one by commenting out: 
>         >             if
>         > (httpVersion.greaterEquals(HttpVersion.HTTP_1_1)) {
>         >                 //entity.setChunked(true);
>         >             } 
>         > line 127 ServerHandler.java
>         > 
>         > then I get this one:
>         > 
>         > 2007-10-16 16:01:45,125 [10.0.0.3-pzfdell]
>         > [HttpServerWorker-1] ERROR ServerHandler Unexpected HTTP
>         > protocol error : Response already submitted
>         > org.apache.http.HttpException : Response already submitted
>         >         at
>         > org.apache.http.impl.nio.DefaultNHttpServerConnection.submitResponse(DefaultNHttpServerCo
>         > nnection.java:201)
>         >         at
>         > org.apache.synapse.transport.nhttp.LoggingNHttpServerConnection.submitResponse (LoggingNHt
>         > tpServerConnection.java:54)
>         >         at
>         > org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(ServerHandler.java:221)
>         >         at
>         > org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncResponse (HttpCoreNIOSender.
>         > java:352)
>         >         at
>         > org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreNIOSender.java:215)
>         >         at
>         > org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
>         >         at
>         > org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:104)
>         > 
>         > Help!!?? 
>         > 
>         > Paul
>         > 
>         > -- 
>         > Paul Fremantle
>         > Co-Founder and VP of Technical Sales, WSO2
>         > OASIS WS-RX TC Co-chair
>         > 
>         > blog: http://pzf.fremantle.org
>         > paul@wso2.com
>         > 
>         > "Oxygenating the Web Service Platform", www.wso2.com
> 
> 
> 
> -- 
> Paul Fremantle
> Co-Founder and VP of Technical Sales, WSO2
> OASIS WS-RX TC Co-chair
> 
> blog: http://pzf.fremantle.org
> paul@wso2.com
> 
> "Oxygenating the Web Service Platform", www.wso2.com


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


Re: problem with using NIO HTTP and HTTP GET

Posted by Paul Fremantle <pz...@gmail.com>.
Using the QA build that was posted a couple of days ago, I deployed sample
100 and typed http://localhost:8080/soap/StockQuoteProxy/getQuote?symbol=IBMinto
my browser.

2007-10-16 19:33:59,609 [10.0.0.3-pzfdell] [HttpClientWorker-1] ERROR
ServerHand
ler Unexpected HTTP protocol error : Transfer-encoding header already
present
org.apache.http.ProtocolException: Transfer-encoding header already present
        at org.apache.http.protocol.ResponseContent.process(
ResponseContent.java
:67)
        at org.apache.http.protocol.BasicHttpProcessor.process
(BasicHttpProcesso
r.java:304)
        at org.apache.synapse.transport.nhttp.ServerHandler.commitResponse
(Serve
rHandler.java:220)
        at
org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons
e(HttpCoreNIOSender.java:350)
        at org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke
(HttpCoreN
IOSender.java:215)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
        at org.apache.synapse.core.axis2.Axis2Sender.sendBack(
Axis2Sender.java:1
04)


On 10/16/07, Asankha C. Perera <as...@wso2.com> wrote:
>
>  Paul
>
> Can you re-create this with the sample #100 etc? Please send me details to
> reproduce.. AFAIK we do not have a test case for GET access... I will try
> this out and see what may be wrong.. I believe you are not doing a load test
>
> asankha
>
> Paul Fremantle wrote:
>
> I'm trying to use GET on a proxy service hosted in Synapse.
> I'm getting this error:
>
> 2007-10-16 15:53:12,421 [10.0.0.3-pzfdell] [I/O dispatcher 7]  INFO
> PipeImpl Usi
> ng simulated buffered Pipes for event-driven to stream IO bridging
> 2007-10-16 15:53:12,906 [10.0.0.3-pzfdell] [HttpServerWorker-1] ERROR
> ServerHand
> ler Unexpected HTTP protocol error : Transfer-encoding header already
> present
> org.apache.http.ProtocolException: Transfer-encoding header already
> present
>         at org.apache.http.protocol.ResponseContent.process(
> ResponseContent.java
> :67)
>         at org.apache.http.protocol.BasicHttpProcessor.process
> (BasicHttpProcesso
> r.java:304)
>         at org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(Serve
> rHandler.java:220)
>         at
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons
> e(HttpCoreNIOSender.java:352)
>         at org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreN
>
> IOSender.java:215)
>         at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
>         at org.apache.synapse.core.axis2.Axis2Sender.sendBack(
> Axis2Sender.java:1
> 04)
>         at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2Synap
> seEnvironment.java:170)
>
> I managed to get past this one by commenting out:
>             if (httpVersion.greaterEquals(HttpVersion.HTTP_1_1)) {
>                 //entity.setChunked(true);
>             }
> line 127 ServerHandler.java
>
> then I get this one:
>
> 2007-10-16 16:01:45,125 [10.0.0.3-pzfdell] [HttpServerWorker-1] ERROR
> ServerHandler Unexpected HTTP
> protocol error : Response already submitted
> org.apache.http.HttpException : Response already submitted
>         at
> org.apache.http.impl.nio.DefaultNHttpServerConnection.submitResponse
> (DefaultNHttpServerCo
> nnection.java:201)
>         at
> org.apache.synapse.transport.nhttp.LoggingNHttpServerConnection.submitResponse(LoggingNHt
> tpServerConnection.java:54)
>         at org.apache.synapse.transport.nhttp.ServerHandler.commitResponse
> (ServerHandler.java:221)
>         at
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncResponse(HttpCoreNIOSender.
> java:352)
>         at org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(
> HttpCoreNIOSender.java:215)
>         at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
>         at org.apache.synapse.core.axis2.Axis2Sender.sendBack(
> Axis2Sender.java:104)
>
> Help!!??
>
> Paul
>
> --
> Paul Fremantle
> Co-Founder and VP of Technical Sales, WSO2
> OASIS WS-RX TC Co-chair
>
> blog: http://pzf.fremantle.org
> paul@wso2.com
>
> "Oxygenating the Web Service Platform", www.wso2.com
>
>


-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

Re: problem with using NIO HTTP and HTTP GET

Posted by "Asankha C. Perera" <as...@wso2.com>.
Paul

Can you re-create this with the sample #100 etc? Please send me details 
to reproduce.. AFAIK we do not have a test case for GET access... I will 
try this out and see what may be wrong.. I believe you are not doing a 
load test

asankha

Paul Fremantle wrote:
> I'm trying to use GET on a proxy service hosted in Synapse.
> I'm getting this error:
>
> 2007-10-16 15:53:12,421 [10.0.0.3-pzfdell] [I/O dispatcher 7]  INFO 
> PipeImpl Usi
> ng simulated buffered Pipes for event-driven to stream IO bridging
> 2007-10-16 15:53:12,906 [10.0.0.3-pzfdell] [HttpServerWorker-1] ERROR 
> ServerHand
> ler Unexpected HTTP protocol error : Transfer-encoding header already 
> present
> org.apache.http.ProtocolException: Transfer-encoding header already 
> present
>         at 
> org.apache.http.protocol.ResponseContent.process(ResponseContent.java
> :67)
>         at 
> org.apache.http.protocol.BasicHttpProcessor.process(BasicHttpProcesso
> r.java:304)
>         at 
> org.apache.synapse.transport.nhttp.ServerHandler.commitResponse (Serve
> rHandler.java:220)
>         at 
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncRespons
> e(HttpCoreNIOSender.java:352)
>         at 
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreN
> IOSender.java:215)
>         at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
>         at 
> org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:1
> 04)
>         at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send 
> (Axis2Synap
> seEnvironment.java:170)
>
> I managed to get past this one by commenting out:
>             if (httpVersion.greaterEquals(HttpVersion.HTTP_1_1)) {
>                 //entity.setChunked(true);
>             }
> line 127 ServerHandler.java
>
> then I get this one:
>
> 2007-10-16 16:01:45,125 [10.0.0.3-pzfdell] [HttpServerWorker-1] ERROR 
> ServerHandler Unexpected HTTP
> protocol error : Response already submitted
> org.apache.http.HttpException : Response already submitted
>         at 
> org.apache.http.impl.nio.DefaultNHttpServerConnection.submitResponse(DefaultNHttpServerCo
> nnection.java:201)
>         at 
> org.apache.synapse.transport.nhttp.LoggingNHttpServerConnection.submitResponse 
> (LoggingNHt
> tpServerConnection.java:54)
>         at 
> org.apache.synapse.transport.nhttp.ServerHandler.commitResponse(ServerHandler.java:221)
>         at 
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.sendAsyncResponse 
> (HttpCoreNIOSender.
> java:352)
>         at 
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.invoke(HttpCoreNIOSender.java:215)
>         at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
>         at 
> org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:104)
>
> Help!!??
>
> Paul
>
> -- 
> Paul Fremantle
> Co-Founder and VP of Technical Sales, WSO2
> OASIS WS-RX TC Co-chair
>
> blog: http://pzf.fremantle.org
> paul@wso2.com <ma...@wso2.com>
>
> "Oxygenating the Web Service Platform", www.wso2.com 
> <http://www.wso2.com>