Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 81708 invoked from network); 22 Aug 2006 12:23:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 Aug 2006 12:23:39 -0000 Received: (qmail 88637 invoked by uid 500); 22 Aug 2006 12:23:31 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 88621 invoked by uid 500); 22 Aug 2006 12:23:31 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 88609 invoked by uid 99); 22 Aug 2006 12:23:31 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Aug 2006 05:23:31 -0700 X-ASF-Spam-Status: No, hits=0.8 required=10.0 tests=INFO_TLD,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of Michele.Mazzucco@ncl.ac.uk designates 128.240.234.66 as permitted sender) Received: from [128.240.234.66] (HELO cheviot4.ncl.ac.uk) (128.240.234.66) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Aug 2006 05:23:29 -0700 Received: from [10.8.150.50] (socksgw1.ncl.ac.uk [128.240.229.5]) by cheviot4.ncl.ac.uk (8.13.6/8.13.1) with ESMTP id k7MCN3nZ018863 for ; Tue, 22 Aug 2006 13:23:03 +0100 Mime-Version: 1.0 (Apple Message framework v752.2) In-Reply-To: <44E5EBCD.1080803@opensource.lk> References: <44E04F06.4010106@ncl.ac.uk> <44E183BF.50509@ncl.ac.uk> <44E5EBCD.1080803@opensource.lk> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Michele Mazzucco Subject: Re: [Axis2] ServiceClient error Date: Tue, 22 Aug 2006 13:23:06 +0100 To: axis-user@ws.apache.org X-Mailer: Apple Mail (2.752.2) Received-SPF: pass (cheviot4.ncl.ac.uk: 128.240.229.5 is authenticated by a trusted mechanism) X-Newcastle-MailScanner-Information: Please contact Postmaster@newcastle.ac.uk for more information X-Newcastle-MailScanner: Found to be clean X-Newcastle-MailScanner-MCPCheck: MCP-Clean, MCP-Checker (score=0, required 1) X-Newcastle-MailScanner-From: michele.mazzucco@ncl.ac.uk X-NCL-Spam-Status: No X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Jira AXIS2-1061 created. Regards, Michele On 18 Aug 2006, at 17:33, Deepal Jayasinghe wrote: > please create a JIRA. > > Thanks > Deepal > > Michele Mazzucco wrote: > >> Hi all, >> >> I've got some more details: the error happens because the second >> message >> is sent with an empty body. The workaround is to make the thread >> sleep >> for (at least) 600 ms (unfortunately this is too much for my >> needs). Is >> there any reason or is it a bug? If it is not a bug, why it is not >> documented anywhere, since the tutorial for dual channel-non blocking >> clients [1] does not use any sleep call? >> >> >> Thanks, >> Michele >> >> [1] http://ws.apache.org/axis2/1_0/ >> userguide3.html#EchoNonBlockingDualClient >> >> Michele Mazzucco wrote: >> >> >>> Hi all, >>> >>> I get a very strange error (on the client side) when I try to send >>> multiple (equals, in my case: the submitted requests are the same >>> of the >>> "echo" sample) requests to my service. The error happens *only* when >>> multiple requests are submitted, i.e., if the program sends only 1 >>> requests no errors happen. >>> >>> >>> >>> INFO StreamRequestMyServiceClient:main - Sending [2] requests >>> INFO StreamRequestMyServiceClient:send - Sent [2] requests >>> INFO StreamRequestMyServiceClient$QospCallback:onComplete - >>> Received >>> respose [1/2] >>> INFO StreamRequestMyServiceClient$QospCallback:onComplete - >>> >> xmlns:soapenv="http://schemas.xmlsoap.org/soap/ >>> envelope/">>> xmlns:client="http://org.ncl.ac.uk/qosp/clients/codestore" >>> xmlns:tns="http://ws.apache.org/axis2">QoSP Echo >>> String >>> INFO StreamRequestMyServiceClient$QospCallback:onComplete - 1 >>> are missing >>> ERROR StreamRequestMyServiceClient:logException - ERROR!: >>> ERROR StreamRequestMyServiceClient:logException - >>> org.apache.axis2.AxisFault: unknown >>> at org.apache.axis2.util.CallbackReceiver.receive >>> (CallbackReceiver.java:65) >>> at org.apache.axis2.engine.AxisEngine.receiveFault >>> (AxisEngine.java:599) >>> at >>> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRe >>> quest(HTTPTransportUtils.java:282) >>> at org.apache.axis2.transport.http.HTTPWorker.service >>> (HTTPWorker.java:238) >>> at >>> org.apache.axis2.transport.http.server.DefaultHttpServiceProcessor.d >>> oService(DefaultHttpServiceProcessor.java:177) >>> at org.apache.http.protocol.HttpService.handleRequest >>> (HttpService.java:123) >>> at >>> org.apache.axis2.transport.http.server.DefaultHttpServiceProcessor.r >>> un(DefaultHttpServiceProcessor.java:236) >>> at >>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor >>> $Worker.runTask(ThreadPoolExecutor.java:650) >>> at >>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor >>> $Worker.run(ThreadPoolExecutor.java:675) >>> at java.lang.Thread.run(Thread.java:595) >>> Caused by: java.lang.Exception: org.apache.axis2.AxisFault >>> at >>> org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver.invokeBusines >>> sLogic(RawXMLINOnlyMessageReceiver.java:104) >>> at >>> org.apache.axis2.receivers.AbstractInMessageReceiver.receive >>> (AbstractInMessageReceiver.java:34) >>> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:503) >>> at >>> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRe >>> quest(HTTPTransportUtils.java:284) >>> at org.apache.axis2.transport.http.AxisServlet.doPost >>> (AxisServlet.java:144) >>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) >>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) >>> at >>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter >>> (ApplicationFilterChain.java:252) >>> at >>> org.apache.catalina.core.ApplicationFilterChain.doFilter >>> (ApplicationFilterChain.java:173) >>> at >>> org.apache.catalina.core.StandardWrapperValve.invoke >>> (StandardWrapperValve.java:213) >>> at >>> org.apache.catalina.core.StandardContextValve.invoke >>> (StandardContextValve.java:178) >>> at >>> org.apache.catalina.core.StandardHostValve.invoke >>> (StandardHostValve.java:126) >>> at >>> org.apache.catalina.valves.ErrorReportValve.invoke >>> (ErrorReportValve.java:105) >>> at >>> org.apache.catalina.core.StandardEngineValve.invoke >>> (StandardEngineValve.java:107) >>> at >>> org.apache.catalina.connector.CoyoteAdapter.service >>> (CoyoteAdapter.java:148) >>> at >>> org.apache.coyote.http11.Http11Processor.process >>> (Http11Processor.java:869) >>> at >>> org.apache.coyote.http11.Http11BaseProtocol >>> $Http11ConnectionHandler.processConnection >>> (Http11BaseProtocol.java:667) >>> at >>> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket >>> (PoolTcpEndpoint.java:527) >>> at >>> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt >>> (LeaderFollowerWorkerThread.java:80) >>> at >>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run >>> (ThreadPool.java:684) >>> at java.lang.Thread.run(Thread.java:595) >>> >>> at org.apache.axis2.AxisFault.(AxisFault.java:159) >>> ... 10 more >>> >>> >>> >>> >>> >>> >>> >>> >>> The following chunk of code submits the requests: >>> >>> /** >>> * Sends {@link #requests} requests to the cluster manager. >>> */ >>> private final void send() { >>> final OMElement payload = ClientUtils.getEchoOMElement(); >>> >>> // Creates and sets the options >>> Options options = new Options(); >>> >>> String routerEPR = System.getProperty("qosp.manager.epr"); >>> if (routerEPR == null) { >>> throw new RuntimeException("Unable to get the router EPR"); >>> } >>> routerEPR = routerEPR.concat("MyService"); >>> options.setTo(new EndpointReference(routerEPR)); >>> >>> >>> options.setAction("urn:echo"); >>> // The boolean flag informs the axis2 engine to use two separate >>> // transport connection to retrieve the response. >>> options.setTransportInProtocol(Constants.TRANSPORT_HTTP); >>> options.setUseSeparateListener(true); >>> options.setSoapVersionURI >>> (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI); >>> >>> ServiceClient sender = null; >>> try { >>> sender = new ServiceClient(); >>> sender.engageModule(RoutingConstants.MODULE_ADDRESSING); >>> sender.setOptions(options); >>> >>> QospCallback callback = new QospCallback(); >>> for (int i = 0; i < this.requests.get(); i++) { >>> sender.sendReceiveNonBlocking(payload, callback); >>> } >>> >>> if (log.isInfoEnabled()) { >>> log.info("Sent [" + this.requests.get() + "] requests"); >>> } >>> >>> // Wait till the callback receives the response. >>> while (!callback.isComplete()) { >>> try { >>> Thread.sleep(1000); >>> } catch (InterruptedException e) { >>> // >>> } >>> } >>> >>> } catch (AxisFault e) { >>> if (log.isEnabledFor(Level.ERROR)) { >>> logException(e); >>> } >>> } finally{ >>> try { >>> if (sender != null) >>> sender.finalizeInvoke(); >>> } catch (AxisFault axisFault) { >>> // >>> } >>> } >>> >>> } //-- send() >>> >>> while this is the callback object used to retrieve asynchronous >>> responses: >>> >>> >>> >>> /** >>> * Sets the completion status. >>> * >>> * @param complete The completion status. >>> */ >>> @Override >>> public void setComplete(boolean complete) { >>> super.setComplete((requests.decrementAndGet() == 0)); >>> } //-- setComplete() >>> >>> >>> /** >>> * Gets the completion status. >>> * >>> * @return The completion status. >>> */ >>> @Override >>> public boolean isComplete() { >>> return (requests.get() == 0); >>> } //-- isComplete() >>> >>> /** >>> * Handles asynchronous results. >>> * >>> * @param result The asynchronous result. >>> */ >>> @Override >>> public void onComplete(AsyncResult result) { >>> this.setComplete(true); >>> if (log.isInfoEnabled()) { >>> log.info("Received respose [" + (++ this.success) >>> + "/" + this.toReceive + "]"); >>> log.info(result.getResponseEnvelope().getBody().toString()); >>> } >>> if (this.isComplete()) { >>> log.info("All requests are complete"); >>> } else { >>> log.info(requests.get() + " are missing"); >>> } >>> } //-- onComplete() >>> >>> /** >>> * Handles asynchronous errors. >>> * >>> * @param e The exception. >>> */ >>> @Override >>> public void onError(Exception e) { >>> if (log.isEnabledFor(Level.ERROR)) { >>> logException(e); >>> } >>> } //-- onError() >>> >>> >>> >>> >>> Any idea? >>> >>> Thanks in advance, >>> Michele >>> >>> -------------------------------------------------------------------- >>> - >>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org >>> For additional commands, e-mail: axis-user-help@ws.apache.org >>> >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org >> For additional commands, e-mail: axis-user-help@ws.apache.org >> >> >> >> >> > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org > For additional commands, e-mail: axis-user-help@ws.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-user-help@ws.apache.org