Hi Yunxi,
Try using the multithreaded http client: MultiThreadedHttpConnectionManager httpConnectionManager = new MultiThreadedHttpConnectionManager(); HttpClient httpClient = new HttpClient(httpConnectionManager); ... ... ... sender.getOptions().setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Constants.VALUE_TRUE); sender.getOptions().setProperty(HTTPConstants.CACHED_HTTP_CLIENT, httpClient); sender.setOptions(options); ... ... ... result = sender.sendReceive(request); thanks, -- Yashwanth From: Yunxi Zhang [mailto:zhangyx...@hotmail.com] Sent: Thursday, July 21, 2011 7:55 AM To: java-dev@axis.apache.org Subject: RE: Unable to sendViaPost to url Hi, Swapna, I've checked the xml by using the soap monitor already, they were correct. Before, I put two services in the same machine for the test with the target URL with the value "Localhost", then i modified one of the target URL with real IP address, and the problem was solved successfully. Now, I have two more communication messages, and the same problem occurred again at the sixth step. This time, I've test them in both the same machine and in two different machines, but the problem was always the same. I've tried setting "options.setTimeOutInMilliSeconds(600000L);" in my services, but, it can't address the problem. Have you got any idea about it? Thank you. Regards, Yunxi > From: ss...@nisum.com > To: java-dev@axis.apache.org > Subject: RE: Unable to sendViaPost to url > Date: Tue, 14 Jun 2011 11:17:54 +0530 > > Hi, > > Can you please check if the request xml for the fourth message is correct > or not. You can engage soap monitor to see the request and response. > > Thanks, > Swapna Soni. > > -----Original Message----- > From: Sagara Gunathunga [mailto:sagara.gunathu...@gmail.com] > Sent: Monday, June 13, 2011 10:11 PM > To: java-dev@axis.apache.org > Subject: Re: Unable to sendViaPost to url > > My understanding about the error trace is you haven't set sufficient > time out for clients (consumers) try to set enough value as follows. > > options.setTimeOutInMilliSeconds(soTimeout); > > Also Amila has mentioned some HTTP performance hints here [1] you > could try for that too. > > [1] - > http://amilachinthaka.blogspot.com/2009/05/improving-axis2-client-http-t rans > port.html > > Thanks ! > > On Sat, Jun 11, 2011 at 1:11 AM, Yunxi Zhang <zhangyx...@hotmail.com> wrote: > > To W hom It May Concern, > > I'm using axis2 to create two web service points to let them transmit soap > > messages to each other. There are only four soap messages transmitting > > between two points shown as follows > > Message 1: Web Service 1-------------> Web Service 2 > > Message 2: Web Service 2------------->Web Service 1 > > Message 3: Web Service 1------------->Web Service 2 > > Message 4: Web Service 2------------->Web Service 1 (finish here) > > I have used the function "sendRobust" to send all the message. > > The problem is that the first three messages can be transmitted very > > quickly, but the 4th message can't be sent out with the errors shown > below: > > [INFO] Unable to sendViaPost to > > > url[http://localhost:8080/axis2/services/PortalA_RequestingForSharedReso urce > s] > > java.net.SocketTimeoutException: Read t imed out > > at java.net.SocketInputStream.socketRead0(Native Method) > > at java.net.SocketInputStream.read(SocketInputStream.java:129) > > at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) > > at java.io.BufferedInputStream.read(BufferedInputStream.java:237) > > at > org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78) > > at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106) > > at > > > org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.jav a:11 > 16) > > at > > > org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpCon nect > ionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413) > > at > > > org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBa se.j > ava:1973) > > at > > > org.apach e.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.jav > a:1735) > > at > > > org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java :109 > 8) > > at > > > org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMe thod > Director.java:398) > > at > > > org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMetho dDir > ector.java:171) > > at > > > org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3 97) > > at > > > org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3 46) > > at > > > org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(Abstrac tHTT > PSender.java:557) > > at > > > org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:1 99) > > at org.ap ache.axis2.transport.http.HTTPSender.send(HTTPSender.java:76) > > at > > > org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageW ithC > ommons(CommonsHTTPTransportSender.java:400) > > at > > > org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(Common sHTT > PTransportSender.java:225) > > at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:438) > > at > > > org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper atio > n.java:402) > > at > > > org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInA xisO > peration.java:229) > > at > org.apache.axis2.client.OperationClient.execute(OperationClient.java:165 ) > > at > org.apache.axis2.client.ServiceClient.sendRobust(ServiceClient.java:470) > > at > org.apache.axis2.client.ServiceClient.sen dRobust(ServiceClient.java:451) > > at > > > portalB.ReceivingRequestForSharedResources.decisionMaking(ReceivingReque stFo > rSharedResources.java:173) > > at > > > portalB.ReceivingRequestForSharedResources.receivingSOAPMessage(Receivin gReq > uestForSharedResources.java:141) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39 > ) > > at > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl > .java:25) > > at java.lang.reflect.Method.invoke(Method.java:597) > > at > > > org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver.invokeBusinessLog ic(R > awXMLINOnlyMessageReceiver.java:90) > > at > > > org.apache.axis2.receivers.AbstractMessageReceiver.receive(Ab stractMessageRe > ceiver.java:114) > > at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173) > > at > > > org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReques t(HT > TPTransportUtils.java:173) > > at > org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:144) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) > > at > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica tion > FilterChain.java:306) > > at > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt erCh > ain.java:210) > > at > > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv e.ja > va:240) > > at > > > org.apache.catalina.c ore.StandardContextValve.invoke(StandardContextValve.ja > va:161) > > at > > > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :164 > ) > > at > > > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :100 > ) > > at > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:550 ) > > at > > > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve. java > :118) > > at > > > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:3 80) > > at > > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:24 3) > > at > > > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process( Http > 11Protocol.java:188) > > at > > > org.apache.coyote.http11.Http11Protocol$Http11 ConnectionHandler.process(Http > 11Protocol.java:166) > > at > > > org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.j ava: > 288) > > at > > > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto r.ja > va:886) > > at java.util.concurrent.ThreadPoolExecut > > However, if I use the soapmonitor to create a monitor point for the > message > > 4 between two web services, the 4th message can be sent out successfully. > I > > have no idea why this problem can occur. Could you help me find out the > > problem? > > Best regards, > > Yunxi > > > > > > -- > Sagara Gunathunga > > Blog - http://ssagara.blogspot.com > Web - http://people.apache.org/~sagara/ > LinkedIn - http://www.linkedin.com/in/ssagara > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-dev-unsubscr...@axis.apache.org > For additional commands, e-mail: java-dev-h...@axis.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-dev-unsubscr...@axis.apache.org > For additional commands, e-mail: java-dev-h...@axis.apache.org >