Hi, Yashwanth, I've tried using the multithreaded http client, and got the error message as follows: org.apache.axis2.AxisFault: The input stream for an incoming message is null. at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:92) at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:67) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:354) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165) at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:555) at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:531) at portalA.RequestingForSharedResources.main(RequestingForSharedResources.java:520) I think the problem occurred due to the method client.sendReceive(OMElement), which will return a OMElement back to the call. However, I don't want the response coming back to this call, since I've designed a unified interface to receive and deal with all the incoming messages. I've also checked the relevant api document and found out there is a relevant method (public void sendReceiveNonBlocking(org.apache.axiom.om.OMElement elem, Callback callback)), which might be suitable to my use. But I have no idea how to implement the Callback, cos the information showed that "Please use the AxisCallback interface rather than Callback, which has been deprecated". Have you ever used this function before? I've tried using this method before, but couldn't use it in a correct way. Or when you use the method sendReceive(OMElement), do you design a unified interface to deal with the incoming messages? Cos in my applications, each service will use the same interface to communicate in multiple steps. Best regards, Yunxi
Subject: RE: Unable to sendViaPost to url Date: Thu, 21 Jul 2011 12:51:19 -0700 From: yraja...@cisco.com To: java-dev@axis.apache.org 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-trans > 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_RequestingForSharedResource > 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.java:11 > 16) > > at > > > org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnect > ionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1413) > > at > > > org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.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(HttpMethod > Director.java:398) > > at > > > org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDir > ector.java:171) > > at > > > org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) > > at > > > org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346) > > at > > > org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTT > PSender.java:557) > > at > > > org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:199) > > at org.ap ache.axis2.transport.http.HTTPSender.send(HTTPSender.java:76) > > at > > > org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithC > ommons(CommonsHTTPTransportSender.java:400) > > at > > > org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTT > PTransportSender.java:225) > > at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:438) > > at > > > org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperatio > n.java:402) > > at > > > org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisO > 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(ReceivingRequestFo > rSharedResources.java:173) > > at > > > portalB.ReceivingRequestForSharedResources.receivingSOAPMessage(ReceivingReq > uestForSharedResources.java:141) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 > ) > > at > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl > .java:25) > > at java.lang.reflect.Method.invoke(Method.java:597) > > at > > > org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver.invokeBusinessLogic(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.processHTTPPostRequest(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(Application > FilterChain.java:306) > > at > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh > ain.java:210) > > at > > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.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:380) > > at > > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243) > > 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.java: > 288) > > at > > > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.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 >