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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> > 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 > <[EMAIL PROTECTED]> > > 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 > > <[EMAIL PROTECTED]> 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 > > > > > [EMAIL PROTECTED] > > > > > > > > > > "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 > > > > [EMAIL PROTECTED] > > > > > > > > "Oxygenating the Web Service > Platform", > > www.wso2.com > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > > For additional commands, e-mail: > > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > -- > > > Paul Fremantle > > > Co-Founder and VP of Technical Sales, WSO2 > > > OASIS WS-RX TC Co-chair > > > > > > blog: http://pzf.fremantle.org > > > [EMAIL PROTECTED] > > > > > > "Oxygenating the Web Service Platform", > www.wso2.com > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > > > > > > -- > > > > Paul Fremantle > > Co-Founder and VP of Technical Sales, WSO2 > > OASIS WS-RX TC Co-chair > > > > blog: http://pzf.fremantle.org > > [EMAIL PROTECTED] > > > > "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 > > [EMAIL PROTECTED] > > > > "Oxygenating the Web Service Platform", www.wso2.com > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > -- > Paul Fremantle > Co-Founder and VP of Technical Sales, WSO2 > OASIS WS-RX TC Co-chair > > blog: http://pzf.fremantle.org > [EMAIL PROTECTED] > > "Oxygenating the Web Service Platform", www.wso2.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
