Re: [Axis2]Finding current tomcat Port from Axis2
Hi, a possible solution for tomcat would be to parse the server.xml file. As alternative, enable JMX and query the MBean. Michele On 18 Dec 2008, at 16:52, Srinath Perera wrote: Azeez, by any chance do you know a pointer to how to do it with tomcat? e.g. like JMX approach you mentioned.
Re: Axis2 client - counting bytes sent and received
What about using a custom handler with a null output stream? Michele On 11 Dec 2008, at 23:42, Dave Meibusch wrote: Hi, I'm attempting to log statistics for my system, including the bytes sent/received for the components using Axis2 client code. Digging through the source of HttpClient, HttpMethod (latter is accessible from Axis2 MessageContext) has not been successful. The Content-Length HTTP header is not reliable (in particular with Chunking enabled). I'm not that hopeful, but perhaps someone has been down a similar path before me? thanks, Dave
Re: Fails under some load
Can you please post the relevant service code too? Might it be a concurrency issue? Michele On 5 Dec 2008, at 10:55, Daniil Chipenko wrote: Hello, If someone familiar with creating service clients with AXIOM, please help! I was checked for outgoing SOAP messages with http sniffer on client requests to server and realized that some of them is malformed by interleaving each other why other is empty. Sometimes they become so twisted that even result = sender.sendReceive (method); can't pass XML structure analyze phase and can't do the request at all - exceptions thrown is very varied then, but all of them indicates broken XML structure. How can this happen? I didn't use any static objects in my code which can assign to the same static variables and i checked content of outgoing OMElement - it's always well-formed. Problem happen inside sendReceive method. I suppose sendReceive method of sender object sometimes write to same httpclient stream. How i can avoid such interleaving? Example of such broken request: 1 thread: ??xmxlml . (and so on) while 2 thread is empty but 3 thread's request is properly formed and passed ServiceClient sender = new ServiceClient(); sender.setOptions(options); result = sender.sendReceive(method); very sorry for bad english. With hope, Daniil 2008/12/4 Daniil Chipenko [EMAIL PROTECTED] Good day, I'm using Axis2 1.4 with tomcat5.5 and created both service and client from a scratch with AXIOM via HTTP port. And they worked together like charm, just before i'm beggining to put them under some load. Even when there is just 3 simultaneous calls - one of my client threads written with AXIOM begins to throw varied exceptions without any stack trace, like: org.apache.axiom.om.OMException or org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1] Message: An invalid XML character (Unicode: 0x0) was found in the comment. or com.sun.org.apache.xerces.internal.xni.XNIException: Scanner State 7 not Recognized or org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1] Message: Open quote is expected for attribute {1} associated with an element type name. ... and this happens not always, but approx. 1/3 times of 3 simultaneus threads starts. Here is my code: OMElement method = fac.createOMElement(new QName(chartName)); for(String key : keys){ OMElement value = fac.createOMElement(new QName (key)); String mapvalue = ((String[]) params.get(key))[0]; value.addChild(fac.createOMText(value, mapvalue)); method.addChild(value); } Options options = new Options(); options.setTo(ApplicationProperties.targetEPRFinance); options.setTransportInProtocol (Constants.TRANSPORT_HTTP); OMElement result = fac.createOMElement(new QName (EmptyResult)); System.out.println(Payload for service: + method.toString()); try { ServiceClient sender = new ServiceClient(); sender.setOptions(options); result = sender.sendReceive(method); } catch (AxisFault e) { // TODO Auto-generated catch block e.printStackTrace(); } System.out.println(Result from service: + result.toString()); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to return a respnose from module
What about using InvocationResponse.ABORT after processing the request in your handler? Michele On 27 Nov 2008, at 19:29, Shah Asrani wrote: Hi I have a web service running. The web service has method called getVersion and it returns an OMElement. The web service has a custom handler that gets invoked. I set the envelope in the MessageContext. but web service continues and returns the response from the getVersion method. How can return the respone from custom handler (i.e., I don't want web service to reach to getVersion method and I want to write the response in module. Best Regards, Shah Asrani - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adressing, async services and responses
David, I don't understand what step 3.2 means, you have the HTTP 200 for that. BTW, yes, it is possible. Just start a brand new MEP. Michele On 20 Nov 2008, at 19:28, David Ojeda wrote: Michele, You are right, this example is clearly feasible. But what if I wanted to do step step 3.2 before 3. I mean, respond that the ws will process this request *before* actually doing the heavy work (transfering funds). This what I think is not possible with axis2 (maybe not even with other ws soap implementations). David On Thursday 20 November 2008 14:23:00 Michele Mazzucco wrote: On 20 Nov 2008, at 17:39, David Ojeda wrote: I am saying it is not possible because I need some validation on the webservice implementation and then respond. As you said in your first response, the acknowledgment (i.e. HTTP 200) is *always* sent back to the client *before* the server starts processing the request Maybe an example will help: Suppose that we are developing a Webservice for a bank with an operation that transfers money from an user's account to another bank account. The service will be used in a frontend so users transfer money between accounts. A client will set the destined account and amount and the frontend should quickly respond if the operation will be executed or not. 1. A ws-client sends the request to the service, with a xml that contains the user's account, the amount and the destined account. 2. The ws receives the request and validates the input (checks if the user's account has enough funds) 3 if valid, ws spawns a thread in order to make the money transfer (this could take hours if the other account is in some other country, for example) 3.1. ws notifies external system 3.2. ws responds (to the replyTo or faultTo) that it will process this request 4 if not valid ws responds (to the replyTo or faultTo) that it will not process this request. The external system is not notified Maybe with the example above I can make myself clearer? Yes, that's clear. But still I don't understand why you're saying it's not feasible. I honestly can't see why. Michele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- David Ojeda - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adressing, async services and responses
Hi David, I don't really see where the problem is when you say there is an initial acknowledgment and then the response is delivered somewhere else. If you use asynchronous communication (i.e. WS-addressing and double channel) the acknowledgment (i.e. HTTP 200) is *always* sent back to the client *before* the server starts processing the request. Then you can specify different endpoints for reply and fault by using setReplyTo() and setFaultTo(), respectively. However be careful that if the response is sent somewhere else, i.e., to a host different from the sender, you'll need to write a handler in order to remove the relatesTo field (WS-addressing stuff). HTH, Michele On 19 Nov 2008, at 22:11, David Ojeda wrote: Hello, I am trying to design a webservice that will respond asynchronously and to a specific URL. I have read documentation on asynchronous services [1] but I have not found a solution for the following situation: 1. A client sends a soap request to the webservice 2. The webservice does some validation of the input (by actually calling another webservice) 3. If the validation succeds, the webservice responds with an xml that indicates that the operation is pending. 3.1 The webservice does some work that takes a while (1min) 3.2 The webservice responds (succesfully or with a fault) to an URL specified by the client 3.3 End 4. If the validation failed, the webservice responds with an xml that indicates that there is a problem So I think this situation is weird since there is an initial acknowledge to the client (with data) and then the response is delivered somewhere else. I have managed to use the addressing module to specify the URL for the final response options.setReplyTo(new EndpointReference( http://10.21.17.196:/pruebaservlet/pepe;)); However, when I call the service, I do not how to send or receive the acknowledge. I monitored the http communication and the client sends correctly the soap request and the service responds with a 200 OK code but no content. So this is my question: Is it possible to implement this scenario, i.e. an ack that indicates if the operation will or will not be performed, then the response is sent somewhere else. Some other doubts: What would be the ideal way to handle this response? With a simple servlet? Or perhaps an in-only webservice whose in- parameter is the output-parameter of the initial webservice. (I hope I am making some sense with these questions) Thank you [1] http://www.onjava.com/pub/a/onjava/2005/07/27/axis2.html?page=4 http://www.ibm.com/developerworks/webservices/library/ws-axis2/ http://today.java.net/pub/a/today/2006/12/13/invoking-web-services- using-apache-axis2.html -- David Ojeda - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adressing, async services and responses
Hi David, why are you saying it is not possible?! What I have in mind is: 1 - client send request to ws 2 - ws sends a http 200 code back 3 - ws validates the input 4 - ws does the job (no need to spawn a separate thread! -- axis2 uses a dedicated thread pool used to serve incoming requests) 5 - ws responds to client using replyTo or faultTo 6 - ws notifies external system (another ws is fine). You'll need to remove the relatesTo field because such values are stored on the client side. If msg # 6 is a brand new msg, then there's no problem (the relatesTo in msg #5 is with msg #1, which is fine). However, if you forward the result somewhere else (i.e. no client), then msg #5 won't be related to anything on the receiver side, right? Michele On 20 Nov 2008, at 14:47, David Ojeda wrote: Hello Michele, Thank you for your response. If a HTTP 200 acknowledgement is always sent back to the client before the server starts processing, then the situation I was thinking is not possible at all. I thought it may be possible to send an acknowledgement with some response like ok I will process this or there is a validation error. Since this is not possible, I will have to come up with a solution like: 1. client sends request to ws 2. ws validates the input 3. if valid, ws spawns a thread to do some work that takes a while 4. ws responds to the client 5. eventually the thread finishes and notifies an external system (another ws perhaps) That aside, why do you say that I will need to write a handler in order to remove the relatedTo field? I am curious on how to implement the 'server' that will receive the response. Thank you On Thursday 20 November 2008 10:00:42 Michele Mazzucco wrote: Hi David, I don't really see where the problem is when you say there is an initial acknowledgment and then the response is delivered somewhere else. If you use asynchronous communication (i.e. WS-addressing and double channel) the acknowledgment (i.e. HTTP 200) is *always* sent back to the client *before* the server starts processing the request. Then you can specify different endpoints for reply and fault by using setReplyTo() and setFaultTo(), respectively. However be careful that if the response is sent somewhere else, i.e., to a host different from the sender, you'll need to write a handler in order to remove the relatesTo field (WS-addressing stuff). HTH, Michele On 19 Nov 2008, at 22:11, David Ojeda wrote: Hello, I am trying to design a webservice that will respond asynchronously and to a specific URL. I have read documentation on asynchronous services [1] but I have not found a solution for the following situation: 1. A client sends a soap request to the webservice 2. The webservice does some validation of the input (by actually calling another webservice) 3. If the validation succeds, the webservice responds with an xml that indicates that the operation is pending. 3.1 The webservice does some work that takes a while (1min) 3.2 The webservice responds (succesfully or with a fault) to an URL specified by the client 3.3 End 4. If the validation failed, the webservice responds with an xml that indicates that there is a problem So I think this situation is weird since there is an initial acknowledge to the client (with data) and then the response is delivered somewhere else. I have managed to use the addressing module to specify the URL for the final response options.setReplyTo(new EndpointReference( http://10.21.17.196:/pruebaservlet/pepe;)); However, when I call the service, I do not how to send or receive the acknowledge. I monitored the http communication and the client sends correctly the soap request and the service responds with a 200 OK code but no content. So this is my question: Is it possible to implement this scenario, i.e. an ack that indicates if the operation will or will not be performed, then the response is sent somewhere else. Some other doubts: What would be the ideal way to handle this response? With a simple servlet? Or perhaps an in-only webservice whose in- parameter is the output-parameter of the initial webservice. (I hope I am making some sense with these questions) Thank you [1] http://www.onjava.com/pub/a/onjava/2005/07/27/axis2.html?page=4 http://www.ibm.com/developerworks/webservices/library/ws-axis2/ http://today.java.net/pub/a/today/2006/12/13/invoking-web- services- using-apache-axis2.html -- David Ojeda - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- David Ojeda - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adressing, async services and responses
On 20 Nov 2008, at 17:39, David Ojeda wrote: - I don't understand how it would be possible to respond to the client replyTo or faultTo and then notifying an external system. My understanding is that replying will be that last instruction in my code (a return or throw). Maybe you mean to do this with a custom handler? That's correct, but you can send the message to the external system first! (indeed, you'll need some sort of transaction/reliable messaging. Otherwise you'll end up with sending a message to one party and not to the other) - You mention that axis2 uses a dedicated thread pool used to serve incoming requests. I thought that the thread pool was managed by the application server (tomcat,jetty,weblogic) rather than axis2 itself since the webservice request are managed by a servlet after all... Is this correct? Yes, that's true if Axis2 is embedded. If it runs in standalone mode it will use its own thread pool. Michele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adressing, async services and responses
On 20 Nov 2008, at 17:39, David Ojeda wrote: I am saying it is not possible because I need some validation on the webservice implementation and then respond. As you said in your first response, the acknowledgment (i.e. HTTP 200) is *always* sent back to the client *before* the server starts processing the request Maybe an example will help: Suppose that we are developing a Webservice for a bank with an operation that transfers money from an user's account to another bank account. The service will be used in a frontend so users transfer money between accounts. A client will set the destined account and amount and the frontend should quickly respond if the operation will be executed or not. 1. A ws-client sends the request to the service, with a xml that contains the user's account, the amount and the destined account. 2. The ws receives the request and validates the input (checks if the user's account has enough funds) 3 if valid, ws spawns a thread in order to make the money transfer (this could take hours if the other account is in some other country, for example) 3.1. ws notifies external system 3.2. ws responds (to the replyTo or faultTo) that it will process this request 4 if not valid ws responds (to the replyTo or faultTo) that it will not process this request. The external system is not notified Maybe with the example above I can make myself clearer? Yes, that's clear. But still I don't understand why you're saying it's not feasible. I honestly can't see why. Michele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2][Tomcat] Thread Pool
If axis2 runs embedded into tomcat it will use the tomcat threads and thread pool. The configuration related to the SimpleHTTPServer is taken into account only if axis2 runs in standalone mode. Michele On 10 Nov 2008, at 10:24, overflow_ wrote: I have a web service in Axis2 (running over Tomcat 6.0 and unsing http/1.1 connections). Now I would like to manage a connection strategy that set up a Thread pool and the maximum number of concurrent connections. But I realized that both Tomcat 6 and Axis2 have configuration file for that. For Tomcat6 I use as thread pool The Executor: see http://tomcat.apache.org/tomcat-6.0-doc/config/executor.html here and http://tomcat.apache.org/tomcat-6.0-doc/config/http.html here I can configure this in apache-tomcat-6.0.18\conf\server.xml For Axis2 I use the default Transport Receiver SimpleHTTPServer (see http://ws.apache.org/axis2/1_1/api/org/apache/axis2/transport/http/ SimpleHTTPServer.html here ) where I can put as parameter requestCoreThreadPoolSize: number of threads available for request processing (unless queue fills up) (default 25) requestMaxThreadPoolSize: number of threads available for request processing if queue fills up (default 150) I can set up this parameters in apache-tomcat-6.0.18\webapps\axis2\WEB-INF\conf\axis2.xml I would like to understand the difference between the Thread Pool of Tomcat and the Thread Pool in Axis2. Which one is the correct one to set up? How a incoming request is managed between Tomcat and Axis2? How Tomcat and Axis2 interacts each other? -- View this message in context: http://www.nabble.com/-Axis2--Tomcat-- Thread-Pool-tp20416892p20416892.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2][Tomcat] Thread Pool
Enrico, I don't think there's any explicit documentation about this matter... it's just the way it works. Axis2 is basically a servlet, so there's no need of a separate http listener if axis2 is deployed on a servlet container! Michele On 10 Nov 2008, at 13:45, overflow_ wrote: Thank you very much for your answer Michele! Could I ask you if you have links to documentation where it is written this? I really didn't find any! Thank you and grazie! Enrico Michele Mazzucco-2 wrote: If axis2 runs embedded into tomcat it will use the tomcat threads and thread pool. The configuration related to the SimpleHTTPServer is taken into account only if axis2 runs in standalone mode. Michele On 10 Nov 2008, at 10:24, overflow_ wrote: I have a web service in Axis2 (running over Tomcat 6.0 and unsing http/1.1 connections). Now I would like to manage a connection strategy that set up a Thread pool and the maximum number of concurrent connections. But I realized that both Tomcat 6 and Axis2 have configuration file for that. For Tomcat6 I use as thread pool The Executor: see http://tomcat.apache.org/tomcat-6.0-doc/config/executor.html here and http://tomcat.apache.org/tomcat-6.0-doc/config/http.html here I can configure this in apache-tomcat-6.0.18\conf\server.xml For Axis2 I use the default Transport Receiver SimpleHTTPServer (see http://ws.apache.org/axis2/1_1/api/org/apache/axis2/transport/http/ SimpleHTTPServer.html here ) where I can put as parameter requestCoreThreadPoolSize: number of threads available for request processing (unless queue fills up) (default 25) requestMaxThreadPoolSize: number of threads available for request processing if queue fills up (default 150) I can set up this parameters in apache-tomcat-6.0.18\webapps\axis2\WEB-INF\conf\axis2.xml I would like to understand the difference between the Thread Pool of Tomcat and the Thread Pool in Axis2. Which one is the correct one to set up? How a incoming request is managed between Tomcat and Axis2? How Tomcat and Axis2 interacts each other? -- View this message in context: http://www.nabble.com/-Axis2--Tomcat-- Thread-Pool-tp20416892p20416892.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-Axis2--Tomcat-- Thread-Pool-tp20416892p20420185.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] - Production problem
Guido, On 24 Oct 2008, at 11:08, Barbaglia, Guido (ESTG) wrote: I've tested my Axis2 application on two machines (let's say A and B) belonging to the same local network, and everything works very well. Then I installed it on a production server C (with pubblic access and belonging to the same network) and I tried to test the communication between A and C, but I had connection timeout problem. It seems that node A did not accept the connection within timeout of xyz ms from the node C. isn't your service running on node C? If so, why did you state it seems that node A did not accept the connection...? BTW, could it be a firewall/proxy/network configuration issue? Michele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Axis2] problem with asynchronous msg processing
Hello everyone, I'm using Axis2 1.3 and I have a problem with async msgs (in-out operations). The CallbackReceiver class stores the msg IDs into a hash map, however (1) there's a bug in the algorithm which generates msg IDs (i.e. it generates duplicates) or (2) there's a concurrency problem. Here's the problem: 2008-10-03 12:32:44,190 [-] [pool-1-thread-4] INFO HttpCoreNIOListener HTTP Listener starting on port : 11001 [java] 2008-10-03 12:32:45,013 [-] [I/O dispatcher 2] INFO PipeImpl Using native OS Pipes for event-driven to stream IO bridging [java] 2008-10-03 12:33:13,001 [-] [HttpServerWorker-3] ERROR ServerWorker Error processing POST request [java] org.apache.axis2.AxisFault: The Callback for MessageID urn:uuid:B38A228B48E61911181223033596606 was not found [java] at org.apache.axis2.util.CallbackReceiver.receive (CallbackReceiver.java:70) [java] at org.apache.axis2.engine.AxisEngine.receive (AxisEngine.java:145) [java] at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReques t(HTTPTransportUtils.java:275) [java] at org.apache.synapse.transport.nhttp.ServerWorker.processPost (ServerWorker.java:226) [java] at org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java: 190) [java] at java.util.concurrent.ThreadPoolExecutor $Worker.runTask(ThreadPoolExecutor.java:650) [java] at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:675) [java] at java.lang.Thread.run(Thread.java:613) Has any of the classes involved into this bug been updated in Axis2 1.4/1.4.1? Thanks, Michele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Socket time out exception
Sush, can you please confirm me that the problem occurs on the server side? If so, would it possible for you to run your service using the AXIS2 server (i.e. no tomcat involved)? If you can use the AXIS2 server (NIO connector) try to change the http.socket.timeout system property (it customizes the SO_TIMEOUT setting, values in milliseconds precision, a value of 0 means no timeout). Michele On 11 Jul 2008, at 22:27, Sushil Dodake wrote: MIchele, my tomcat already hav the connection time out value bery high Connector port=8090 protocol=HTTP/1.1 connectionTimeout=2 redirectPort=8443 / any other guess? reagrss, Sush On Fri, Jul 11, 2008 at 4:23 AM, Michele Mazzucco [EMAIL PROTECTED] wrote: It looks like a problem with tomcat. Open $CATALINA_HOME/conf/ server.xml and try to change the value for connectionTimeout for the Connector you're using. Michele p.s. E-mails like this one should be sent to axis-user, not axis-dev. On 10 Jul 2008, at 19:31, Sushil Dodake wrote: HI all, i am getting this socket time out error while unmarshalling the XML. i am not able to get figure out the reason. could it be because of the memory issue? can anybody help here? 2008-07-09 01:01:40,362 [http-8082-34] ERROR com.XXX.service.rebate.RebateServiceImpl - There was an error when unmarshalling request XML org.apache.axiom.om.OMException: java.lang.RuntimeException: [was class java.net.SocketTimeoutException] Read timed out at org.apache.axiom.om.impl.builder.StAXOMBuilder.next (StAXOMBuilder.java:239) at org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling (OMElementImpl.java:265) at org.apache.axiom.om.impl.traverse.OMChildElementIterator.next (OMChildElementIterator.java:104) at com.XXX.service.rebate.RebateServiceImpl.extractInvoices (RebateServiceImpl.java:163) at com.XXX.service.rebate.RebateServiceImpl.generateRebates (RebateServiceImpl.java:74) at sun.reflect.GeneratedMethodAccessor920.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.axis2.receivers.RawXMLINOutMessageReceiver.invokeBusinessLo gic(RawXMLINOutMessageReceiver.java:97) at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusi nessLogic(AbstractInOutSyncMessageReceiver.java:42) 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.util.RESTUtil.invokeAxisEngine (RESTUtil.java:125) at org.apache.axis2.transport.http.util.RESTUtil.processXMLRequest (RESTUtil.java:78) at org.apache.axis2.transport.http.AxisServlet $RestRequestProcessor.processXMLRequest(AxisServlet.java:788) at org.apache.axis2.transport.http.AxisServlet.doPost (AxisServlet.java:193) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process (Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol $Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run (JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.RuntimeException: [was class java.net.SocketTimeoutException] Read timed out at com.ctc.wstx.util.ExceptionUtil.throwRuntimeException (ExceptionUtil.java:18) at com.ctc.wstx.sr.StreamScanner.throwLazyError(StreamScanner.java: 706) at com.ctc.wstx.sr.BasicStreamReader.safeFinishToken (BasicStreamReader.java:3655) at com.ctc.wstx.sr.BasicStreamReader.getText (BasicStreamReader.java:809) at org.apache.axiom.om.impl.builder.StAXBuilder.createOMText (StAXBuilder.java:245) at org.apache.axiom.om.impl.builder.StAXBuilder.createOMText (StAXBuilder.java:216) at org.apache.axiom.om.impl.builder.StAXOMBuilder.next (StAXOMBuilder.java:179) ... 29 more Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at org.apache.coyote.http11.InternalInputBuffer.fill
Re: Socket time out exception
It looks like a problem with tomcat. Open $CATALINA_HOME/conf/ server.xml and try to change the value for connectionTimeout for the Connector you're using. Michele p.s. E-mails like this one should be sent to axis-user, not axis-dev. On 10 Jul 2008, at 19:31, Sushil Dodake wrote: HI all, i am getting this socket time out error while unmarshalling the XML. i am not able to get figure out the reason. could it be because of the memory issue? can anybody help here? 2008-07-09 01:01:40,362 [http-8082-34] ERROR com.XXX.service.rebate.RebateServiceImpl - There was an error when unmarshalling request XML org.apache.axiom.om.OMException: java.lang.RuntimeException: [was class java.net.SocketTimeoutException] Read timed out at org.apache.axiom.om.impl.builder.StAXOMBuilder.next (StAXOMBuilder.java:239) at org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling (OMElementImpl.java:265) at org.apache.axiom.om.impl.traverse.OMChildElementIterator.next (OMChildElementIterator.java:104) at com.XXX.service.rebate.RebateServiceImpl.extractInvoices (RebateServiceImpl.java:163) at com.XXX.service.rebate.RebateServiceImpl.generateRebates (RebateServiceImpl.java:74) at sun.reflect.GeneratedMethodAccessor920.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.axis2.receivers.RawXMLINOutMessageReceiver.invokeBusinessLo gic(RawXMLINOutMessageReceiver.java:97) at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusi nessLogic(AbstractInOutSyncMessageReceiver.java:42) 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.util.RESTUtil.invokeAxisEngine (RESTUtil.java:125) at org.apache.axis2.transport.http.util.RESTUtil.processXMLRequest (RESTUtil.java:78) at org.apache.axis2.transport.http.AxisServlet $RestRequestProcessor.processXMLRequest(AxisServlet.java:788) at org.apache.axis2.transport.http.AxisServlet.doPost (AxisServlet.java:193) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process (Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol $Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run (JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.RuntimeException: [was class java.net.SocketTimeoutException] Read timed out at com.ctc.wstx.util.ExceptionUtil.throwRuntimeException (ExceptionUtil.java:18) at com.ctc.wstx.sr.StreamScanner.throwLazyError(StreamScanner.java: 706) at com.ctc.wstx.sr.BasicStreamReader.safeFinishToken (BasicStreamReader.java:3655) at com.ctc.wstx.sr.BasicStreamReader.getText (BasicStreamReader.java:809) at org.apache.axiom.om.impl.builder.StAXBuilder.createOMText (StAXBuilder.java:245) at org.apache.axiom.om.impl.builder.StAXBuilder.createOMText (StAXBuilder.java:216) at org.apache.axiom.om.impl.builder.StAXOMBuilder.next (StAXOMBuilder.java:179) ... 29 more Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at org.apache.coyote.http11.InternalInputBuffer.fill (InternalInputBuffer.java:716) at org.apache.coyote.http11.InternalInputBuffer $InputStreamInputBuffer.doRead(InternalInputBuffer.java:746) at org.apache.coyote.http11.filters.ChunkedInputFilter.readBytes (ChunkedInputFilter.java:243) at org.apache.coyote.http11.filters.ChunkedInputFilter.parseCRLF (ChunkedInputFilter.java:326) at org.apache.coyote.http11.filters.ChunkedInputFilter.doRead (ChunkedInputFilter.java:128) at org.apache.coyote.http11.InternalInputBuffer.doRead (InternalInputBuffer.java:675) at org.apache.coyote.Request.doRead(Request.java:428) at org.apache.catalina.connector.InputBuffer.realReadBytes (InputBuffer.java:298) at
Re: How to use HTTPConstants.REUSE_HTTP_CLIENT
Hi Masaki, what about the second response?, Did your client received it? I'm asking it because HttpClient 3 does not use pipelining and so the 3rd request will be sent only after receiving the 2nd response. Michele On 26 Jun 2008, at 09:30, Uno Masaki wrote: Hi axis users, I'm creating SOAP client using Axis2 1.4 kernel. I'd like to to re-use HttpClient instance by setting HTTPContants.REUSE_HTTP_CLIENT of Options instance to true, like this. Options options = new Options(); optiosn.setProperty(HTTPContants.REUSE_HTTP_CLIENT, Boolean.TRUE); ServiceClient client = new ServiceClient(); client.setOptions(options); OMElement resopnse = client.sendReceive(...); I confirmed that only one HttpClient instance was created for request from same ServiceClient. However, my application freezed at third sendReceive(), the third HTTP request was not sent. Does anyone know what's wrong with this? Please tell me right setting. Best Regards, Masaki Uno. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to use HTTPConstants.REUSE_HTTP_CLIENT
OK, then try to call serviceClient.cleanupTransport() when just after sendReceive(). Michele On 26 Jun 2008, at 10:04, Uno Masaki wrote: Hi Michele, Thank you for quick reply. My client received 2nd response. My application always stalls at 3rd request. I forgot to show my environment. - JDK 5u15 - Axis2 1.4 - ran from Eclipse 3.3.2 Regards, Masaki --- Michele Mazzucco [EMAIL PROTECTED] wrote: Hi Masaki, what about the second response?, Did your client received it? I'm asking it because HttpClient 3 does not use pipelining and so the 3rd request will be sent only after receiving the 2nd response. Michele On 26 Jun 2008, at 09:30, Uno Masaki wrote: Hi axis users, I'm creating SOAP client using Axis2 1.4 kernel. I'd like to to re-use HttpClient instance by setting HTTPContants.REUSE_HTTP_CLIENT of Options instance to true, like this. Options options = new Options(); optiosn.setProperty(HTTPContants.REUSE_HTTP_CLIENT, Boolean.TRUE); ServiceClient client = new ServiceClient(); client.setOptions(options); OMElement resopnse = client.sendReceive(...); I confirmed that only one HttpClient instance was created for request from same ServiceClient. However, my application freezed at third sendReceive(), the third HTTP request was not sent. Does anyone know what's wrong with this? Please tell me right setting. Best Regards, Masaki Uno. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to use HTTPConstants.REUSE_HTTP_CLIENT
Masaki, I ran out of options, I haven't used Axis2 1.4 yet. Can you please try with Axis2 1.3? It might be helpful to post all the relevant client code (i.e. which options you set). Michele On 26 Jun 2008, at 11:15, Uno Masaki wrote: Hi Michele, I added serviceClient.cleanupTransport() just after sendReceive() like this. OMElement resopnse = serviceClient.sendReceive(body); serviceClient.cleanupTransport(); // processing response OMException was thrown as below after my client received 2nd response. Exception in thread main org.apache.axiom.om.OMException: java.lang.RuntimeException: [was class java.io.IOException] Attempted read on closed stream. at org.apache.axiom.om.impl.builder.StAXOMBuilder.next (StAXOMBuilder.java:249) at org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling (OMElementImpl.java:307) at org.apache.axiom.om.impl.traverse.OMChildElementIterator.next (OMChildElementIterator.java:104) .. snipped Regards, Masaki --- Michele Mazzucco [EMAIL PROTECTED] wrote: OK, then try to call serviceClient.cleanupTransport() when just after sendReceive(). Michele On 26 Jun 2008, at 10:04, Uno Masaki wrote: Hi Michele, Thank you for quick reply. My client received 2nd response. My application always stalls at 3rd request. I forgot to show my environment. - JDK 5u15 - Axis2 1.4 - ran from Eclipse 3.3.2 Regards, Masaki --- Michele Mazzucco [EMAIL PROTECTED] wrote: Hi Masaki, what about the second response?, Did your client received it? I'm asking it because HttpClient 3 does not use pipelining and so the 3rd request will be sent only after receiving the 2nd response. Michele On 26 Jun 2008, at 09:30, Uno Masaki wrote: Hi axis users, I'm creating SOAP client using Axis2 1.4 kernel. I'd like to to re-use HttpClient instance by setting HTTPContants.REUSE_HTTP_CLIENT of Options instance to true, like this. Options options = new Options(); optiosn.setProperty(HTTPContants.REUSE_HTTP_CLIENT, Boolean.TRUE); ServiceClient client = new ServiceClient(); client.setOptions(options); OMElement resopnse = client.sendReceive(...); I confirmed that only one HttpClient instance was created for request from same ServiceClient. However, my application freezed at third sendReceive(), the third HTTP request was not sent. Does anyone know what's wrong with this? Please tell me right setting. Best Regards, Masaki Uno. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2 : Socket connection reset
Julio, might it be because of a socket/connection timeout? A stack trace or something similar would be useful. Michele On 5 Jun 2008, at 18:01, juliocest wrote: Dear users! I have been a problem in testing web services with Apache Axis2. I am sending a file with 100MB using SWA (Soap with Attachments). My scenario is described below: web service client eth1 | GATEWAY | eth2 -- web service provider I use a gateway in order to control the bandwidth beteween client and service provider. Sometimes a I have a connection reset. Someone knows this problem? I hope some help. Thanks. Julio Sao Carlos - SP - Brazil -- View this message in context: http://www.nabble.com/Axis2-%3A- Socket-connection-reset-tp17674945p17674945.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2: How to send a message with JMS asynchronously and get an acknowledgement
Ines, I don't think the JMS spec. allow you to achieve that goal. JMS is supposed to be reliable, and messages (i.e. the queue) are stored at the JMS provider site, not at the final destination. About Axis2, there is no difference (apart from the transport configuration) whether you use TCP, JMS, HTTP or whatever. Michele On 6 Jun 2008, at 09:20, Ines Dannehl wrote: Hi, I want to send a SOAP – message with an Axis2 client asynchronously via JMS. I’d like to get an acknowlegdement when the message is put into the JMS queue. How can I achieve this? Please help! Best regards! Ines - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AXIS2_HOME environment variable
Adriana, your AXIS2_HOME should be C:\axis2-1.2\axis2-1.2, with no bin at the end. Michele On 6 Jun 2008, at 09:38, Adriana Verdejo wrote: Hi, I have a problem with the AXIS2_HOME environment variable. When I try to run wsdl2java or anyother I get an error saying that the AXIS2_HOME environment variable is not defined correctly. I have defined that as AXIS2_HOME = C:\axis2-1.2\axis2-1.2\bin. Do you know what is wrong? Should I copy my axis2-1.2 folder in any other specific place? Thanks and regards Adriana. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2 w/ HttpClient
Jeff, you have to set the SOAP action (required by WS-addressing) as specified into your services.xml. Michele On 2 Jun 2008, at 17:01, Jeff Garrett wrote: Sorry, the response didn't paste right and I over-looked it. Response is The endpoint reference (EPR) for the Operation not found is /axis2/services/MY_SERVICE and the WSA Action = null Does something need to be put in the request, either the SOAP header or the HTTP header identifying the operation? Shouldn't Axis2 be able to figure that out from what is in the SOAP body? Thanks. Jeff On Mon, Jun 2, 2008 at 11:47 AM, Jeff Garrett [EMAIL PROTECTED] wrote: Hi all. I have deployed my web services using Axis2, from an in-house servet design. I understand I can use Wsdl2Java and create a stub client for each service, but I have an existing test package that I would like to keep as-is. In this test package, I use the Apache HttpClient to send my request (my custom SOAP Header, request in SOAP body) to the server. It worked perfect for my previous design, but not working well for Axis2. I am having trouble sending the request from my test package using HttpClient to my Axis2 service. I always get the same response . I can use JMeter to send the request and it works fine (the SOAPAction is always set to the operation name). But it does not work when I use the existing test package as-is. Does something else need to be set somewhere? Has anyone else seen/solved this? I am sorry if this is posted somewhere. I took a quick look, but didn't see anything that solved my problem. Thanks. Jeff - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Axis2 1.4 not Thread safe (possible bug)
Chuck, some components are thread safe, others are not (for example ServiceClient). Can you please post some relevant code? Thanks, Michele On Fri, 2008-05-23 at 16:23 -0400, Chuck Brinkman wrote: Michele, In my opinion Axis2 is not thread safe. We are seeing responses of one type that have the body of another type. For example say we have serviceA that returns a serviceAresponse and serviceB that returns a serviceBresponse. We have captured the network packet and see things like serviceAresponse that has the data from a serviceBresponse. It appears to be related to a flash client we have. The flash client will open a connection and can send a second request using the original connection before it gets a response or a timeout from the first request. I'm still working on the issue but it is in some way good to know that I'm not the only one thinking Axis2 has a thread safety issue. Chuck From: [EMAIL PROTECTED] Subject: Re: Axis2 1.4 not Thread safe (possible bug) Date: Fri, 23 May 2008 17:56:54 +0100 To: axis-user@ws.apache.org I can only see a NullPointerException. Michele On 23 May 2008, at 14:31, sultanat wrote: Please see one of the errors we got during multiple threaded processing: The requests sent were valid SOAP xmls sent via AXIS client. org.apache.axis2.AxisFault at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) at com.atx.tokenserver.token.TokenServiceMessageReceiverInOut.fromOM (TokenServiceMessageReceiverInOut.java:149) at com.atx.tokenserver.token.TokenServiceMessageReceiverInOut.invokeBusin essLogic(TokenServiceMessageReceiverInOut.java:43) at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusiness Logic(AbstractInOutMessageReceiver.java:40) at org.apache.axis2.receivers.AbstractMessageReceiver.receive (AbstractMessageReceiver.java:100) at org.apache.axis2.engine.AxisEngine.receive (AxisEngine.java:176) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequ est(HTTPTransportUtils.java:275) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java: 131) 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:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java:214) 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:825) at org.apache.coyote.http11.Http11Protocol $Http11ConnectionHandler.processConnection(Http11Protocol.java:731) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket (PoolTcpEndpoint.java:526) 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) Caused by: java.lang.NullPointerException at org.apache.axis2.databinding.utils.ConverterUtil.convertToString (ConverterUtil.java:337) at com.atx.tokenserver.token.xsd.DealerCode_type1.setDealerCode_type0 (DealerCode_type1.java:59) at com.atx.tokenserver.token.xsd.DealerCode_type1$Factory.parse (DealerCode_type1.java:417) at com.atx.tokenserver.token.xsd.NewTokenRequest$Factory.parse (NewTokenRequest.java:525) at com.atx.tokenserver.token.TokenServiceMessageReceiverInOut.fromOM (TokenServiceMessageReceiverInOut.java:136) ... 22 more Michele Mazzucco-2 wrote: Please post more information (stack trace, etc.) Michele On 22 May 2008, at 23:24, sultanat wrote: People, I created a web service using Axis2 1.4 and was accessing it with multiple Threads. It appears that the SOAP xml during parsing was getting corrupt and throwing all kinds of exceptons like invalid XML, expecting some other element etc... I tried the same test with same web service using Axis2 1.3 but I did not get
Re: Axis2 1.4 not Thread safe (possible bug)
Please post more information (stack trace, etc.) Michele On 22 May 2008, at 23:24, sultanat wrote: People, I created a web service using Axis2 1.4 and was accessing it with multiple Threads. It appears that the SOAP xml during parsing was getting corrupt and throwing all kinds of exceptons like invalid XML, expecting some other element etc... I tried the same test with same web service using Axis2 1.3 but I did not get any of the errors mentioned above. Is there anything which I am missing or is this a bug in Axis2 1.4 ? -- View this message in context: http://www.nabble.com/Axis2-1.4-not- Thread-safe-%28possible-bug%29-tp17414803p17414803.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: is ServiceClient thread-safe?
ServiceClient is not thread safe. I suggest you to share the configuration context among several ServiceClient instances instead, where each ServiceClient is private to each thread. Instantiating ServiceClient objects is not very expensive -- ConfigurationContext objects are. Michele On 23 May 2008, at 00:15, Alexis Midon wrote: Hi all, I'd like to know if I can share one ServiceClient instance among several threads. Thanks, Alexis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2 1.4 not Thread safe (possible bug)
I can only see a NullPointerException. Michele On 23 May 2008, at 14:31, sultanat wrote: Please see one of the errors we got during multiple threaded processing: The requests sent were valid SOAP xmls sent via AXIS client. org.apache.axis2.AxisFault at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) at com.atx.tokenserver.token.TokenServiceMessageReceiverInOut.fromOM (TokenServiceMessageReceiverInOut.java:149) at com.atx.tokenserver.token.TokenServiceMessageReceiverInOut.invokeBusin essLogic(TokenServiceMessageReceiverInOut.java:43) at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusiness Logic(AbstractInOutMessageReceiver.java:40) at org.apache.axis2.receivers.AbstractMessageReceiver.receive (AbstractMessageReceiver.java:100) at org.apache.axis2.engine.AxisEngine.receive (AxisEngine.java:176) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequ est(HTTPTransportUtils.java:275) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java: 131) 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:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java:214) 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:825) at org.apache.coyote.http11.Http11Protocol $Http11ConnectionHandler.processConnection(Http11Protocol.java:731) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket (PoolTcpEndpoint.java:526) 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) Caused by: java.lang.NullPointerException at org.apache.axis2.databinding.utils.ConverterUtil.convertToString (ConverterUtil.java:337) at com.atx.tokenserver.token.xsd.DealerCode_type1.setDealerCode_type0 (DealerCode_type1.java:59) at com.atx.tokenserver.token.xsd.DealerCode_type1$Factory.parse (DealerCode_type1.java:417) at com.atx.tokenserver.token.xsd.NewTokenRequest$Factory.parse (NewTokenRequest.java:525) at com.atx.tokenserver.token.TokenServiceMessageReceiverInOut.fromOM (TokenServiceMessageReceiverInOut.java:136) ... 22 more Michele Mazzucco-2 wrote: Please post more information (stack trace, etc.) Michele On 22 May 2008, at 23:24, sultanat wrote: People, I created a web service using Axis2 1.4 and was accessing it with multiple Threads. It appears that the SOAP xml during parsing was getting corrupt and throwing all kinds of exceptons like invalid XML, expecting some other element etc... I tried the same test with same web service using Axis2 1.3 but I did not get any of the errors mentioned above. Is there anything which I am missing or is this a bug in Axis2 1.4 ? -- View this message in context: http://www.nabble.com/Axis2-1.4-not- Thread-safe-%28possible-bug%29-tp17414803p17414803.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Axis2-1.4-not- Thread-safe-%28possible-bug%29-tp17414803p17425676.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2 : ClientAbortException: java.net.SocketException
It was clear that the problem occurs because of the network (you are facing a SocketException, aren't you?), but without the configuration details we won't be able to help. In you previous email you said that you have 6 Axis2 services deployed on Tomcat 6. If so, please post your axis2.xml file. Michele p.s. The aim of punctuation marks is to make a sentence clear. Please use them -- it's very difficult to understand what you are trying to say. On 12 May 2008, at 19:40, Sushil Dodake wrote: My client application is built using Spring + java services Wrapper which is deployed in JAVA6 env.(http://wrapper.tanukisoftware.org/ doc/english/integrate-simple-win.html) the client application is a batch controller application. the java wrapper calls the controller class which in turn calls a Axis 1.3 service A deployed on some other machin. after getting the response XML from service A to the batch controller it gives call to service B deployed with service A in tomcat 6 in java 6 env. in the Tomcat 6 container there are 4 more services along with A and B. the B service is a central service which inturns gives call to remaining 4 services and then returns to batch controller. but once B completes process it just returns null to Batch controller. then the batch contoller updates DB tables to update the status of the process. If all the services and the batch controller are deployed on same machine then it does not cause any problem. but over the network it gives follwing error. On Mon, May 12, 2008 at 5:55 AM, Michele Mazzucco [EMAIL PROTECTED] wrote: Can you post more information about your configuration (both server and client)? Thanks, Michele On 9 May 2008, at 19:45, Sushil Dodake wrote: Hi all, i have 6 Axis2 1.3 services deployed in a Tomcat 6 continer and on JAVA 6 env. out of the 6 services 1 is a central controller which calls other 5 services for diffrent data. there is one application which is deployed on some other machin which calls central controller service and one more service in the container. the data which flows across the services and the independent application is big XMLs it seems that if the application is running continously for 2-4 hrs... after 2 hrs roughly.. it thows an exception. the scenario is not reproducible every time (lets say for same data so definately its not a data issue.) I am really confused. any thoughts on this? org.apache.axis2.AxisFault at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) at org.apache.axis2.transport.http.ApplicationXMLFormatter.writeTo (ApplicationXMLFormatter.java:116) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.sendUsingOu tputStream(CommonsHTTPTransportSender.java:294) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke (CommonsHTTPTransportSender.java:211) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396) at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusi nessLogic(AbstractInOutSyncMessageReceiver.java:45) 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.util.RESTUtil.invokeAxisEngine (RESTUtil.java:125) at org.apache.axis2.transport.http.util.RESTUtil.processXMLRequest (RESTUtil.java:78) at org.apache.axis2.transport.http.AxisServlet $RestRequestProcessor.processXMLRequest(AxisServlet.java:788) at org.apache.axis2.transport.http.AxisServlet.doPost (AxisServlet.java:193) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process (Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol $Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run (JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) Caused by: com.ctc.wstx.exc.WstxIOException: null at com.ctc.wstx.sw.BaseStreamWriter.writeCharacters (BaseStreamWriter.java:511) at org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeCharacters (MTOMXMLStreamWriter.java:196
Re: Axis2 : Socket connection reset
Sushil, we need more info. Please post the chunk of code where you set the options. The configuration file (axis2.xml) would be useful too. Michele p.s. I think your request should have been sent to axis-user, not axis-dev. On 8 May 2008, at 22:52, Sushil Dodake wrote: Hi all, I am calling a service from a client application. my webservice is on some other server which i am calling through a load balancer. i get following error and the occurance of this is quite unprdictable. The connection is reset and the strange part is it is not thrown as an exception @ client which falsely trigger other actions on my client after the service call. can somebody help me to understand this behavior and any solution for this. 2008-05-08 16:15:40,675 [DefaultQuartzScheduler_Worker-9] DEBUG org.apache.commons.httpclient.methods.EntityEnclosingMethod - Request body sent 2008-05-08 16:20:42,997 [DefaultQuartzScheduler_Worker-9] DEBUG org.apache.commons.httpclient.HttpMethodDirector - Closing the connection. 2008-05-08 16:20:43,028 [DefaultQuartzScheduler_Worker-9] DEBUG org.apache.commons.httpclient.HttpMethodDirector - Method retry handler returned false. Automatic recovery will not be attempted 2008-05-08 16:20:43,028 [DefaultQuartzScheduler_Worker-9] DEBUG org.apache.commons.httpclient.HttpConnection - Releasing connection back to connection manager. 2008-05-08 16:20:43,044 [DefaultQuartzScheduler_Worker-9] DEBUG org.apache.commons.httpclient.MultiThreadedHttpConnectionManager - Freeing connection, hostConfig=HostConfiguration[host=http://qa- webservices.XX.com] 2008-05-08 16:20:43,075 [DefaultQuartzScheduler_Worker-9] DEBUG org.apache.commons.httpclient.util.IdleConnectionHandler - Adding connection at: 1210281643075 2008-05-08 16:20:43,091 [DefaultQuartzScheduler_Worker-9] DEBUG org.apache.commons.httpclient.MultiThreadedHttpConnectionManager - Notifying no-one, there are no waiting threads 2008-05-08 16:20:43,106 [DefaultQuartzScheduler_Worker-9] INFO org.apache.axis2.transport.http.HTTPSender - Unable to sendViaPost to url[http://qa-webservices.XX.com/axis2/services/RebateService_v1_0] java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:168) 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:77) at org.apache.commons.httpclient.HttpParser.readLine (HttpParser.java:105) at org.apache.commons.httpclient.HttpConnection.readLine (HttpConnection.java:1115) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager $HttpConnectionAdapter.readLine (MultiThreadedHttpConnectionManager.java:1373) at org.apache.commons.httpclient.HttpMethodBase.readStatusLine (HttpMethodBase.java:1832) at org.apache.commons.httpclient.HttpMethodBase.readResponse (HttpMethodBase.java:1590) at org.apache.commons.httpclient.HttpMethodBase.execute (HttpMethodBase.java:995) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry (HttpMethodDirector.java:397) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod (HttpMethodDirector.java:170) at org.apache.commons.httpclient.HttpClient.executeMethod (HttpClient.java:396) at org.apache.commons.httpclient.HttpClient.executeMethod (HttpClient.java:346) at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod (AbstractHTTPSender.java:520) at org.apache.axis2.transport.http.HTTPSender.sendViaPost (HTTPSender.java:191) at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java: 77) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessag eWithCommons(CommonsHTTPTransportSender.java:327) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke (CommonsHTTPTransportSender.java:206) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396) at org.apache.axis2.description.OutInAxisOperationClient.send (OutInAxisOperation.java:374) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl (OutInAxisOperation.java:211) at org.apache.axis2.client.OperationClient.execute (OperationClient.java:163) at org.apache.axis2.client.ServiceClient.sendReceive (ServiceClient.java:528) at org.apache.axis2.client.ServiceClient.sendReceive (ServiceClient.java:508) at com.XX.rebateautomation.service.RebateServiceImpl.generateRebates (RebateServiceImpl.java:83) at com.XX.rebateautomation.RebateAutomationControllerImpl.generateRebates (RebateAutomationControllerImpl.java:132) 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
Re: Axis + Jetty disable chunking
There's another parameter you can set: parameter name=Transfer-Encodingchunked/parameter You can also enable/disable it at runtime: options.setProperty(HTTPConstants.CHUNKED, Boolean.FALSE); Michele On 28 Apr 2008, at 12:14, Krystian Szczesny wrote: Hi, I’ve got an Axis2 1.3 deployed on Jetty 6.1.5. I’m having some performance issues with this setup: response is chunked and time between the chunks is about 60-70ms[!!!]. I wanted to disable the chunking so I’ve set my axis2.xml file to look like this: transportSender name=http class=org.apache.axis2.transport.http.CommonsHTTPTransportSender parameter name=PROTOCOL locked=trueHTTP/1.0/parameter /transportSender transportSender name=https class=org.apache.axis2.transport.http.CommonsHTTPTransportSender parameter name=PROTOCOL locked=trueHTTP/1.0/parameter /transportSender Unfortunately I am still receiving HTTP/1.1 chunked responses. Have you got any idea about what to set to disable chunking? I am not using Axis2 client so forget about setting the options :/ I spoke with folks from Jetty support mailing list and they’ve told me, that Jetty will send chunked response if it doesn’t know the content length at the time of sending the message. If the settings I’ve pasted above were working, then I guess Jetty would receive a full message so it should know the content length. Am I missing something here? Best regards, Krystian P.s. Sorry for the crap below, I can’t disable it for external messages -- Krystian Szczesny This e-mail and any attachments are confidential and may also be legally privileged and/or copyright material of Intec Telecom Systems PLC (or its affiliated companies). If you are not an intended or authorised recipient of this e-mail or have received it in error, please delete it immediately and notify the sender by e-mail. In such a case, reading, reproducing, printing or further dissemination of this e-mail or its contents is strictly prohibited and may be unlawful. Intec Telecom Systems PLC does not represent or warrant that an attachment hereto is free from computer viruses or other defects. The opinions expressed in this e-mail and any attachments may be those of the author and are not necessarily those of Intec Telecom Systems PLC. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Axis + Jetty disable chunking
On Mon, 2008-04-28 at 15:27 +0100, Krystian Szczesny wrote: Hi Michele, I am trying to disable Chunking, so parameter name=Transfer-Encodingchunked/parameter won't help. I've been googling for other values of Transfer-Encoding parameter but found none. From HTTP 1.1 specs I can see that this parameter is for chunking only. Indeed by commenting out that line chunking should be disabled. Where can I set options.setProperty(HTTPConstants.CHUNKED, Boolean.FALSE); ? I've looked through my auto generated stubs and there are no options there. Should be something similar to: stub.getOptions().setProperty(...) Correct me if I'm wrong but isn't this for client only? Yes, it is. http://wso2.org/library/209 http://wso2.org/library/230 Like I've said earlier, I can't change client code. Try to check this out http://www.mail-archive.com/axis-user@ws.apache.org/msg17471.html Finally, as last options, you can try this: - Let your service implement the Lifecycle interface - inside the init(ServiceContext context) method: context.getConfigurationContext.setProperty(HTTPConstants.CHUNKED,Boolean.FALSE); Michele Best regards, Krystian -Original Message- From: Michele Mazzucco [mailto:[EMAIL PROTECTED] Sent: 28 April 2008 15:07 To: axis-user@ws.apache.org Subject: Re: Axis + Jetty disable chunking There's another parameter you can set: parameter name=Transfer-Encodingchunked/parameter You can also enable/disable it at runtime: options.setProperty(HTTPConstants.CHUNKED, Boolean.FALSE); Michele On 28 Apr 2008, at 12:14, Krystian Szczesny wrote: Hi, I've got an Axis2 1.3 deployed on Jetty 6.1.5. I'm having some performance issues with this setup: response is chunked and time between the chunks is about 60-70ms[!!!]. I wanted to disable the chunking so I've set my axis2.xml file to look like this: transportSender name=http class=org.apache.axis2.transport.http.CommonsHTTPTransportSender parameter name=PROTOCOL locked=trueHTTP/1.0/parameter /transportSender transportSender name=https class=org.apache.axis2.transport.http.CommonsHTTPTransportSender parameter name=PROTOCOL locked=trueHTTP/1.0/parameter /transportSender Unfortunately I am still receiving HTTP/1.1 chunked responses. Have you got any idea about what to set to disable chunking? I am not using Axis2 client so forget about setting the options :/ I spoke with folks from Jetty support mailing list and they've told me, that Jetty will send chunked response if it doesn't know the content length at the time of sending the message. If the settings I've pasted above were working, then I guess Jetty would receive a full message so it should know the content length. Am I missing something here? Best regards, Krystian P.s. Sorry for the crap below, I can't disable it for external messages -- Krystian Szczesny This e-mail and any attachments are confidential and may also be legally privileged and/or copyright material of Intec Telecom Systems PLC (or its affiliated companies). If you are not an intended or authorised recipient of this e-mail or have received it in error, please delete it immediately and notify the sender by e-mail. In such a case, reading, reproducing, printing or further dissemination of this e-mail or its contents is strictly prohibited and may be unlawful. Intec Telecom Systems PLC does not represent or warrant that an attachment hereto is free from computer viruses or other defects. The opinions expressed in this e-mail and any attachments may be those of the author and are not necessarily those of Intec Telecom Systems PLC. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis + Jetty disable chunking
On 28 Apr 2008, at 16:46, Krystian Szczesny wrote: Thanks, Krystian -Original Message- From: Michele Mazzucco [mailto:[EMAIL PROTECTED] Sent: 28 April 2008 15:43 To: axis-user@ws.apache.org Subject: RE: Axis + Jetty disable chunking On Mon, 2008-04-28 at 15:27 +0100, Krystian Szczesny wrote: Hi Michele, I am trying to disable Chunking, so parameter name=Transfer-Encodingchunked/parameter won't help. I've been googling for other values of Transfer-Encoding parameter but found none. From HTTP 1.1 specs I can see that this parameter is for chunking only. Indeed by commenting out that line chunking should be disabled. [Krystian Szczesny] But client receives chunked response, so it's not it Where can I set options.setProperty(HTTPConstants.CHUNKED, Boolean.FALSE); ? I've looked through my auto generated stubs and there are no options there. Should be something similar to: stub.getOptions().setProperty(...) [Krystian Szczesny] No there's nothing like that. My methods are called with xml message as a parameter (OMElement). So you're using a ServiceClient object. Dind't you say you're not using it? options.setProperty(...); sender.setOptions(options); Correct me if I'm wrong but isn't this for client only? Yes, it is. http://wso2.org/library/209 http://wso2.org/library/230 Like I've said earlier, I can't change client code. Try to check this out http://www.mail-archive.com/axis-user@ws.apache.org/msg17471.html Finally, as last options, you can try this: - Let your service implement the Lifecycle interface - inside the init(ServiceContext context) method: context.getConfigurationContext.setProperty (HTTPConstants.CHUNKED,Boole an.FALSE); [Krystian Szczesny] Sorry Michele, but are you serious about that? It looks a little bit like guessing... I am going to try it, but am very sceptical... I've used the Lifecycle interface, I've customized the configuration context, but I've never tried to enable/disable the chunking at runtime. Michele Thanks anyway Michele Best regards, Krystian -Original Message- From: Michele Mazzucco [mailto:[EMAIL PROTECTED] Sent: 28 April 2008 15:07 To: axis-user@ws.apache.org Subject: Re: Axis + Jetty disable chunking There's another parameter you can set: parameter name=Transfer-Encodingchunked/parameter You can also enable/disable it at runtime: options.setProperty(HTTPConstants.CHUNKED, Boolean.FALSE); Michele On 28 Apr 2008, at 12:14, Krystian Szczesny wrote: Hi, I've got an Axis2 1.3 deployed on Jetty 6.1.5. I'm having some performance issues with this setup: response is chunked and time between the chunks is about 60-70ms[!!!]. I wanted to disable the chunking so I've set my axis2.xml file to look like this: transportSender name=http class=org.apache.axis2.transport.http.CommonsHTTPTransportSender parameter name=PROTOCOL locked=trueHTTP/1.0/parameter /transportSender transportSender name=https class=org.apache.axis2.transport.http.CommonsHTTPTransportSender parameter name=PROTOCOL locked=trueHTTP/1.0/parameter /transportSender Unfortunately I am still receiving HTTP/1.1 chunked responses. Have you got any idea about what to set to disable chunking? I am not using Axis2 client so forget about setting the options :/ I spoke with folks from Jetty support mailing list and they've told me, that Jetty will send chunked response if it doesn't know the content length at the time of sending the message. If the settings I've pasted above were working, then I guess Jetty would receive a full message so it should know the content length. Am I missing something here? Best regards, Krystian P.s. Sorry for the crap below, I can't disable it for external messages -- Krystian Szczesny This e-mail and any attachments are confidential and may also be legally privileged and/or copyright material of Intec Telecom Systems PLC (or its affiliated companies). If you are not an intended or authorised recipient of this e-mail or have received it in error, please delete it immediately and notify the sender by e-mail. In such a case, reading, reproducing, printing or further dissemination of this e-mail or its contents is strictly prohibited and may be unlawful. Intec Telecom Systems PLC does not represent or warrant that an attachment hereto is free from computer viruses or other defects. The opinions expressed in this e-mail and any attachments may be those of the author and are not necessarily those of Intec Telecom Systems PLC. --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED
Re: Axis Thread Pool - thread interrupted
1 - I would use another thread pool. The axis2 thread pool is used to serve requests, not to accomplish other tasks. 2 - The thread is not interrupted, your code is wrong, If you read the documentation of Object.wait() you'll realize that you *must* own the lock on that object before calling wait. 3 - catching Exception is not good, use its subclasses instead. Michele On 25 Apr 2008, at 11:07, LIE Jorund wrote: Hi All. I am currently working on an multitreaded axis service. From my interface class I invoke a thread that processes the request. The thread is executed in the the thread pool obtained from the Root Context of the service.The thread starts OK, but if it is suspended in a wait() it is immediately interrupted. Do anyone know why this may happen? I can see that there is a threadKeepAliveTime configurable in the axis2.xml, but the default interval seems to be long enough (180s). Below are some snippets of code for illustration: The execution of the thread in the interface class: CmsThread cmsThread = new CmsThread(); ThreadFactory threadFactory = MessageContext.getCurrentMessageContext().getRootContext ().getThreadPool(); threadFactory.execute(cmsThread); The run method of the cmsThread class: public void run() { try{ logger.info (waiting...); wait(1); logger.info (end); } catch (Exception e) { logger.info (interrupted); } } Thanks for any input Jørund Lie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SendReceive and Response Time
If you use sendReceive() the client thread will block until the response has been received. This means that the t2 must be taken before printing the result. Michele On 17 Apr 2008, at 13:25, juliocest wrote: Dear members, I have a doubt with regarding to give a response time from a sendReceive call in a service client. My client code is presented below: -- - import java.io.File; import org.apache.axiom.om.OMElement; import org.apache.axiom.soap.SOAPBody; import org.apache.axiom.soap.SOAPEnvelope; import org.apache.axis2.Constants; import org.apache.axis2.addressing.EndpointReference; import org.apache.axis2.client.Options; import org.apache.axis2.client.ServiceClient; import org.apache.axis2.context.OperationContext; import org.apache.axis2.transport.http.*; public class Client { public static OMElement response; public static OperationContext opContext = null; public static long t1 = 0; public static long t2 = 0; public static void main(String[] args) { try { AppTime time = new AppTime(); Arquivo arquivo = new Arquivo(); Message soapMessage = new Message(); Options options = new Options(); ServiceClient client = new ServiceClient(); EndpointReference remotob = new EndpointReference(http://arara.sytes.net:8080/axis2/services/ Avaliacao); options.setProperty(HTTPConstants.SO_TIMEOUT, new Integer (36)); options.setTransportInProtocol(Constants.TRANSPORT_HTTP); options.setProperty(HTTPConstants.MC_GZIP_REQUEST, Boolean.TRUE); options.setProperty(HTTPConstants.MC_ACCEPT_GZIP, Boolean.TRUE); options.setProperty(HTTPConstants.MC_GZIP_RESPONSE, Boolean.TRUE); options.setTo(remotob); client.setOptions(options); OMElement m = soapMessage.messageTeste(Teste); t1 = System.nanoTime(); OMElement response = client.sendReceive(m); System.out.println(response); t2 = System.nanoTime(); System.out.println(Response Time = +Double.toString((double)(t2-t1) / 10)); } catch (Exception e) { //(XMLStreamException e) { System.out.println(e.toString()); } } } -- - I will explain what is the aim of the service. The client will send a message to service provider. The service provider will give the message and parser a xml file from disk. The xml parsed from disk will be sent to client. Then the client will show the xml with came from the server. My doubt is: Where I get the initial and final time in order to obtain a response time? Why am I aksking it? What seems to me that Axis2 only show the response needed by the client. Then if I get (t2) after System.out.println(response); I will have the real response time, because I am receiving a response. Dou you agree with me? I would be grateful to receive a response as soon as possible. Júlio -- View this message in context: http://www.nabble.com/SendReceive-and- Response-Time-tp16743797p16743797.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to disconnect from ServiceClient connection
Try with ServiceClient.cleanup(). Michele On 16 Apr 2008, at 13:21, lekkie wrote: Hi guys, after sending a transaction with ServiceClient.sendreceive(OMElement); How can I break off this connection? I use Axis2 1.1.1. Rgds, -- View this message in context: http://www.nabble.com/How-to- disconnect-from-ServiceClient-connection-tp16721261p16721261.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2 Client Engage Module
Try to globally engage the module (i.e. from axis2.xml). Michele On 6 Apr 2008, at 20:51, A Sunley wrote: We're experiencing java.net.SocketException: Too many open files exceptions on the server. And I think it might be down to the module files in the temp folder. When I list the open files for the tomcat process (lsof -a -p 28938) it throws up many, many lines like the following: java28938 user 573r REG8,237572 353018 /home/user/tomcat/apache-tomcat-webserver/temp/ axis226631addressing-1.2.mar Is this abnormal behavior for Axis2? Any advice would be greatly appreciated. Regards, Alan. A Sunley wrote: Greetings Axis users, We are accessing a web service from within a jsp/servlet webapp within a Tomcat container, using Axis2-1.2. We also make use of the Rampart security module. I want to clarify how we should 'engage' module. At the moment we do this for every request to the webservice using: client.engageModule(new QName(rampart)); Do we have to do this for each and every request or can we delpoy the module once for the web application? I am noticing that for each request the following is printed to the console: Deploying module: rampart-1.2. In addition the Tomcat/temp folder is chocker full of axis264rampart-1.2.mar files (each with a different number). The temp file is now approaching one gigabyte in size. Is this normal behavior? I'm concerned that I might have not configured the Axis2 client correctly and may potentially cause performance issues. Is this that case? Regards, Alan. -- View this message in context: http://www.nabble.com/Axis2-Client- Engage-Module-tp16475749p16528660.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Transport Out Error
Aneel, you're probably missing this instruction: options.setTransportInProtocol(Constants.TRANSPORT_HTTP); Michele On 1 Apr 2008, at 16:48, [EMAIL PROTECTED] wrote: Hi, I am using Axis2 v 1.3 as a web service client. I am getting the following error. I have searched the archives and found some other people had this issue and it was due to missing dependent jars from classpath especially, commons-httpclient.jar. But, I verified that I have commons-httpclient-3.0.1.jar in my classpath. Axis fault: org.apache.axis2.AxisFault: Transport out has not been set at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java: 383) at org.apache.axis2.description.OutInAxisOperationClient.send (OutInAxisOperation.java:374) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl (OutInAxisOperation.java:211) at org.apache.axis2.client.OperationClient.execute (OperationClient.java:163) I looked at the line where the above error is being thrown from Axis2. It seems like it is thrown when messageContext.getTransportOut() returns a null object. I have enabled debug logging for axis2 and it is showing that the Axis client I am using is getting the configuration from axis2_default.xml in axis2-kernal.jar. And, the default configuration file has the HTTP and HTTPS transport Outs set. The log files even show that this information is getting parsed. Most importantly, the EAR deployment which packages my client as MDB, works fine in development…but won’t work in QA. This leads me to believe there is a configuration issue. But, I cannot narrow down the issue. All the dependent jars are packaged as part of the EAR in APP-INF/lib/. I will appreciate any help or ideas to resolve this issue. Thanks, Aneel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Capture custom exception
You can use new AxisFault.makeFault(customException) on the server side and retrieve your custom fault with axisFault.getCause() Michele On 24 Mar 2008, at 19:47, Adrián Cuartero wrote: Hi all I keep trying throwing a custom exception and i've read there's a problem capturing this exception in the client side. Anyone knows how to capture this custom exceptions? Thanks Enviado desde Correo Yahoo! Disfruta de una bandeja de entrada más inteligente.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Transport out has not been set
Henry, have you set the transport into the options? options.setTransportInProtocol(Constants.TRANSPORT_JMS); On 22 Mar 2008, at 18:49, charlesgoddard wrote: Any other reasons besides missing dependencies, misconfigured config file, or missing modules that this would happen? All of this is correct in a small test app I'm trying to use to test REST requests and JSON. henry human wrote: Hi In the past two days I am trying to implement a simple Echo service binding jms. As long as I run my client I get error : org.apache.axis2.AxisFault: Transport out has not been set at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:383) at org.apache.axis2.description.OutInAxisOperationClient.send (OutInAxisOperation.java:374) .. the soap address which I bind to is: jms:/myqueue? transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactoryjava.n aming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContext Factoryjava.naming.provider.url=tcp://localhost:61616); It seems that axis above in url does not recognize the jms to bind a protocol. I did a test, changing the url to something like http://localhost..; and I see that axis could get the Http TransportSender very well and client application builds a connection to the service! I read several comments in web where the similar error has been reported and has been solved adding missing jars. In my case I have all jars in the classpath! It seems that the TransportSender could not be initiated. I will be appreciated for your help Machen Sie Yahoo! zu Ihrer Startseite. Los geht's: http://de.yahoo.com/set - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Transport-out- has-not-been-set-tp15119631p16225961.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Configure HttpClient used with Axis with custom socket factory to check for almost-expired SSL certs?
http://hc.apache.org/httpclient-3.x/sslguide.html http://cephas.net/blog/2007/10/02/using-a-custom-socket-factory-with-httpclient/ http://wso2.org/library/1646 It might be worth reusing the same ServiceClient across different calls. To do so set it to the ConfigurationContext -- see AsyncService2Test.java HTH, Michele On Tue, 2008-03-18 at 08:54 -0700, Karr, David wrote: I want to determine whether it's possible to configure the HttpClient used with Axis with a custom socket factory that can log an event if the SSL cert sent from a server will be expiring in N days. I understand most of the details of the socket factory, but I don't know if Axis provides the hooks I need to set the socket factory on the HttpClient instance. Can someone comment on this? This is relevant to both the old and new Axis. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Configure HttpClient used with Axis with custom socket factoryto check for almost-expired SSL certs?
David, I don't know about Axis1, you were saying that it is relevant to both the old and new Axis. Michele On 18 Mar 2008, at 16:48, Karr, David wrote: Is this possible to do in Axis (not Axis2)? The only interface I can see for this that's like settings properties in the Axis2 message context is the CommonsHTTPClientProperties interface, which only has a limited defined set of properties it can set. -Original Message- From: Michele Mazzucco [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 18, 2008 9:13 AM To: axis-user@ws.apache.org Subject: Re: Configure HttpClient used with Axis with custom socket factoryto check for almost-expired SSL certs? http://hc.apache.org/httpclient-3.x/sslguide.html http://cephas.net/blog/2007/10/02/using-a-custom-socket-factor y-with-httpclient/ http://wso2.org/library/1646 It might be worth reusing the same ServiceClient across different calls. To do so set it to the ConfigurationContext -- see AsyncService2Test.java HTH, Michele On Tue, 2008-03-18 at 08:54 -0700, Karr, David wrote: I want to determine whether it's possible to configure the HttpClient used with Axis with a custom socket factory that can log an event if the SSL cert sent from a server will be expiring in N days. I understand most of the details of the socket factory, but I don't know if Axis provides the hooks I need to set the socket factory on the HttpClient instance. Can someone comment on this? This is relevant to both the old and new Axis. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: set timeout for web service
Henry, this question has already been asked several times -- the problem is on the client side, not the server side. Options.setTimeout will do the job. Michele On 17 Mar 2008, at 22:35, henry human wrote: Hi I have a web service created using WSDL2Java. Because the clients’ requests sometime need more than 30 seconds to be done, it is required to increase the timeout in the web service. Increasing the timeout in the axis2.xml did not help and the service still breaks after 30 seconds with an error: read timeout! How could I set the timeout in the web service? Thanks Henry E-Mails jetzt auf Ihrem Handy. www.yahoo.de/go - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom HTTP transport setting
This is a bit off topic, but have you tried the non blocking transport? Michele On 14 Mar 2008, at 10:12, westpine wrote: Hi want to use OaklandHTTPTransportSender2 which has to substitute CommonsHTTPTransportSender. But I do not know how to enable it. So question is - how to change default sender? -- View this message in context: http://www.nabble.com/Custom-HTTP- transport-setting-tp16047723p16047723.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: sendReceive() catching NullPointerException
Deepal, No, it's not. According to the error message the error occurs before, at res = client.sendReceive(method); Michele On 11 Mar 2008, at 04:55, Deepal Jayasinghe wrote: where did you get the NPE , I mean the line ? I think that should be here return res.getFirstElement().getText (); So probably res.getFirstElement() should be null. If you can send the request via the TCP monitor and see what happen. Thank you, Deepal Hi, I'm new to Axis2. As my first Axis2 web service project I followed the quickstart in creating/deploying a web service and writing a client to access the service. Here's my client code: -web service client--- public class CSXStub { private String query; public CSXStub() { this.query = null; } public void setQuery(String qry) { this.query = qry; } public String getQuery(){ // create request payload OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace ns = fac.createOMNamespace(http://ws.apache.org/axis2/xsd;, ns1); OMElement method = fac.createOMElement(Search, ns); OMElement value = fac.createOMElement(query, ns); value.addChild(fac.createOMText(value, query)); method.addChild(value); // create service client ServiceClient client; OMElement res; try { client = new ServiceClient(); } catch (AxisFault e) { return Failed creating Axis2 client object: + e.getMessage(); } // create option object Options opts = new Options(); //setting target end point reference EndpointReference epr = new EndpointReference( http://localhost:8080/axis2/services/CSXService;); opts.setTo(epr); //Setting action, and which can be found from the wsdl of the service opts.setAction(urn:echo); */ client.setOptions(opts); // invoking service try { res = client.sendReceive(method); } catch (AxisFault e) { return Failed calling CSX web service: + e.getMessage(); } return res.getFirstElement().getText(); } } - - I imported this class into a JSP page. In invoking that JSP the last catch fired and returned the error message: Failed calling CSX web service: java.lang.NullPointerException What did I go wrong here? Thanks, Yigang - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AXIS2 1.3 Response Problem
Saroj, when I've asked you to provide more details I meant details. What does your service do? What is the configuration? How are you accessing the web service? Is there any database involved? What happens after restarting the server?, does it work fine forever or you have to restart it every few hours? Are you sure that the problem is the service and not the database (if any) or the client? Michele On 10 Mar 2008, at 05:58, saroj samal wrote: Dear Michele, I have developed 6 services having different EPR. Each service has one operation. I have deployed same services with a single sing application with AXIS2 1.3. My web server is Sun One Web Server 6.1. (no https port) JDK version is 1.6. According to our client feedback the response of all service are taking 30 to 40 secs after certain period or certain no of hits. After getting complain i am restarting the web server. It solves the problem. After that the response time is 2 to 6 sec only. We are getting 200 request per a day for all services. I am not sure here it is a problem of web server or any configuration required for AXIS2. if any thing more you want, please clarify me. Regards Saroj --- Michele Mazzucco [EMAIL PROTECTED] wrote: On 7 Mar 2008, at 12:29, saroj samal wrote: Pelase suggest me. Please provide more details. Michele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ __ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http:// mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2 Sockets
Daniel, this sounds wrong to me. Can you post your client code please? Michele On 10 Mar 2008, at 19:13, Daniel Silva wrote: Hi, Thank you all for the provided help. In fact, the incoming message has a ws-addressing reply-to EPR pointing to another listener. This is the problem. When the response MessageContext is created, this values are automatically fielded. If I set To as: newMsgContext.setTo(new EndpointReference (http://www.w3.org/2005/08/addressing/anonymous;)); it works. Thank you. Best regards, Daniel Silva Software Developer [EMAIL PROTECTED] www.alert-online.com ALERT Life Sciences Computing, S.A. Edifício Lake Towers Rua Daciano Baptista Marques, n.º 245, Bloco D 4400-617 Vila Nova de Gaia Tel.: +351 22 832 89 80/1 Fax: +351 22 832 89 82 This e-mail is privileged, confidential and contains private information. Any reading, retention, distribution or copying of this communication by any person other than its intended recipient is prohibited. -Original Message- From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] Sent: domingo, 9 de Março de 2008 20:33 To: axis-user@ws.apache.org Subject: Re: Axis2 Sockets oh.. Sorry for the confusion.. That's exactly what I meant. .Using the same socket is the default.. ~Thilina On Fri, Mar 7, 2008 at 11:34 AM, Michele Mazzucco [EMAIL PROTECTED] wrote: Why? If the MEP is in/out with no complications (i.e. synchronous and with no redirections) you should be able to use the same socket. Michele On 7 Mar 2008, at 16:11, Thilina Gunarathne wrote: AFAIK it's the default behavior in case of request/response interaction - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AXIS2 1.3 Response Problem
On 7 Mar 2008, at 12:29, saroj samal wrote: Pelase suggest me. Please provide more details. Michele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2 Sockets
Why? If the MEP is in/out with no complications (i.e. synchronous and with no redirections) you should be able to use the same socket. Michele On 7 Mar 2008, at 16:11, Thilina Gunarathne wrote: AFAIK it's the default behavior in case of request/response interaction - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Caching ServiceClient or AxisService or AxisConfiguration
You can reuse the same ServiceClient instance (but be careful -- it's not thread safe) or create new instances by reusing the same ConfigurationContext (if you use commons-sender be sure to cache the HttpClient and use a custom connection manager). How to set up the second case is shown here [1]. Michele [1] http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/ integration/test/org/apache/axis2/async/AsyncService2Test.java On 6 Mar 2008, at 22:41, jaybytez wrote: I have not run a profiler to determine if there are any points within my Axis usage that I could optimize through caching...so this question is a shot in the dark. Is there any recommended thread-safe caching to improve performance and overhead? Would that be done through caching something like the AxisService/AxisConfiguration and creating new ServiceClients from these cached service and configuration or can I cache the ServiceClient? I am not totally sure what types of resources are attached to these objects and if caching them would cause any issues. Any recommendations? Thanks, Jay -- View this message in context: http://www.nabble.com/Caching- ServiceClient-or-AxisService-or-AxisConfiguration- tp15885373p15885373.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: The endpoint reference (EPR) for the Operation not found
Try to call options.setAction(sendAttachment); Michele On 5 Mar 2008, at 12:39, Capilla Castillo, Esther wrote: This is the SOAP request: soapenv:Reason − soapenv:Text The endpoint reference (EPR) for the Operation not found is /axis2/ services/WsVerDocumento and the WSA Action = null /soapenv:Text /soapenv:Reason -Mensaje original- De: Deepal jayasinghe [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de marzo de 2008 13:37 Para: axis-user@ws.apache.org Asunto: Re: The endpoint reference (EPR) for the Operation not found Any possibility of looking at the SOAP request (including HTTP headers) , then I may be able to give you an answer. Thank you, Deepal Hi all! I'm deployed a WebServices in beaWeblogic 9.2, but I've a problem, when I invoke the Services I obtain the follow message: The endpoint reference (EPR) for the Operation not found is /axis2/services/WsVerDocumento and the WSA Action = null I think that my problem is in the services.xml, but I don't know. My services.xml is that: service name=WsVerDocumento Description Este WebService permita bajar un documento del repositorio de Documentum /Description parameter name=enableMTOMtrue/parameter parameter name=ServiceClass locked=falsecom.soluziona.documental.servicios2.verdocumento.VerDo cum entoWebService/parameter operation name=sendAttachment actionMappingsendAttachment/actionMapping messageReceiver class=org.apache.axis2.receivers.RawXMLINOutMessageReceiver / /operation /service Thanks! Esther - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: The endpoint reference (EPR) for the Operation not found
What about the protocol (I'm not expert with MTOM -- so I might be wrong)? options.setTransportInProtocol(Constants.TRANSPORT_HTTP); // set according to the protocol in operation This is needed (if MTOM is not used), otherwise an error like cannot infer transport... occurs. Michele On 5 Mar 2008, at 12:51, Capilla Castillo, Esther wrote: In my client I have the following code to set options: Options options = new Options(); options.setTo(targetEPR); options.setAction(sendAttachment); options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE); options.setTimeOutInMilliSeconds(1); ServiceClient sender = new ServiceClient(); sender.setOptions(options); -Mensaje original- De: Michele Mazzucco [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de marzo de 2008 13:45 Para: axis-user@ws.apache.org Asunto: Re: The endpoint reference (EPR) for the Operation not found Try to call options.setAction(sendAttachment); Michele On 5 Mar 2008, at 12:39, Capilla Castillo, Esther wrote: This is the SOAP request: soapenv:Reason − soapenv:Text The endpoint reference (EPR) for the Operation not found is /axis2/ services/WsVerDocumento and the WSA Action = null /soapenv:Text /soapenv:Reason -Mensaje original- De: Deepal jayasinghe [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de marzo de 2008 13:37 Para: axis-user@ws.apache.org Asunto: Re: The endpoint reference (EPR) for the Operation not found Any possibility of looking at the SOAP request (including HTTP headers) , then I may be able to give you an answer. Thank you, Deepal Hi all! I'm deployed a WebServices in beaWeblogic 9.2, but I've a problem, when I invoke the Services I obtain the follow message: The endpoint reference (EPR) for the Operation not found is /axis2/services/WsVerDocumento and the WSA Action = null I think that my problem is in the services.xml, but I don't know. My services.xml is that: service name=WsVerDocumento Description Este WebService permita bajar un documento del repositorio de Documentum /Description parameter name=enableMTOMtrue/parameter parameter name=ServiceClass locked=falsecom.soluziona.documental.servicios2.verdocumento.VerD o cum entoWebService/parameter operation name=sendAttachment actionMappingsendAttachment/actionMapping messageReceiver class=org.apache.axis2.receivers.RawXMLINOutMessageReceiver / /operation /service Thanks! Esther - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: The endpoint reference (EPR) for the Operation not found
I think the message you create is wrong. The target operation is defined as sendAttachment in services.xml, but it's called uploadFile into your SOAP request. Michele On 5 Mar 2008, at 15:30, Capilla Castillo, Esther wrote: Hi Michele, the chunk of code: targetEPR = new EndpointReference(rb.getString(UrlVerDocumento)); System.out.println(URL del WebService: +rb.getString (UrlVerDocumento)); // Definimos el endPoint y la acción Options options = new Options(); options.setTo(targetEPR); options.setAction(sendAttachment); options.setTransportInProtocol(Constants.TRANSPORT_HTTP); options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE); // Incrementamos el timeout por si el fichero fuese grande options.setTimeOutInMilliSeconds(1); ServiceClient sender = new ServiceClient(); sender.setOptions(options); OMElement echoElement = getOMElement(); OMElement MTOMEle = (OMElement) sender.sendReceive(echoElement); And the method getOMElement... public static OMElement getOMElement( ) { OMFactory fac = OMAbstractFactory.getOMFactory(); //OMNamespace omNs = fac.createOMNamespace(http:// baratz.pruebas.com, mtom); OMNamespace omNs = fac.createOMNamespace(http:// verdocumento.servicios2.documental.soluziona.com/xsd, mtom); OMElement xmlData = fac.createOMElement(xml, omNs); OMElement echoElement = fac.createOMElement(uploadFile, omNs); StringBuffer xml = new StringBuffer(); xml.append(result); xmlData.setText(xml.toString()); echoElement.addChild(xmlData); return echoElement; } -Mensaje original- De: Michele Mazzucco [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de marzo de 2008 16:18 Para: axis-user@ws.apache.org Asunto: Re: The endpoint reference (EPR) for the Operation not found Can you post the chunk of code which sends the message? Michele On 5 Mar 2008, at 15:00, Capilla Castillo, Esther wrote: When I invoke my webservice from the client, the exception is: org.apache.axis2.AxisFault: unknown at org.apache.axis2.description.OutInAxisOperationClient.execute (OutInAxisOperation.java:287) at org.apache.axis2.client.ServiceClient.sendReceive (ServiceClient.java:457) at org.apache.axis2.client.ServiceClient.sendReceive (ServiceClient.java:399) at clientesAxis2.VerDocumentoCliente.main(VerDocumentoCliente.java: 91) -Mensaje original- De: Michele Mazzucco [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de marzo de 2008 14:33 Para: axis-user@ws.apache.org Asunto: Re: The endpoint reference (EPR) for the Operation not found What about the protocol (I'm not expert with MTOM -- so I might be wrong)? options.setTransportInProtocol(Constants.TRANSPORT_HTTP); // set according to the protocol in operation This is needed (if MTOM is not used), otherwise an error like cannot infer transport... occurs. Michele On 5 Mar 2008, at 12:51, Capilla Castillo, Esther wrote: In my client I have the following code to set options: Options options = new Options(); options.setTo(targetEPR); options.setAction(sendAttachment); options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE); options.setTimeOutInMilliSeconds(1); ServiceClient sender = new ServiceClient(); sender.setOptions(options); -Mensaje original- De: Michele Mazzucco [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de marzo de 2008 13:45 Para: axis-user@ws.apache.org Asunto: Re: The endpoint reference (EPR) for the Operation not found Try to call options.setAction(sendAttachment); Michele On 5 Mar 2008, at 12:39, Capilla Castillo, Esther wrote: This is the SOAP request: soapenv:Reason − soapenv:Text The endpoint reference (EPR) for the Operation not found is /axis2/ services/WsVerDocumento and the WSA Action = null /soapenv:Text /soapenv:Reason -Mensaje original- De: Deepal jayasinghe [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de marzo de 2008 13:37 Para: axis-user@ws.apache.org Asunto: Re: The endpoint reference (EPR) for the Operation not found Any possibility of looking at the SOAP request (including HTTP headers) , then I may be able to give you an answer. Thank you, Deepal Hi all! I'm deployed a WebServices in beaWeblogic 9.2, but I've a problem, when I invoke the Services I
Re: The endpoint reference (EPR) for the Operation not found
Esther, I'm running out of resources... - Try to set the target operation into the EPR (i.e. http://localhost: 8080/axis2/services/Service?Operation) - Try to define a simple echo operation and call it in order to understand what's wrong. Michele On 5 Mar 2008, at 16:04, Capilla Castillo, Esther wrote: Ok, I did the change but I get the same message... In the services.xml appear: operation name=sendAttachment actionMappingurn:downloadFile/actionMapping messageReceiver class=org.apache.axis2.receivers.RawXMLINOutMessageReceiver / /operation And the client: Options options = new Options(); options.setTo(targetEPR); options.setAction(urn:downloadFile); options.setTransportInProtocol(Constants.TRANSPORT_HTTP); options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE); // Incrementamos el timeout por si el fichero fuese grande options.setTimeOutInMilliSeconds(1); ServiceClient sender = new ServiceClient(); sender.setOptions(options); Esther -Mensaje original- De: Michele Mazzucco [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de marzo de 2008 16:47 Para: axis-user@ws.apache.org Asunto: Re: The endpoint reference (EPR) for the Operation not found I think the message you create is wrong. The target operation is defined as sendAttachment in services.xml, but it's called uploadFile into your SOAP request. Michele On 5 Mar 2008, at 15:30, Capilla Castillo, Esther wrote: Hi Michele, the chunk of code: targetEPR = new EndpointReference(rb.getString(UrlVerDocumento)); System.out.println(URL del WebService: +rb.getString (UrlVerDocumento)); // Definimos el endPoint y la acción Options options = new Options(); options.setTo(targetEPR); options.setAction(sendAttachment); options.setTransportInProtocol(Constants.TRANSPORT_HTTP); options.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE); // Incrementamos el timeout por si el fichero fuese grande options.setTimeOutInMilliSeconds(1); ServiceClient sender = new ServiceClient(); sender.setOptions(options); OMElement echoElement = getOMElement(); OMElement MTOMEle = (OMElement) sender.sendReceive(echoElement); And the method getOMElement... public static OMElement getOMElement( ) { OMFactory fac = OMAbstractFactory.getOMFactory(); //OMNamespace omNs = fac.createOMNamespace(http:// baratz.pruebas.com, mtom); OMNamespace omNs = fac.createOMNamespace(http:// verdocumento.servicios2.documental.soluziona.com/xsd, mtom); OMElement xmlData = fac.createOMElement(xml, omNs); OMElement echoElement = fac.createOMElement(uploadFile, omNs); StringBuffer xml = new StringBuffer(); xml.append(result); xmlData.setText(xml.toString()); echoElement.addChild(xmlData); return echoElement; } -Mensaje original- De: Michele Mazzucco [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de marzo de 2008 16:18 Para: axis-user@ws.apache.org Asunto: Re: The endpoint reference (EPR) for the Operation not found Can you post the chunk of code which sends the message? Michele On 5 Mar 2008, at 15:00, Capilla Castillo, Esther wrote: When I invoke my webservice from the client, the exception is: org.apache.axis2.AxisFault: unknown at org.apache.axis2.description.OutInAxisOperationClient.execute (OutInAxisOperation.java:287) at org.apache.axis2.client.ServiceClient.sendReceive (ServiceClient.java:457) at org.apache.axis2.client.ServiceClient.sendReceive (ServiceClient.java:399) at clientesAxis2.VerDocumentoCliente.main(VerDocumentoCliente.java: 91) -Mensaje original- De: Michele Mazzucco [mailto:[EMAIL PROTECTED] Enviado el: miércoles, 05 de marzo de 2008 14:33 Para: axis-user@ws.apache.org Asunto: Re: The endpoint reference (EPR) for the Operation not found What about the protocol (I'm not expert with MTOM -- so I might be wrong)? options.setTransportInProtocol(Constants.TRANSPORT_HTTP); // set according to the protocol in operation This is needed (if MTOM is not used), otherwise an error like cannot infer transport... occurs. Michele On 5 Mar 2008, at 12:51, Capilla Castillo, Esther wrote: In my client I have
Re: [Axis2] 1.4 Release / Blockers
Dims, there are more than 400 bugs still open. I would try to fix some of them before the next release. It doesn't make a lot of sense to me to release a new version with so many bugs. You provide nightly builds to experiment the last stuff, don't you?, If so, official releases should be stable. Michele On 3 Mar 2008, at 14:14, Davanum Srinivas wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Folks, As of this moment, the # of blockers are down to 1. If you think/ know of any bug that needs to be absolutely fixed in Axis2 before the release, please add a comment in JIRA or mark them as blockers. If there are issues that we should try to target, please set the target as 1.4 and add a comment in JIRA saying that we should try to fix it. Hopefully all of us can chip in to deal with those issues and those in the Critical bucket as well. thanks, dims -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (Cygwin) iD8DBQFHzAe2gNg6eWEDv1kRAjU/AKD7RqkIrbTDCHqDliWlufZn0R1drgCg5dfH jz1ptTD5O3zCo+lSoxT4epI= =/6FQ -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] Get the ball rolling on the stalled 1.4 Release
On 28 Feb 2008, at 17:07, Davanum Srinivas wrote: I was looking at the JIRA a bit. There are 4 blockers as of right now. What about the ones marked as 'critical'? Michele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] Get the ball rolling on the stalled 1.4 Release
On 28 Feb 2008, at 18:06, Davanum Srinivas wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Critical - Need to be fixed if time permits, release can go on even if this bug is not fixed. OK. Then I'd like to see many of the bugs marked as critical fixed, especially the ones related to transports (NIO in particular... and don't tell me they are from Synapse ;)). Michele - -- dims Michele Mazzucco wrote: | | On 28 Feb 2008, at 17:07, Davanum Srinivas wrote: | | I was looking at the JIRA a bit. There are 4 blockers as of right now. | | | What about the ones marked as 'critical'? | | Michele | | - | To unsubscribe, e-mail: [EMAIL PROTECTED] | For additional commands, e-mail: [EMAIL PROTECTED] | -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (Cygwin) iD8DBQFHxvgYgNg6eWEDv1kRAr6mAKDfAZpCRW0X13npkkHHN2aZWISnaACbBh7R oKYOEOl47yvQ2fiBMYHA9/c= =Nrxi -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] Moving Axis2 code base into JDK 1.5
+1 for Java 5. Dennis, what works with java 1.4 will work (faster) with java 5 as well. The old code doesn't need to be touched. If we just keep waiting we will update to Java 5 when Java 7 is out! Michele On 27 Feb 2008, at 06:28, Dennis Sosnoski wrote: From my experiences working with companies moving to Axis2 I'd say about half are still using JDK 1.4. If they can't count on that support being maintained I think they're likely to reconsider adopting Axis2. Just having an archived 1.3 version of Axis2 won't be enough to convince them, unless they're already committed to moving to JDK 1.5 anyway. It seems like bad timing to give up one of the major advantages of Axis2 over the Glassfish code and such. So -0 from me. - Dennis -- Dennis M. Sosnoski SOA and Web Services in Java Axis2 Training and Consulting http://www.sosnoski.com - http://www.sosnoski.co.nz Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117 Deepal Jayasinghe wrote: Hi all , As you might remember few months back Glen asked the list about moving to JDK 1.5 and I think we got very positive feedback. So I thought of asking again and change the code to work with JDK 1.5 . The main reason behind sending this mail is due the dependency we have for annogen. As I can see that project is dead one and there is no development happening so I do not think it is a good idea to depend on such a project. In the meantime we have few issues with annogen as well ,first inner class problem (I have locally fixed that both in Axis2 and Annogen will commit soon) , second is the final class problem. I request a release from annogen after the changes that Dims did , but we did not get any reply so far. We all know that we get better annotation support from JDK 1.5 so if we move to JDK 1.5 we can get rid of the annogen dependency and we can just use JDK for annotation processing. Other problem is generic support , if we move to JDK 1.5 we can have generic support in our POJOs. In addition to POJO we can get better concurrent support in JDK 1.5 as well. So if we move to JDK 1.5 we can get better support , and I do not think any advantage of staying in 1.4 . If some user want to use Axis2 in JDK 1.4 they can happily use Axis2 1.3 , which is very stable version and working fine in 1.4 and 1.5. If any user or developers have any concern on moving to JDK 1.5 please come forward and reply to this mail that will be very helpful for all of us. Here is my +1 for moving to JDK 1.5 to and release Axis2 1.4 in JDK 1.5 Thank you, Deepal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] Moving Axis2 code base into JDK 1.5
Paul, if so, I think release 1.4 should focus on fixing as much bugs as possible, not on adding new features. Michele On 27 Feb 2008, at 09:59, Paul Fremantle wrote: My concern is that I think there has been a lot of work done since the last release and the JDK1.4 users will never get that benefit. So - how about this for a plan. Release 1.4 asap based on JDK 1.4. Then do a 1.5 release *very soon after* based on JDK1.5. That way even the names match :) Axis2 1.4 can be the last major release targeted at JDK1.4. As for 1.5, I think in fact it will need two releases - once we start targeting 1.5 we probably need to do some 1.5 specific stuff like generating code that takes advantage of generics. Paul On Wed, Feb 27, 2008 at 6:28 AM, Dennis Sosnoski [EMAIL PROTECTED] wrote: From my experiences working with companies moving to Axis2 I'd say about half are still using JDK 1.4. If they can't count on that support being maintained I think they're likely to reconsider adopting Axis2. Just having an archived 1.3 version of Axis2 won't be enough to convince them, unless they're already committed to moving to JDK 1.5 anyway. It seems like bad timing to give up one of the major advantages of Axis2 over the Glassfish code and such. So -0 from me. - Dennis -- Dennis M. Sosnoski SOA and Web Services in Java Axis2 Training and Consulting http://www.sosnoski.com - http://www.sosnoski.co.nz Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117 Deepal Jayasinghe wrote: Hi all , As you might remember few months back Glen asked the list about moving to JDK 1.5 and I think we got very positive feedback. So I thought of asking again and change the code to work with JDK 1.5 . The main reason behind sending this mail is due the dependency we have for annogen. As I can see that project is dead one and there is no development happening so I do not think it is a good idea to depend on such a project. In the meantime we have few issues with annogen as well ,first inner class problem (I have locally fixed that both in Axis2 and Annogen will commit soon) , second is the final class problem. I request a release from annogen after the changes that Dims did , but we did not get any reply so far. We all know that we get better annotation support from JDK 1.5 so if we move to JDK 1.5 we can get rid of the annogen dependency and we can just use JDK for annotation processing. Other problem is generic support , if we move to JDK 1.5 we can have generic support in our POJOs. In addition to POJO we can get better concurrent support in JDK 1.5 as well. So if we move to JDK 1.5 we can get better support , and I do not think any advantage of staying in 1.4 . If some user want to use Axis2 in JDK 1.4 they can happily use Axis2 1.3 , which is very stable version and working fine in 1.4 and 1.5. If any user or developers have any concern on moving to JDK 1.5 please come forward and reply to this mail that will be very helpful for all of us. Here is my +1 for moving to JDK 1.5 to and release Axis2 1.4 in JDK 1.5 Thank you, Deepal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I'm having a problem using Axis2. What should I do?
Your code is wrong. Options options = new Options(); options.set... serviceClient.setOptions(options); On 20 Feb 2008, at 05:33, 雪莉 焦 wrote: Hi all: I publish a web service using axis2 on websphere 5.1, also i can invoke this webservice correctly with java application client ,but i cann't ivoke this webservice in jsp with the same client code.The client code is: .. RPCServiceClient serviceClient = new RPCServiceClient(); Options options = serviceClient.getOptions(); EndpointReference targetEPR = new EndpointReference (serviceURL); options.setTo(targetEPR); options.setTransportInProtocol(Constants.TRANSPORT_HTTP); .. Object[] response = serviceClient.invokeBlocking (opFindEntry,opFindEntryArgs, returnTypes); The exception in running jsp is: org.apache.axis2.AxisFault: The server failed to process the WS-Addressing header: wsa:Action [Reason]: A header representing a Message Addressing Property is not valid and the message cannot be processed [08-2-20 9:23:38:177 CST] 57fa3a39 SystemErr R at org.apache.axis2.handlers.addressing.AddressingInFaultHandler.invoke (AddressingInFaultHandler.java:114) [08-2-20 9:23:38:177 CST] 57fa3a39 SystemErr R at org.apache.axis2.engine.Phase.invoke(Phase.java:292) [08-2-20 9:23:38:177 CST] 57fa3a39 SystemErr R at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212) [08-2-20 9:23:38:177 CST] 57fa3a39 SystemErr R at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:132) [08-2-20 9:23:38:177 CST] 57fa3a39 SystemErr R at org.apache.axis2.description.OutInAxisOperationClient.handleResponse (OutInAxisOperation.java:336) [08-2-20 9:23:38:177 CST] 57fa3a39 SystemErr R at org.apache.axis2.description.OutInAxisOperationClient.send (OutInAxisOperation.java:389) [08-2-20 9:23:38:177 CST] 57fa3a39 SystemErr R at org.apache.axis2.description.OutInAxisOperationClient.executeImpl (OutInAxisOperation.java:211) [08-2-20 9:23:38:177 CST] 57fa3a39 SystemErr R at org.apache.axis2.client.OperationClient.execute (OperationClient.java:163) [08-2-20 9:23:38:177 CST] 57fa3a39 SystemErr R at org.apache.axis2.client.ServiceClient.sendReceive (ServiceClient.java:528) [08-2-20 9:23:38:177 CST] 57fa3a39 SystemErr R at org.apache.axis2.client.ServiceClient.sendReceive (ServiceClient.java:508) [08-2-20 9:23:38:177 CST] 57fa3a39 SystemErr R at org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking (RPCServiceClient.java:101) Thanks in advance,zhyj. 雅虎邮箱传递新年祝福,个性贺卡送亲朋! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2 session management (yes, I know that subject is a bit worn-out)
Benoît, my guess is that the service must be configured in session scope. Michele On 18 Feb 2008, at 08:38, Benoît Smith wrote: Greetings, I'm a clear newbie to Axis2, and I'm aware that the question I'm asking has already been asked in many forms before. The thing is, none of the solutions appeared to solve my specific problem. So I'll try to be as accurate as possible. My objectives : Run some Axis2 web services on a Tomcat servlet container, and access them with a *remote* client, using session management. Server-side configuration : - Axis2 1.2 (for compatibility reasons, I have to stick with 1.2), installed as a component on a Tomcat 6.0.14 servlet container. - axis2.xml configured by default. The Addressing module seems well engaged. - The SampleService I wrote includes a 'sessionId' value in its responses. That value contains the result for sc.getServiceGroupContext().getId(), which is - I think - the value I should keep for session management. - I can access the autogenerated WSDL through an URL like: http://www.mydomain.com:8080/axis2/sampleService?wsdl Client-side configuration : - A standalone client based on Axis2 1.2. - Stubs are generated with the following command : WSDL2Java.main( new String[] { -uri, http://www.mydomain.com:8080/axis2/sampleService?wsdl;, -o, /some/output/path, -p, fr.axis2ws.test.stubs } ); - The test client sends ten requests to the service. At each loop, it tries to retrieve the 'sessionId' value from the response, then reinsert it in the header of the next request. Here is the source code : public static void main (String args[]) throws Exception { String idSession = null; for (int i = 0; i 10; i++) { SampleServicesampleServiceHttpportStub stub = new SampleServicesampleServiceHttpportStub(); stub._getServiceClient().getOptions().setManageSession (true); stub._getServiceClient().getOptions().setProperty (AddressingConstants.WS_ADDRESSING_VERSION, AddressingConstants.Final.WSA_NAMESPACE); stub._getServiceClient().engageModule (Constants.MODULE_ADDRESSING); if (idSession != null) { stub._getServiceClient() .setTargetEPR(new EndpointReference(http://www.mydomain.com:8080/axis2/ sampleService)); stub._getServiceClient() .addStringHeader( new QName( Constants.AXIS2_NAMESPACE_URI , Constants.SERVICE_GROUP_ID , Constants.AXIS2_NAMESPACE_PREFIX ) , idSession ); } GetResult gr = new GetResult(); gr.setParam(-1); GetResultResponse reponse = stub.getResult(gr); idSession = reponse.get_return().getIdSession(); } } I trust you probably guessed the result already - the tests failed. Somewhere along the way, the 'sessionId' value is lost, so the service returns a new one, which makes session management impossible. I'm pretty sure I'm missing something, but so far, I failed to see what. Any help will be greatly appreciated. Thank you ! Best regards, Benoît Smith - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AxisFault: Read Time Out
Wesley, try to call options.setProperty(HTTPConstants.SO_TIMEOUT, value); Michele On 18 Feb 2008, at 13:02, Wesley Mesquita wrote: Hi all, I trying to use the axis2 api to generate clients to my webservices, but I am getting in trouble. I got rid of my examples to minimize the possibilities to make mistakes. So I trying the examples in this site http://today.java.net/pub/a/ today/2006/12/13/invoking-web-services-using-apache-axis2.html , and i am getting this Exception tree: Exception in thread main org.apache.axis2.AxisFault: Read timed out at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) at org.apache.axis2.transport.http.HTTPSender.sendViaPost (HTTPSender.java:195) at org.apache.axis2.transport.http.HTTPSender.send (HTTPSender.java:77) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessag eWithCommons(CommonsHTTPTransportSender.java:327) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke (CommonsHTTPTransportSender.java:206) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396) at org.apache.axis2.description.OutInAxisOperationClient.send (OutInAxisOperation.java:374) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl (OutInAxisOperation.java:211) at org.apache.axis2.client.OperationClient.execute (OperationClient.java:163) at org.apache.axis2.client.ServiceClient.sendReceive (ServiceClient.java:528) at org.apache.axis2.client.ServiceClient.sendReceive (ServiceClient.java:508) at sample.axisversion.Scenario1Client.main(Scenario1Client.java: 22) Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(Unknown Source) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at org.apache.commons.httpclient.HttpParser.readRawLine (HttpParser.java:77) at org.apache.commons.httpclient.HttpParser.readLine (HttpParser.java:105) at org.apache.commons.httpclient.HttpConnection.readLine (HttpConnection.java:1115) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager $HttpConnectionAdapter.readLine (MultiThreadedHttpConnectionManager.java:1373) at org.apache.commons.httpclient.HttpMethodBase.readStatusLine (HttpMethodBase.java:1832) at org.apache.commons.httpclient.HttpMethodBase.readResponse (HttpMethodBase.java:1590) at org.apache.commons.httpclient.HttpMethodBase.execute (HttpMethodBase.java:995) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry (HttpMethodDirector.java:397) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod (HttpMethodDirector.java:170) at org.apache.commons.httpclient.HttpClient.executeMethod (HttpClient.java:396) at org.apache.commons.httpclient.HttpClient.executeMethod (HttpClient.java:346) at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod (AbstractHTTPSender.java:520) at org.apache.axis2.transport.http.HTTPSender.sendViaPost (HTTPSender.java:191) ... 10 more I tested the service in a browser and it appears to be working fine. I tried to execute the service in Tomcat 5.5 and using directly axis2server (Axis2 1.3). Anyone has any ideia, what is happening here? Thanks in advance, Wesley. -- Wesley Mesquita LIS/IC - UNICAMP [skype: wesley.mesquita] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AxisFault: Read Time Out
Try options.setTimeoutInMilliseconds() then. Michele On 18 Feb 2008, at 16:50, Wesley Mesquita wrote: What this function suppose to do? I tried it, but I am getting the same Exception tree. On Feb 18, 2008 10:17 AM, Michele Mazzucco [EMAIL PROTECTED] wrote: Wesley, try to call options.setProperty(HTTPConstants.SO_TIMEOUT, value); Michele On 18 Feb 2008, at 13:02, Wesley Mesquita wrote: Hi all, I trying to use the axis2 api to generate clients to my webservices, but I am getting in trouble. I got rid of my examples to minimize the possibilities to make mistakes. So I trying the examples in this site http://today.java.net/pub/a/ today/2006/12/13/invoking-web-services-using-apache-axis2.html , and i am getting this Exception tree: Exception in thread main org.apache.axis2.AxisFault: Read timed out at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) at org.apache.axis2.transport.http.HTTPSender.sendViaPost (HTTPSender.java:195) at org.apache.axis2.transport.http.HTTPSender.send (HTTPSender.java:77) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessag eWithCommons(CommonsHTTPTransportSender.java:327) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke (CommonsHTTPTransportSender.java:206) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396) at org.apache.axis2.description.OutInAxisOperationClient.send (OutInAxisOperation.java:374) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl (OutInAxisOperation.java:211) at org.apache.axis2.client.OperationClient.execute (OperationClient.java:163) at org.apache.axis2.client.ServiceClient.sendReceive (ServiceClient.java:528) at org.apache.axis2.client.ServiceClient.sendReceive (ServiceClient.java:508) at sample.axisversion.Scenario1Client.main(Scenario1Client.java: 22) Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(Unknown Source) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at org.apache.commons.httpclient.HttpParser.readRawLine (HttpParser.java:77) at org.apache.commons.httpclient.HttpParser.readLine (HttpParser.java:105) at org.apache.commons.httpclient.HttpConnection.readLine (HttpConnection.java:1115) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager $HttpConnectionAdapter.readLine (MultiThreadedHttpConnectionManager.java:1373) at org.apache.commons.httpclient.HttpMethodBase.readStatusLine (HttpMethodBase.java:1832) at org.apache.commons.httpclient.HttpMethodBase.readResponse (HttpMethodBase.java:1590) at org.apache.commons.httpclient.HttpMethodBase.execute (HttpMethodBase.java:995) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry (HttpMethodDirector.java:397) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod (HttpMethodDirector.java:170) at org.apache.commons.httpclient.HttpClient.executeMethod (HttpClient.java:396) at org.apache.commons.httpclient.HttpClient.executeMethod (HttpClient.java:346) at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod (AbstractHTTPSender.java:520) at org.apache.axis2.transport.http.HTTPSender.sendViaPost (HTTPSender.java:191) ... 10 more I tested the service in a browser and it appears to be working fine. I tried to execute the service in Tomcat 5.5 and using directly axis2server (Axis2 1.3). Anyone has any ideia, what is happening here? Thanks in advance, Wesley. -- Wesley Mesquita LIS/IC - UNICAMP [skype: wesley.mesquita] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Wesley Mesquita LIS/IC - UNICAMP [skype: wesley.mesquita] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AxisFault: Read Time Out
How long do your requests take (on average) to execute?, I think (but maybe I'm wrong) that those timeout are set to 30 seconds by default. Michele On 18 Feb 2008, at 17:27, Wesley Mesquita wrote: I got the same, i tried huge values and nothing has worked. It seems to me that there is something wrong in the axis2 installation (or in the services deployment), but I don´t know where to looking for since the services appear to be working fine when I invoke them at a browser. Thanks for trying to help. On Feb 18, 2008 2:13 PM, Michele Mazzucco [EMAIL PROTECTED] wrote: Try options.setTimeoutInMilliseconds() then. Michele On 18 Feb 2008, at 16:50, Wesley Mesquita wrote: What this function suppose to do? I tried it, but I am getting the same Exception tree. On Feb 18, 2008 10:17 AM, Michele Mazzucco [EMAIL PROTECTED] wrote: Wesley, try to call options.setProperty(HTTPConstants.SO_TIMEOUT, value); Michele On 18 Feb 2008, at 13:02, Wesley Mesquita wrote: Hi all, I trying to use the axis2 api to generate clients to my webservices, but I am getting in trouble. I got rid of my examples to minimize the possibilities to make mistakes. So I trying the examples in this site http://today.java.net/pub/a/ today/2006/12/13/invoking-web-services-using-apache-axis2.html , and i am getting this Exception tree: Exception in thread main org.apache.axis2.AxisFault: Read timed out at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) at org.apache.axis2.transport.http.HTTPSender.sendViaPost (HTTPSender.java:195) at org.apache.axis2.transport.http.HTTPSender.send (HTTPSender.java:77) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessag eWithCommons(CommonsHTTPTransportSender.java:327) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke (CommonsHTTPTransportSender.java:206) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java: 396) at org.apache.axis2.description.OutInAxisOperationClient.send (OutInAxisOperation.java:374) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl (OutInAxisOperation.java:211) at org.apache.axis2.client.OperationClient.execute (OperationClient.java:163) at org.apache.axis2.client.ServiceClient.sendReceive (ServiceClient.java:528) at org.apache.axis2.client.ServiceClient.sendReceive (ServiceClient.java:508) at sample.axisversion.Scenario1Client.main (Scenario1Client.java: 22) Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(Unknown Source) at java.io.BufferedInputStream.fill(Unknown Source) at java.io.BufferedInputStream.read(Unknown Source) at org.apache.commons.httpclient.HttpParser.readRawLine (HttpParser.java:77) at org.apache.commons.httpclient.HttpParser.readLine (HttpParser.java:105) at org.apache.commons.httpclient.HttpConnection.readLine (HttpConnection.java:1115) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager $HttpConnectionAdapter.readLine (MultiThreadedHttpConnectionManager.java:1373) at org.apache.commons.httpclient.HttpMethodBase.readStatusLine (HttpMethodBase.java:1832) at org.apache.commons.httpclient.HttpMethodBase.readResponse (HttpMethodBase.java:1590) at org.apache.commons.httpclient.HttpMethodBase.execute (HttpMethodBase.java:995) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry (HttpMethodDirector.java:397) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod (HttpMethodDirector.java:170) at org.apache.commons.httpclient.HttpClient.executeMethod (HttpClient.java:396) at org.apache.commons.httpclient.HttpClient.executeMethod (HttpClient.java:346) at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod (AbstractHTTPSender.java:520) at org.apache.axis2.transport.http.HTTPSender.sendViaPost (HTTPSender.java:191) ... 10 more I tested the service in a browser and it appears to be working fine. I tried to execute the service in Tomcat 5.5 and using directly axis2server (Axis2 1.3). Anyone has any ideia, what is happening here? Thanks in advance, Wesley. -- Wesley Mesquita LIS/IC - UNICAMP [skype: wesley.mesquita] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Wesley Mesquita LIS/IC - UNICAMP [skype: wesley.mesquita] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Wesley Mesquita LIS/IC - UNICAMP [skype: wesley.mesquita
Re: Axis2 client hangs with multiple requests in one session
Have you tried to call options.setCallTransportCleanup(true)?, my guess is that the problem lies at the transport level. If still does not work try to create a custom HttpConnectionManager for the client -- see AsyncTest2Test into the integration test module. Michele On 16 Feb 2008, at 02:26, Landslide wrote: When I use Axis2 1.3 API for my SOAP client as below: Options options = new Options(); options.setManageSession(true); client.setOptions(options); I can only get back the cookie of “JSESSIONID” on my server side for all the subsequent requests and I would lose the rest of all other cookies set by my server side code. When I use Axis2 1.3 API for my SOAP client as below: Options options = new Options(); options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, true); client.setOptions(options); I can get back all the cookies set by my server side code, including “JSESSIONID”. However, the client side code would hang forever after looping into the 3rd request. What can I do in this case as I want to have all my cookies passed back from the client side to the server side for multiple requests of the same HTTP session? -- View this message in context: http://www.nabble.com/Axis2-client- hangs-with-multiple-requests-in-one-session-tp15514156p15514156.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2 client hangs with multiple requests in one session
Hello, as I said in my previous email, my guess is that the problem lies at the transport level. In order to confirm (or deny) my assumption you can 1 - not reuse the same HttpClient between calls 2 - customize your HttpConnectionManager as I suggested you in my previous email. Michele On 16 Feb 2008, at 14:52, Pär Malmqvist wrote: Hi! I have noticed that the combination below sometimes hangs on the third call if the server response always is an AxisFault. But I have not had time to track it down complete so it would be interesting to here from you. What happens when you send a call three times in a row and the response is always an AxisFault with an error message? I hope it is not that hard to find out what parameters to use in your call to get an AxisFault from the server. Thanks! /Pär Date: Sat, 16 Feb 2008 03:30:16 -0800 From: [EMAIL PROTECTED] To: axis-user@ws.apache.org Subject: Re: Axis2 client hangs with multiple requests in one session Thanks, Michele! The combination of these 2 lines works for multiple requests/ responses: options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, true); options.setCallTransportCleanup(true); This line only tracks the cookie JSESSIONID but nothing else: options.setManageSession(true); -- View this message in context: http://www.nabble.com/Axis2-client- hangs-with-multiple-requests-in-one-session-tp15514156p15517229.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Express yourself instantly with MSN Messenger! MSN Messenger - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Async requests killing network
On 13 Feb 2008, at 00:45, Martin Gainty wrote: I did'nt get an answer so Im reposting.. Is there a way to configure in NIO transport in axis2 *without* enabling the NIO connector in TC server.xml? Martin, if the NIO listener is not enabled in the configuration file you'll need to add it at runtime. Get the ListenerManager from the ConfigurationContext and then add the listener. Michele Thanks Martin- - Original Message - From: Paul Fremantle [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Monday, February 11, 2008 8:06 AM Subject: Re: Async requests killing network I should point out you do this by commenting (the normal HTTP transport) and uncommenting (the NIO transport) in axis2.xml. Some users have also tried the Synapse 1.1.1/1.1.2 NIO HTTP transport which has a number of bugs fixed compared to the Axis2 version thereof. You need to grab the JAR file from Synapse and copy the right axis2.xml config from Synapse's axis2.xml. Paul On Feb 11, 2008 12:19 PM, Paul Fremantle [EMAIL PROTECTED] wrote: You might want to try this out using the NIO HTTP transport. It should scale better for this kind of behaviour. Paul On Feb 11, 2008 11:11 AM, Matthias Wermund [EMAIL PROTECTED] wrote: Hi, I'm having problems starting a big amount of async webservice requests via Axis2 client in short time. The requests are all started from the same Thread and should run parallel in only small amount. As you can see below, I start about 1000 * 5 = 5000 requests, but only a max of 2-5 are called parallel. For each dataset, a few information-requests are started parallel, but I ensure that each CallbackHandler has been finished, before requesting the informations for the next dataset. For the first several hundred requests this works fine, but after some time, my network (OS is Windows 2000) goes down, which means that the complete OS looses the connection to the local network. I guess this could be based in opening too much TCP connections or something like this, because if it affects the whole OS and not just my application, it has to be something with the network device or driver. So basically my question is: Is it ensured that the TCP connection is already closed when CallbackHandler.onError or CallbackHandler.onComplete is called? Or must I do this myself in any way? Do you have any other clue what might be the problem here? Thank you! __ A quick mock-overview of how I start the threads: ListDataset datasets;// approx. 500 - 1000 objects ... for (Object data: datasets) { ListCallback callbacks; for (Information info: myRequestsForThisData) {// approx. 2-5 objects // Generating the Request Document Request request = generateRequest(info); // Generating a service Callback instance; the Callback class has an attribute finished Callback myCallback = new Callback(); // remembering the callback callbacks.add(myCallback); // starting the async request stub.startRequest(request,myCallback); } // now wait until all Callbacks are finished (finished is true if onError or onComplete has been called) while (true) { boolean allCompleted = true; for(Callback callback: callbacks) if (callback.isFinished()) { allCompleted = false; break; } if (allCompleted) break; Thread.sleep(25); } } -- 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AXIS TCP - TIME_WAIT - Connection Leak
On 10 Feb 2008, at 14:09, Andreas Veithen wrote: More precisely, the given combination of (local address, local port, remote address, remote port) cannot be reused. Since local address, remote address and remote port are fixed this still leaves more than 6 possible combinations. Assuming that connections remain in state TIME_WAIT for 240 seconds, you would have to open (and close) connections every 4 milliseconds to hit the limit. Some systems by default don't use the full available port range, so the figures might be a bit different, but anyway, at this connection rate the TCP transport seems not very appropriate and should be replaced by something more sophisticated like HTTP (with keepalive) or JMS. Maybe it is useful to come back to the initial question asked in this thread: Hello, I'm using a stub that is connecting the server using TCP transport. I'm looping around calling the service operation. After I'm done I run netstat -na and I see a whole lot of connections in TIME_WAIT. Can I instruct the stub to clean up the connection after a method call? The complete answer to this question is as follows: 1) It is normal to see connections in state TIME_WAIT. This is not an indication of failure of the client to clean up connections, but is required by the TCP protocol. 2) Having large numbers of connections in state TIME_WAIT is not a problem in itself. 3) If a single client opens and closes more than about 100 connections per second, this leads to exhaustion of local ports on the client side. If this is the case, consider using a different transport. A possible solution to problem #3 would be to customize some kernel settings (/etc/sysctl.conf), such as net.ipv4.tcp_fin_ack_timeout net.ipv4.tcp_keepalive_time Michele Regards, Andreas On 10 Feb 2008, at 12:18, Michele Mazzucco wrote: Andreas, the point is that while the connection is in TIME_WAIT state the socket cannot be reused (see the links below). Michele http://www.port80software.com/200ok/archive/2004/12/07/205.aspx http://msdn2.microsoft.com/en-us/library/aa560610.aspx On 9 Feb 2008, at 20:59, Andreas Veithen wrote: On 09 Feb 2008, at 19:52, Michele Mazzucco wrote: This is not a problem, since in this state, no resources (other than the corresponding entries in some internal OS data structure and that you can see with netstat) are consumed whatsoever. This might be a problem, since they increase the number of open file ( connections). Remember that by default linux allows only 1024 open files. A connection in state TIME_WAIT is closed (no further packets will be sent and no packets except wandering packets are expected to be received). Therefore there is no file descriptor associated to it. Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Async requests killing network
Matthias, have you tried to create less Callback objects and handle your bunch or requests (at least) with a single one? Furthermore, Paul pointed out the NIO connector. If you're instead using the default one, I'd suggest you to customize the configuration context your service client uses in order to inject a custom HttpConnectionManager (see the httpclient library) and periodically call closeIdleConnections(). Michele On 11 Feb 2008, at 11:11, Matthias Wermund wrote: Hi, I'm having problems starting a big amount of async webservice requests via Axis2 client in short time. The requests are all started from the same Thread and should run parallel in only small amount. As you can see below, I start about 1000 * 5 = 5000 requests, but only a max of 2-5 are called parallel. For each dataset, a few information-requests are started parallel, but I ensure that each CallbackHandler has been finished, before requesting the informations for the next dataset. For the first several hundred requests this works fine, but after some time, my network (OS is Windows 2000) goes down, which means that the complete OS looses the connection to the local network. I guess this could be based in opening too much TCP connections or something like this, because if it affects the whole OS and not just my application, it has to be something with the network device or driver. So basically my question is: Is it ensured that the TCP connection is already closed when CallbackHandler.onError or CallbackHandler.onComplete is called? Or must I do this myself in any way? Do you have any other clue what might be the problem here? Thank you! __ A quick mock-overview of how I start the threads: ListDataset datasets;// approx. 500 - 1000 objects ... for (Object data: datasets) { ListCallback callbacks; for (Information info: myRequestsForThisData) {// approx. 2-5 objects // Generating the Request Document Request request = generateRequest(info); // Generating a service Callback instance; the Callback class has an attribute finished Callback myCallback = new Callback(); // remembering the callback callbacks.add(myCallback); // starting the async request stub.startRequest(request,myCallback); } // now wait until all Callbacks are finished (finished is true if onError or onComplete has been called) while (true) { boolean allCompleted = true; for(Callback callback: callbacks) if (callback.isFinished()) { allCompleted = false; break; } if (allCompleted) break; Thread.sleep(25); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AXIS TCP - TIME_WAIT - Connection Leak
Andreas, the point is that while the connection is in TIME_WAIT state the socket cannot be reused (see the links below). Michele http://www.port80software.com/200ok/archive/2004/12/07/205.aspx http://msdn2.microsoft.com/en-us/library/aa560610.aspx On 9 Feb 2008, at 20:59, Andreas Veithen wrote: On 09 Feb 2008, at 19:52, Michele Mazzucco wrote: This is not a problem, since in this state, no resources (other than the corresponding entries in some internal OS data structure and that you can see with netstat) are consumed whatsoever. This might be a problem, since they increase the number of open file ( connections). Remember that by default linux allows only 1024 open files. A connection in state TIME_WAIT is closed (no further packets will be sent and no packets except wandering packets are expected to be received). Therefore there is no file descriptor associated to it. Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AXIS TCP - TIME_WAIT - Connection Leak
On 8 Feb 2008, at 23:57, h b wrote: Hello, I'm using a stub that is connecting the server using TCP transport. I'm looping around calling the service operation. After I'm done I run netstat -na and I see a whole lot of connections in TIME_WAIT. Can I instruct the stub to clean up the connection after a method call? Try options.setCallTransportCleanup(true) Michele Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [axis2] Unexpected character 'E' (code 69) in prolog; expected ''
On 7 Feb 2008, at 16:44, Asankha C. Perera wrote: Seems like you are receiving an HTML response to a SOAP query.. This issue is fixed on the latest Synapse transport - but not available in the code of Axis2 1.3 Asankha, using tcmon I've found the message which generates the error POST /axis2/services/StreamRoutingService HTTP/1.0 Content-Type: application/soap+xml; charset=UTF-8; action=urn:addStream User-Agent: Axis2 Host: *:8081 Content-Length: 574 ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope; xmlns:wsa=http://www.w3.org/2005/08/ addressingsoapenv:Headerwsa:Tohttp://:8081/axis2/services/ StreamRoutingService/wsa:Towsa:MessageIDurn:uuid: 488847552774A643381202399230874/ wsa:MessageIDwsa:Actionurn:addStream/wsa:Action/ soapenv:Headersoapenv:Bodystream:addStream xmlns:stream=http:// ncl.ac.uk/qospserviceServiceOne/servicegamma0.4/ gammalength50/length/stream:addStream/soapenv:Body/ soapenv:Envelope HTTP/1.0 500 Internal Server Error Content-Type: text/xml Date: Thu, 07 Feb 2008 15:45:36 GMT Server: Axis2-HttpComponents-NIO Connection: Close Error processing POST request Furthermore, but I don't know whether the two errors are related or not, I've found this issue too - Client side (using commons sender + NIO listener) ERROR 21:53:44,422 (Callback.java:94) - Worker ServiceTwo stream 269 [java] org.apache.axis2.AxisFault: Transport error: 500 Error: Internal Server Error [java] at org.apache.axis2.transport.http.HTTPSender.handleResponse (HTTPSender.java:293) [java] at org.apache.axis2.transport.http.HTTPSender.sendViaPost (HTTPSender.java:192) [java] at org.apache.axis2.transport.http.HTTPSender.send (HTTPSender.java:77) [java] at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageW ithCommons(CommonsHTTPTransportSender.java:327) [java] at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke (CommonsHTTPTransportSender.java:206) [java] at org.apache.axis2.engine.AxisEngine $TransportNonBlockingInvocationWorker.run(AxisEngine.java:516) [java] at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor $Worker.runTask(ThreadPoolExecutor.java:665) [java] at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor $Worker.run(ThreadPoolExecutor.java:690) [java] at java.lang.Thread.run(Thread.java:613) [java] ERROR 21:53:44,422 (Callback.java:94) - Worker ServiceTwo stream 269 [java] org.apache.axis2.AxisFault: Transport error: 500 Error: Internal Server Error [java] at org.apache.axis2.transport.http.HTTPSender.handleResponse (HTTPSender.java:293) [java] at org.apache.axis2.transport.http.HTTPSender.sendViaPost (HTTPSender.java:192) [java] at org.apache.axis2.transport.http.HTTPSender.send (HTTPSender.java:77) [java] at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageW ithCommons(CommonsHTTPTransportSender.java:327) [java] at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke (CommonsHTTPTransportSender.java:206) [java] at org.apache.axis2.engine.AxisEngine $TransportNonBlockingInvocationWorker.run(AxisEngine.java:516) [java] at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor $Worker.runTask(ThreadPoolExecutor.java:665) [java] at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor $Worker.run(ThreadPoolExecutor.java:690) [java] at java.lang.Thread.run(Thread.java:613) where Callback.java:94 is the onError() method of AxisCalback - Server side (using NIO sender/listener) ERROR 21:52:09,329 (ServerWorker.java:421) - Error processing POST request org.apache.axis2.AxisFault: Service ServiceOne, stream not found for cookie 269 at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) at org.apache.axis2.AxisFault.makeFault(AxisFault.java:406) at org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver.invokeBusinessLog ic(RawXMLINOnlyMessageReceiver.java:94) 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.processHTTPPostReques t(HTTPTransportUtils.java:275) at org.apache.axis2.transport.nhttp.ServerWorker.processPost (ServerWorker.java:207) at org.apache.axis2.transport.nhttp.ServerWorker.run (ServerWorker.java:171) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor $Worker.runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor $Worker.run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:595) Caused by:
Re: [axis2] Unexpected character 'E' (code 69) in prolog; expected ''
Asankha, I've created https://issues.apache.org/jira/browse/AXIS2-3496 for the errors I've mentioned in my previous email. Michele On Fri, 2008-02-08 at 09:20 +, Michele Mazzucco wrote: On 7 Feb 2008, at 16:44, Asankha C. Perera wrote: Seems like you are receiving an HTML response to a SOAP query.. This issue is fixed on the latest Synapse transport - but not available in the code of Axis2 1.3 Asankha, using tcmon I've found the message which generates the error POST /axis2/services/StreamRoutingService HTTP/1.0 Content-Type: application/soap+xml; charset=UTF-8; action=urn:addStream User-Agent: Axis2 Host: *:8081 Content-Length: 574 ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope; xmlns:wsa=http://www.w3.org/2005/08/ addressingsoapenv:Headerwsa:Tohttp://:8081/axis2/services/ StreamRoutingService/wsa:Towsa:MessageIDurn:uuid: 488847552774A643381202399230874/ wsa:MessageIDwsa:Actionurn:addStream/wsa:Action/ soapenv:Headersoapenv:Bodystream:addStream xmlns:stream=http:// ncl.ac.uk/qospserviceServiceOne/servicegamma0.4/ gammalength50/length/stream:addStream/soapenv:Body/ soapenv:Envelope HTTP/1.0 500 Internal Server Error Content-Type: text/xml Date: Thu, 07 Feb 2008 15:45:36 GMT Server: Axis2-HttpComponents-NIO Connection: Close Error processing POST request Furthermore, but I don't know whether the two errors are related or not, I've found this issue too - Client side (using commons sender + NIO listener) ERROR 21:53:44,422 (Callback.java:94) - Worker ServiceTwo stream 269 [java] org.apache.axis2.AxisFault: Transport error: 500 Error: Internal Server Error [java] at org.apache.axis2.transport.http.HTTPSender.handleResponse (HTTPSender.java:293) [java] at org.apache.axis2.transport.http.HTTPSender.sendViaPost (HTTPSender.java:192) [java] at org.apache.axis2.transport.http.HTTPSender.send (HTTPSender.java:77) [java] at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageW ithCommons(CommonsHTTPTransportSender.java:327) [java] at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke (CommonsHTTPTransportSender.java:206) [java] at org.apache.axis2.engine.AxisEngine $TransportNonBlockingInvocationWorker.run(AxisEngine.java:516) [java] at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor $Worker.runTask(ThreadPoolExecutor.java:665) [java] at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor $Worker.run(ThreadPoolExecutor.java:690) [java] at java.lang.Thread.run(Thread.java:613) [java] ERROR 21:53:44,422 (Callback.java:94) - Worker ServiceTwo stream 269 [java] org.apache.axis2.AxisFault: Transport error: 500 Error: Internal Server Error [java] at org.apache.axis2.transport.http.HTTPSender.handleResponse (HTTPSender.java:293) [java] at org.apache.axis2.transport.http.HTTPSender.sendViaPost (HTTPSender.java:192) [java] at org.apache.axis2.transport.http.HTTPSender.send (HTTPSender.java:77) [java] at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageW ithCommons(CommonsHTTPTransportSender.java:327) [java] at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke (CommonsHTTPTransportSender.java:206) [java] at org.apache.axis2.engine.AxisEngine $TransportNonBlockingInvocationWorker.run(AxisEngine.java:516) [java] at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor $Worker.runTask(ThreadPoolExecutor.java:665) [java] at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor $Worker.run(ThreadPoolExecutor.java:690) [java] at java.lang.Thread.run(Thread.java:613) where Callback.java:94 is the onError() method of AxisCalback - Server side (using NIO sender/listener) ERROR 21:52:09,329 (ServerWorker.java:421) - Error processing POST request org.apache.axis2.AxisFault: Service ServiceOne, stream not found for cookie 269 at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) at org.apache.axis2.AxisFault.makeFault(AxisFault.java:406) at org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver.invokeBusinessLog ic(RawXMLINOnlyMessageReceiver.java:94) 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.processHTTPPostReques t(HTTPTransportUtils.java:275) at org.apache.axis2.transport.nhttp.ServerWorker.processPost (ServerWorker.java:207) at org.apache.axis2
Re: [axis2] SimpleHTTPServer as transport listener causes too many connections to stay in TIME_WAIT state
On 7 Feb 2008, at 08:02, Asankha C. Perera wrote: Currently I'm using the NIO transports on the client side as well, and by default java uses http 1.1, which in turn uses keep alive by default. Is there any way to customize the NIO sender behavior? Yes, by making a property file called nhttp.properties available on the classpath. Look at the NHttpConfiguration class for more details - However note that the defaults are very much cable of handling huge loads Ref: http://svn.apache.org/viewvc/synapse/trunk/java/modules/ transports/src/main/java/org/apache/synapse/transport/nhttp/ NHttpConfiguration.java?view=markup I know how to change SO_TIMEOUT and so on, You can change things like SO_TIMEOUT, CONNECTION_TIMEOUT, SOCKET_BUFFER_SIZE, STALE_CONNECTION_CHECK, TCP_NODELAY etc Look at HttpCoreNIOSender.getClientParameters() method but how can I change -- for example -- the max number of requests that are sent over the same channel (the tomcat NIO connector allows such thing)? You mean for re-using existing connections? if so there is no limit, if a free channel is 'available' it will be used Yes, I know about those parameters. However the tomcat NIO connector can be customized in a greater way [1], for example it allows to bound the maximum number of requests that can be pipelined. Is there any way to achieve a similar result with the synapse transport? Michele [1] http://tomcat.apache.org/tomcat-6.0-doc/config/http.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [axis2] Unexpected character 'E' (code 69) in prolog; expected ''
Hi again, some more information. The NPE is thrown both if the fault is created with an exception as argument or if the fault is created this way throw new AxisFault(Stream rejected); Michele On Thu, 2008-02-07 at 15:28 +, Michele Mazzucco wrote: Hello everybody, I'm getting this error on the client side ERROR 15:16:40,047 (QueueController.java:200) - Unable to add stream for queue ServiceTwo, com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character 'E' (code 69) in prolog; expected '' [java] at [row,col {unknown-source}]: [1,1] This error is not new (see here http://mail-archives.apache.org/ mod_mbox/ws-axis-user/200707.mbox/[EMAIL PROTECTED] for example) when an user exception is thrown on the server side. The servers log tells me about an error processing a POST request. The error occurs at ServerWorker:421 (I'm using the NIO listener/sender) ERROR 15:15:06,766 (ServerWorker.java:421) - Error processing POST request org.apache.axis2.AxisFault: ncl.qosp.controller.policies.admission.streams.RejectedStreamException: Stream rejected 12 at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) at ncl.qosp.controller.streams.StreamRoutingService.addStream (StreamRoutingService.java:309) 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:585) at org.apache.axis2.receivers.RawXMLINOutMessageReceiver.invokeBusinessLogi c(RawXMLINOutMessageReceiver.java:97) at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusine ssLogic(AbstractInOutSyncMessageReceiver.java:42) 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.processHTTPPostReques t(HTTPTransportUtils.java:275) at org.apache.axis2.transport.nhttp.ServerWorker.processPost (ServerWorker.java:207) at org.apache.axis2.transport.nhttp.ServerWorker.run (ServerWorker.java:171) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor $Worker.runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor $Worker.run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:595) Caused by: ncl.qosp.controller.policies.admission.streams.RejectedStreamException: ncl.qosp.controller.policies.admission.streams.RejectedStreamException: Stream rejected 12 at ncl.qosp.controller.dispatcher.streams.StreamDispatcherImpl.addStream (StreamDispatcherImpl.java:363) at ncl.qosp.controller.streams.StreamRoutingService.addStream (StreamRoutingService.java:290) ... 14 more Caused by: ncl.qosp.controller.policies.admission.streams.RejectedStreamException: Stream rejected 12 at ncl.qosp.controller.dispatcher.streams.StreamEvaluatorTask.call (StreamEvaluatorTask.java:176) at ncl.qosp.controller.dispatcher.streams.StreamEvaluatorTask.call (StreamEvaluatorTask.java:37) at java.util.concurrent.FutureTask$Sync.innerRun (FutureTask.java:269) at java.util.concurrent.FutureTask.run(FutureTask.java:123) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask (ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:675) ... 1 more Exception in thread HttpServerWorker-15 java.lang.NullPointerException at org.apache.axis2.transport.nhttp.ServerWorker.handleException (ServerWorker.java:441) at org.apache.axis2.transport.nhttp.ServerWorker.processPost (ServerWorker.java:214) at org.apache.axis2.transport.nhttp.ServerWorker.run (ServerWorker.java:171) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor $Worker.runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor $Worker.run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:595) From the source code I understand that: 1 - the output stream is null, or 2 - the exception message is null Any idea? Thanks in advance, Michele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail
[axis2] Unexpected character 'E' (code 69) in prolog; expected ''
Hello everybody, I'm getting this error on the client side ERROR 15:16:40,047 (QueueController.java:200) - Unable to add stream for queue ServiceTwo, com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character 'E' (code 69) in prolog; expected '' [java] at [row,col {unknown-source}]: [1,1] This error is not new (see here http://mail-archives.apache.org/ mod_mbox/ws-axis-user/200707.mbox/[EMAIL PROTECTED] for example) when an user exception is thrown on the server side. The servers log tells me about an error processing a POST request. The error occurs at ServerWorker:421 (I'm using the NIO listener/sender) ERROR 15:15:06,766 (ServerWorker.java:421) - Error processing POST request org.apache.axis2.AxisFault: ncl.qosp.controller.policies.admission.streams.RejectedStreamException: Stream rejected 12 at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) at ncl.qosp.controller.streams.StreamRoutingService.addStream (StreamRoutingService.java:309) 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:585) at org.apache.axis2.receivers.RawXMLINOutMessageReceiver.invokeBusinessLogi c(RawXMLINOutMessageReceiver.java:97) at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusine ssLogic(AbstractInOutSyncMessageReceiver.java:42) 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.processHTTPPostReques t(HTTPTransportUtils.java:275) at org.apache.axis2.transport.nhttp.ServerWorker.processPost (ServerWorker.java:207) at org.apache.axis2.transport.nhttp.ServerWorker.run (ServerWorker.java:171) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor $Worker.runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor $Worker.run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:595) Caused by: ncl.qosp.controller.policies.admission.streams.RejectedStreamException: ncl.qosp.controller.policies.admission.streams.RejectedStreamException: Stream rejected 12 at ncl.qosp.controller.dispatcher.streams.StreamDispatcherImpl.addStream (StreamDispatcherImpl.java:363) at ncl.qosp.controller.streams.StreamRoutingService.addStream (StreamRoutingService.java:290) ... 14 more Caused by: ncl.qosp.controller.policies.admission.streams.RejectedStreamException: Stream rejected 12 at ncl.qosp.controller.dispatcher.streams.StreamEvaluatorTask.call (StreamEvaluatorTask.java:176) at ncl.qosp.controller.dispatcher.streams.StreamEvaluatorTask.call (StreamEvaluatorTask.java:37) at java.util.concurrent.FutureTask$Sync.innerRun (FutureTask.java:269) at java.util.concurrent.FutureTask.run(FutureTask.java:123) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask (ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:675) ... 1 more Exception in thread HttpServerWorker-15 java.lang.NullPointerException at org.apache.axis2.transport.nhttp.ServerWorker.handleException (ServerWorker.java:441) at org.apache.axis2.transport.nhttp.ServerWorker.processPost (ServerWorker.java:214) at org.apache.axis2.transport.nhttp.ServerWorker.run (ServerWorker.java:171) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor $Worker.runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor $Worker.run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:595) From the source code I understand that: 1 - the output stream is null, or 2 - the exception message is null Any idea? Thanks in advance, Michele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [axis2] SimpleHTTPServer as transport listener causes too many connections to stay in TIME_WAIT state
On 6 Feb 2008, at 16:50, Asankha C. Perera wrote: Michele Not if you are using the NIO listener on the server side and sending requests on the NIO listeners' port.. No, calls were made to the tomcat port. I don't understand what you are trying to achieve here.. if you are using the o.a.synapse NIO based transports to get over the TIME_WAIT problems with the Tomcat/Servlet transport, why do you keep sending messages to the Tomcat port instead of the NIO ports? The synapse transports are used for outgoing messages. No.. the NIO client / Sender is optimized for a server environment - like Synapse - and thus not recommended for a simple client, as it starts a NIO reactor and a thread pool for handling IO requests with dedicated IO threads etc. So, this will be good for your server side if you are making many outgoing calls from the server side.. What about if the client is a load generator? If you want a really good load generator for web service calls, use the benchmark code from Apache HttpComponents - its as good as or better than ApacheBench for web services Code - http://svn.apache.org/repos/asf/httpcomponents/httpcore/ trunk/contrib/src/main/java/org/apache/http/contrib/benchmark/ Binary - https://www-lk.wso2.com/~asankha/benchmark/ Sample / Reference - http://wso2.org/library/1721 Please correct me if I'm wrong, but it looks to me that your client is deterministic, i.e. does not introduce any randomness (for example for the arrival rate, I'd like an average value of x, but with some distribution, not via constant values) -- which is very important in real systems. BTW.. I think you are developing something like an ESB?? Something like that, but with some smart forwarding/throttling policies Have you looked at Apache Synapse? It uses the above NIO transports very effectively and is optimized for high performance. It supports throttling, caching etc and a host of other features - even on clustered HA environments Yes. No, the client is on a remote machine. I've tried to use both blocking and non blocking sender/listener on the client side, and the bottleneck seems to be the server. This could very well be due to a weakness on the client side.. for example even if you used ApacheBench you will could bad performance for some cases as it doesn't support HTTP 1.1! No, I've written the client, and it's pretty optimized. Can you share a TCPDump of a sample request made by your client and the response received.. in particular I am interested to know if you use 1. HTTP 1.1 2. Keepalive connections 3. Chunking I've tried all the possible combinations. Currently I'm using the NIO transports on the client side as well, and by default java uses http 1.1, which in turn uses keep alive by default. Is there any way to customize the NIO sender behavior? I know how to change SO_TIMEOUT and so on, but how can I change -- for example -- the max number of requests that are sent over the same channel (the tomcat NIO connector allows such thing)? Michele asankha - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[axis2] how to deal with read time out?
Hello everybody, how can I deal with read time out? One of my servers logged the following exception on the out fault phase. Is there any way to get the original destination and create a brand new MEP? ?xml version='1.0' encoding='utf-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:wsa=http://www.w3.org/2005/08/ addressingsoapenv:Headerwsa:Tohttp://www.w3.org/2005/08/ addressing/none/wsa:Towsa:ReplyTowsa:Addresshttp://www.w3.org/ 2005/08/addressing/none/wsa:Address/ wsa:ReplyTowsa:MessageIDurn:uuid:F11CC26B92F3AC27831202315355124/ wsa:MessageIDwsa:Actionhttp://www.w3.org/2005/08/addressing/soap/ fault/wsa:Actionwsa:RelatesTourn:uuid: 56F0D4EF5A219F78881202315240640/wsa:RelatesTo/ soapenv:Headersoapenv:Bodysoapenv:Faultfaultcodesoapenv:Server/f aultcodefaultstringRead timed out/ faultstringdetailExceptionorg.apache.axis2.AxisFault: Read timed out at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) at org.apache.axis2.transport.http.HTTPSender.sendViaPost (HTTPSender.java:195) at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageW ithCommons(CommonsHTTPTransportSender.java:327) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke (CommonsHTTPTransportSender.java:206) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396) at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusine ssLogic(AbstractInOutSyncMessageReceiver.java:45) 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.processHTTPPostReques t(HTTPTransportUtils.java:275) at org.apache.axis2.transport.http.AxisServlet.doPost (AxisServlet.java:120) 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:664) 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) Caused by: java.net.SocketTimeoutException: Read timed 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:235) at org.apache.commons.httpclient.HttpParser.readRawLine (HttpParser.java:77) at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java: 105) at org.apache.commons.httpclient.HttpConnection.readLine (HttpConnection.java:1115) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager $HttpConnectionAdapter.readLine (MultiThreadedHttpConnectionManager.java:1373) at org.apache.commons.httpclient.HttpMethodBase.readStatusLine (HttpMethodBase.java:1832) at org.apache.commons.httpclient.HttpMethodBase.readResponse (HttpMethodBase.java:1590) at org.apache.commons.httpclient.HttpMethodBase.execute (HttpMethodBase.java:995) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry (HttpMethodDirector.java:397) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod (HttpMethodDirector.java:170) at org.apache.commons.httpclient.HttpClient.executeMethod (HttpClient.java:396) at org.apache.commons.httpclient.HttpClient.executeMethod (HttpClient.java:346) at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod (AbstractHTTPSender.java:520) at org.apache.axis2.transport.http.HTTPSender.sendViaPost (HTTPSender.java:191) ... 25 more /Exception/detail/soapenv:Fault/soapenv:Body/soapenv:Envelope Thanks in advance,
Re: [axis2] how to deal with read time out?
I forgot to mention that the MEP is in-out and I've enabled the use of a separate channel for the response (I guess it applies even if the sender used the NIO sender, doesn't it?) Michele On 6 Feb 2008, at 17:53, Michele Mazzucco wrote: how can I deal with read time out? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [axis2] SimpleHTTPServer as transport listener causes too many connections to stay in TIME_WAIT state
Martin, I meant the parameters of http core, since the synapse (or axis2) NIO listener uses it. Michele On 6 Feb 2008, at 20:58, Martin Gainty wrote: with regards to the last question.. I would take a look at increasing the maxThreads parameter on the NIOConnector e.g Connector port=80 protocol=org.apache.coyote.http11.Http11NioProtocol maxThreads=150 connectionTimeout=6 redirectPort=8443 / - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [axis2] SimpleHTTPServer as transport listener causes too many connections to stay in TIME_WAIT state
Paul, I've attache some test cases here https://issues.apache.org/jira/ browse/AXIS2-3428 Michele On 1 Feb 2008, at 14:42, Paul Fremantle wrote: Michele If you can post some test cases, we will do our best to improve the NIO transport. You also should try the NIO transport code from the Synapse 1.1.1 release if you haven't already because that had a number of fixes in it. Thanks Paul On Feb 1, 2008 1:35 PM, Michele Mazzucco [EMAIL PROTECTED] wrote: On 1 Feb 2008, at 03:15, robert lazarski wrote: Me == clueless . Just some general advice though. Have you thought about submitting patches to fix the NIO issues? I notice that someone from the synapse team (IIRC), three weeks ago, asked you to submit a test case for your failure in one of the jira's you posted. Robert, I know. I'll do that as soon as I find some time. As I've said before Michele, you easily have some of the most complex and long going use cases for axis2 as a non-committer. Your involvement via patches certainly have a better chance of getting developer attention. In respect to this issue, I can at least try to be a bit helpful: 1) Have you tried running your code on anything else besides OSX to see if these socket issues are OS related? I've run into several socket and nio issues specific to linux for example. Yes. Indeed my problem occurs on a 4 CPUs linux box 2) Have you tried running http 1.0 instead of 1.1 ? Yes, it doesn't make any difference. 3) SimpleHTTPServer has never been meant for production use, so stop trying to use it like that. Fixing the nio issues seem to me to be the better path. Yes, but the nio code comes from Synapse... and this would mean digging into the Synapse code (which I don't know). My understanding of TIME_WAIT, via an old usenet post of mine, was best explained to me this way: After the connection is closed, there might still be some stray packets that were delayed and could still arrive. The TIME_WAIT status retains a record of a recent connection, so that the system can recognize these as delay packets. Are these connections going from CLOSE_WAIT to TIME_WAIT? Can you do a 'netstat -anp' and show the transition states? Well, netstat doesn't show me any transition, only the current state What issue do you have with TIME_WAIT exactly? The number of connections in TIME_WAIT state grows very fast to a value 500, and after that the my app. hangs (without crashing, it just freezes) Anyways, since SimpleHTTPServer is deep involved into the several hundred unit / integration tests, I don't see major changes happening at this point. 4) Obviously try the latest axis2 nightlies and post questions to the http commons / reactor list. Its possible the latest snapshot of reactor fixes your issue and can be promoted to the upcomming axis2 1.4 . I'll try. HTH, Robert Michele On Jan 31, 2008 7:48 PM, Michele Mazzucco [EMAIL PROTECTED] wrote: Hello again, I've tried to write a TransportListener which uses Jetty as http server -- but I had no success: when requests come I get the following error ?xml version='1.0' encoding='utf-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:wsa=http://www.w3.org/2005/08/ addressingsoapenv:Headerwsa:Actionhttp://www.w3.org/2005/08/ addressing/soap/fault/wsa:Action/ soapenv:Headersoapenv:Bodysoapenv:Faultfaultcodesoapenv:Serv er /faultcodefaultstringjava.lang.NullPointerException/ faultstringdetailExceptionorg.apache.axis2.AxisFault: java.lang.NullPointerException at org.apache.axis2.transport.http.AxisServlet.doPost (AxisServlet.java:182) 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: 664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket (PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt (LeaderFollowerWorkerThread.java:80
Re: Axis Tomcat on a server which requires proxy settings
Elis, try with HttpTransportProperties.ProxyProperties. Once you have such an object, set it to the options with options.setProperty(HTTPConstants.PROXY, proxy); HTH, Michele On 5 Feb 2008, at 16:46, Elisei Rotaru wrote: Hello, I run an axis2 1.3 webservice on a server which requires proxy settings to connect to the Internet. I try to access with my webservice an axis1 webservice. And to access this axis1 webservice i have to tell my axis2 webservice that he should connect to the axis1 webservice through a proxy. This works with System wide settings like: System.setProperty(http.proxyHost,ProxyHost); System.setProperty(http.proxyPort,ProxyPort); Only that other service get an http transport error afterwards. How can i set http proxy only for that webservice when he calls the axis1 service? Thanks a lot. Elis, - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis Tomcat on a server which requires proxy settings
On Tue, 2008-02-05 at 19:10 +0100, Elisei Rotaru wrote: On another matter, can i access axis1 webservice with axis2? If you mean by using an axis2 client, yes. Michele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [axis2] SimpleHTTPServer as transport listener causes too many connections to stay in TIME_WAIT state
On Tue, 2008-02-05 at 23:40 +0530, Asankha C. Perera wrote: Michele I did the following: - updated tomcat from 5.5 to 6.0.14 - enabled and tuned the tomcat NIO connector The above are ok - but does not affect the synapse-transports-1.1.1.jar at all... - upgraded the NIO listener and sender to synapse 1.1.1 (I had to upgrade the http-core library from alpha5 to beta1) - enabled the NIO sender on the server side (as I said I have some ServiceClient instances running on the server too) ok.. but it didn't fix the problem. Indeed, about 50% of the connections in TIME_WAIT state are due to the tomcat connector and the other 50% to the axis2 sender. what do you mean tomcat connector? If you changed your axis2.xml to enable the o.a.synapse.transport.nhttp package, then *all* of your messages should only be handled by it and not by Tomcat anymore.. you cannot have a mix.. Asankha, my WS runs inside tomcat, but there are some ServiceClient(s) instances running in it. So I guess incoming requests are handled by the tomcat connector while outgoing messages are handled by the synapse sender, right? On the client side, instead, I used the nio transport for both incoming and outgoing messages. So I enabled the NIO sender and NIO receiver on the client side. My scenario is composed by about 80% of asynchronous interactions and 20% of very fast blocking in-out MEPs. Now the latter fail this way: For optimal usage of server resources you should tune your OS (refer http://wso2.org/library/1721) i.e. at a minimum; /etc/sysctl.conf net.ipv4.ip_local_port_range = 1024 65535 net.ipv4.tcp_fin_timeout = 30 fs.file-max = 2097152 net.ipv4.tcp_tw_recycle = 1 net.ipv4.tcp_tw_reuse = 1 /etc/security/limits.conf * soft nofile 4096 * hard nofile 65535 Ok, thanks. Another link I've found useful is this http://www.webhostingtalk.com/archive/index.php/t-257654.html The settings which seem to solve the TIME_WAIT state are the following net.ipv4.tcp_tw_recycle=1 net.ipv4.tcp_tw_reuse=1 # Disables packet forwarding net.ipv4.ip_forward=0 # Decrease the time default value for tcp_fin_timeout connection net.ipv4.tcp_fin_timeout=25 # Decrease the time default value for tcp_keepalive_time connection net.ipv4.tcp_keepalive_time=1800 # Turn on the tcp_window_scaling net.ipv4.tcp_window_scaling=1 Also ensure you give enough heap to the Java process, and use HTTP 1.1 and Keepalives as much as possible. ERROR 19:44:03,967 (QueueController.java:192) - Unable to add stream for queue Service2 The executed statements (related to axis2) are: final OMElement payload = createPayload(); ServiceClient sender = new ServiceClient(AddStreamConfiguration.getConfigurationContext(), null); sender.setOptions(getOptions()); OMElement result = sender.sendReceive(payload); where the options are options.setTransportInProtocol(Constants.TRANSPORT_HTTP); options.setCallTransportCleanup(true); options.setTo(StreamClient.getRouterEpr()); options.setAction(TestConstants.ADD_STREAM_SOAP_ACTION); options.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI); options.setProperty(HTTPConstants.CHUNKED, Boolean.TRUE); options.setProperty(HTTPConstants.AUTO_RELEASE_CONNECTION, Boolean.TRUE); and the configuration context differs from the default one because of the http connection manager with cached http client. I believe the above if for your client - and note that some of the above used properties does not apply to the NIO transport.. However, are you running your client and the server (and anything else related to the test scenario) on the same machine? If so, make sure that the culprit is not the client - No, the client is on a remote machine. I've tried to use both blocking and non blocking sender/listener on the client side, and the bottleneck seems to be the server. I think the above code uses the default HTTP transport that uses the HttpClient codebase.. that may have properties for tuning which I am not fully familiar with.. I think the client uses the transports defined in axis2.xml, it should not matter which kind of properties you define into the Options. What do you suggest?, I don't think the problem is the tomcat connector (I've tried both tomcat 5.5.23 with blocking connector and 6.0.14 with non blocking one) Michele asankha - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [axis2] SimpleHTTPServer as transport listener causes too many connections to stay in TIME_WAIT state
On 5 Feb 2008, at 20:24, Asankha C. Perera wrote: Michele my WS runs inside tomcat, but there are some ServiceClient(s) instances running in it. So I guess incoming requests are handled by the tomcat connector while outgoing messages are handled by the synapse sender, right? Not if you are using the NIO listener on the server side and sending requests on the NIO listeners' port.. No, calls were made to the tomcat port. On the client side, instead, I used the nio transport for both incoming and outgoing messages. No.. the NIO client / Sender is optimized for a server environment - like Synapse - and thus not recommended for a simple client, as it starts a NIO reactor and a thread pool for handling IO requests with dedicated IO threads etc. So, this will be good for your server side if you are making many outgoing calls from the server side.. What about if the client is a load generator? BTW.. I think you are developing something like an ESB?? Something like that, but with some smart forwarding/throttling policies No, the client is on a remote machine. I've tried to use both blocking and non blocking sender/listener on the client side, and the bottleneck seems to be the server. This could very well be due to a weakness on the client side.. for example even if you used ApacheBench you will could bad performance for some cases as it doesn't support HTTP 1.1! No, I've written the client, and it's pretty optimized. I think the client uses the transports defined in axis2.xml, it should not matter which kind of properties you define into the Options. What do you suggest?, I don't think the problem is the tomcat connector (I've tried both tomcat 5.5.23 with blocking connector and 6.0.14 with non blocking one) Again, if you use the NIO listener on the server side, nothing will use the Tomcat connector asankha - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [axis2] SimpleHTTPServer as transport listener causes too many connections to stay in TIME_WAIT state
On 1 Feb 2008, at 03:15, robert lazarski wrote: Me == clueless . Just some general advice though. Have you thought about submitting patches to fix the NIO issues? I notice that someone from the synapse team (IIRC), three weeks ago, asked you to submit a test case for your failure in one of the jira's you posted. Robert, I know. I'll do that as soon as I find some time. As I've said before Michele, you easily have some of the most complex and long going use cases for axis2 as a non-committer. Your involvement via patches certainly have a better chance of getting developer attention. In respect to this issue, I can at least try to be a bit helpful: 1) Have you tried running your code on anything else besides OSX to see if these socket issues are OS related? I've run into several socket and nio issues specific to linux for example. Yes. Indeed my problem occurs on a 4 CPUs linux box 2) Have you tried running http 1.0 instead of 1.1 ? Yes, it doesn't make any difference. 3) SimpleHTTPServer has never been meant for production use, so stop trying to use it like that. Fixing the nio issues seem to me to be the better path. Yes, but the nio code comes from Synapse... and this would mean digging into the Synapse code (which I don't know). My understanding of TIME_WAIT, via an old usenet post of mine, was best explained to me this way: After the connection is closed, there might still be some stray packets that were delayed and could still arrive. The TIME_WAIT status retains a record of a recent connection, so that the system can recognize these as delay packets. Are these connections going from CLOSE_WAIT to TIME_WAIT? Can you do a 'netstat -anp' and show the transition states? Well, netstat doesn't show me any transition, only the current state What issue do you have with TIME_WAIT exactly? The number of connections in TIME_WAIT state grows very fast to a value 500, and after that the my app. hangs (without crashing, it just freezes) Anyways, since SimpleHTTPServer is deep involved into the several hundred unit / integration tests, I don't see major changes happening at this point. 4) Obviously try the latest axis2 nightlies and post questions to the http commons / reactor list. Its possible the latest snapshot of reactor fixes your issue and can be promoted to the upcomming axis2 1.4 . I'll try. HTH, Robert Michele On Jan 31, 2008 7:48 PM, Michele Mazzucco [EMAIL PROTECTED] wrote: Hello again, I've tried to write a TransportListener which uses Jetty as http server -- but I had no success: when requests come I get the following error ?xml version='1.0' encoding='utf-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:wsa=http://www.w3.org/2005/08/ addressingsoapenv:Headerwsa:Actionhttp://www.w3.org/2005/08/ addressing/soap/fault/wsa:Action/ soapenv:Headersoapenv:Bodysoapenv:Faultfaultcodesoapenv:Server /faultcodefaultstringjava.lang.NullPointerException/ faultstringdetailExceptionorg.apache.axis2.AxisFault: java.lang.NullPointerException at org.apache.axis2.transport.http.AxisServlet.doPost (AxisServlet.java:182) 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: 664) 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) Caused by: java.lang.NullPointerException at ncl.qosp.modules.manager.RouterDispatcher.isFault (RouterDispatcher.java:230) at ncl.qosp.modules.manager.RouterDispatcher.invoke (RouterDispatcher.java:267) at org.apache.axis2.engine.Phase.invoke(Phase.java:292) at org.apache.axis2
Re: [axis2] SimpleHTTPServer as transport listener causes too many connections to stay in TIME_WAIT state
Paul, I did the following: - updated tomcat from 5.5 to 6.0.14 - enabled and tuned the tomcat NIO connector - upgraded the NIO listener and sender to synapse 1.1.1 (I had to upgrade the http-core library from alpha5 to beta1) - enabled the NIO sender on the server side (as I said I have some ServiceClient instances running on the server too) but it didn't fix the problem. Indeed, about 50% of the connections in TIME_WAIT state are due to the tomcat connector and the other 50% to the axis2 sender. So I enabled the NIO sender and NIO receiver on the client side. My scenario is composed by about 80% of asynchronous interactions and 20% of very fast blocking in-out MEPs. Now the latter fail this way: ERROR 19:44:03,967 (QueueController.java:192) - Unable to add stream for queue Service2 [java] org.apache.axis2.AxisFault: The input stream for an incoming message is null. [java] at org.apache.axis2.transport.TransportUtils.createSOAPMessage (TransportUtils.java:71) [java] at org.apache.axis2.description.OutInAxisOperationClient.handleResponse (OutInAxisOperation.java:326) [java] at org.apache.axis2.description.OutInAxisOperationClient.send (OutInAxisOperation.java:389) [java] at org.apache.axis2.description.OutInAxisOperationClient.executeImpl (OutInAxisOperation.java:211) [java] at org.apache.axis2.client.OperationClient.execute (OperationClient.java:163) [java] at org.apache.axis2.client.ServiceClient.sendReceive (ServiceClient.java:528) [java] at org.apache.axis2.client.ServiceClient.sendReceive (ServiceClient.java:508) [java] at ncl.qosp.test.client.streams.delayed.AddStream.send(AddStream.java:86) [java] at ncl.qosp.test.client.streams.delayed.QueueController.addStream (QueueController.java:163) [java] at ncl.qosp.test.client.streams.delayed.QueueController.init (QueueController.java:250) [java] at ncl.qosp.test.client.streams.delayed.QueueController.run (QueueController.java:264) [java] at java.util.concurrent.ThreadPoolExecutor $Worker.runTask(ThreadPoolExecutor.java:650) [java] at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:675) [java] at java.lang.Thread.run(Thread.java:613) The executed statements (related to axis2) are: final OMElement payload = createPayload(); ServiceClient sender = new ServiceClient (AddStreamConfiguration.getConfigurationContext(), null); sender.setOptions(getOptions()); OMElement result = sender.sendReceive(payload); where the options are options.setTransportInProtocol(Constants.TRANSPORT_HTTP); options.setCallTransportCleanup(true); options.setTo(StreamClient.getRouterEpr()); options.setAction(TestConstants.ADD_STREAM_SOAP_ACTION); options.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI); options.setProperty(HTTPConstants.CHUNKED, Boolean.TRUE); options.setProperty(HTTPConstants.AUTO_RELEASE_CONNECTION, Boolean.TRUE); and the configuration context differs from the default one because of the http connection manager with cached http client. Michele On 1 Feb 2008, at 16:35, Paul Fremantle wrote: Michele You shouldn't need to change anything apart from the axis2 xml sender and receiver sections. Paul On Feb 1, 2008 2:55 PM, Michele Mazzucco [EMAIL PROTECTED] wrote: On 1 Feb 2008, at 14:42, Paul Fremantle wrote: Michele If you can post some test cases, we will do our best to improve the NIO transport. Paul, as I mentioned I'll do it as soon as I find some time. You also should try the NIO transport code from the Synapse 1.1.1 release if you haven't already because that had a number of fixes in it. Thanks for the advice. Do I need to change anything apart from the nio section in axis2.xml (the HttpCoreNIOListener and HttpCoreNIOSender will be from package org.apache.synapse.transport.nhttp and not org.apache.axis2.transport.nhttp)? Thanks, Michele Thanks Paul On Feb 1, 2008 1:35 PM, Michele Mazzucco [EMAIL PROTECTED] wrote: On 1 Feb 2008, at 03:15, robert lazarski wrote: Me == clueless . Just some general advice though. Have you thought about submitting patches to fix the NIO issues? I notice that someone from the synapse team (IIRC), three weeks ago, asked you to submit a test case for your failure in one of the jira's you posted. Robert, I know. I'll do that as soon as I find some time. As I've said before Michele, you easily have some of the most complex and long going use cases for axis2 as a non-committer. Your involvement via patches certainly have a better chance of getting developer attention. In respect to this issue, I can at least try to be a bit helpful: 1) Have you tried running your code on anything else besides OSX to see if these socket issues are OS related? I've run into several socket and nio issues specific to linux for example. Yes. Indeed my problem occurs on a 4 CPUs linux box
Re: [axis2] SimpleHTTPServer as transport listener causes too many connections to stay in TIME_WAIT state
Paul, indeed two different kinds of error seems to happen (I don't know whether they are related or not). The first one is the same of my previous email, while the second one is a bit weird because the server successfully processes the message -- there are no error at all on the server side. I would like to stress that this is a normal in-out MEP, there's nothing special going on here: the client sends a request to the server using sendReceive(), the server does some computations and returns a value to the client. ERROR 20:01:00,413 (QueueController.java:192) - Unable to add stream for queue Service2 [java] org.apache.axis2.AxisFault: The input stream for an incoming message is null. [java] at org.apache.axis2.transport.TransportUtils.createSOAPMessage (TransportUtils.java:71) [java] at org.apache.axis2.description.OutInAxisOperationClient.handleResponse (OutInAxisOperation.java:326) [java] at org.apache.axis2.description.OutInAxisOperationClient.send (OutInAxisOperation.java:389) [java] at org.apache.axis2.description.OutInAxisOperationClient.executeImpl (OutInAxisOperation.java:211) [java] at org.apache.axis2.client.OperationClient.execute (OperationClient.java:163) [java] at org.apache.axis2.client.ServiceClient.sendReceive (ServiceClient.java:528) [java] at org.apache.axis2.client.ServiceClient.sendReceive (ServiceClient.java:508) [java] at ncl.qosp.test.client.streams.delayed.AddStream.send(AddStream.java:85) [java] at ncl.qosp.test.client.streams.delayed.QueueController.addStream (QueueController.java:163) [java] at ncl.qosp.test.client.streams.delayed.QueueController.init (QueueController.java:250) [java] at ncl.qosp.test.client.streams.delayed.QueueController.run (QueueController.java:264) [java] at java.util.concurrent.ThreadPoolExecutor $Worker.runTask(ThreadPoolExecutor.java:650) [java] at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:675) [java] at java.lang.Thread.run(Thread.java:613) [java] ERROR 20:01:00,628 (ClientWorker.java:195) - Fault processing response message through Axis2 [java] org.apache.axis2.AxisFault: A header representing a Message Addressing Property is not valid and the message cannot be processed [java] at org.apache.axis2.addressing.AddressingFaultsHelper.triggerAddressingFaul t(AddressingFaultsHelper.java:355) [java] at org.apache.axis2.addressing.AddressingFaultsHelper.triggerActionMismatch Fault(AddressingFaultsHelper.java:204) [java] at org.apache.axis2.handlers.addressing.AddressingInHandler.extractActionIn formation(AddressingInHandler.java:362) [java] at org.apache.axis2.handlers.addressing.AddressingInHandler.extractAddressi ngInformation(AddressingInHandler.java:159) [java] at org.apache.axis2.handlers.addressing.AddressingInHandler.invoke (AddressingInHandler.java:97) [java] at org.apache.axis2.engine.Phase.invoke(Phase.java:292) [java] at org.apache.axis2.engine.AxisEngine.invoke (AxisEngine.java:212) [java] at org.apache.axis2.engine.AxisEngine.receive (AxisEngine.java:132) [java] at org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java: 193) [java] at java.util.concurrent.ThreadPoolExecutor $Worker.runTask(ThreadPoolExecutor.java:650) [java] at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:675) [java] at java.lang.Thread.run(Thread.java:613) I've tried to get rid of the options.setProperty(HTTPConstants.AUTO_RELEASE_CONNECTION, Boolean.TRUE); and options.setCallTransportCleanup(true); to see whether the were the root of the first error, but it's not the case. I've also tried not to use addressing on the client side (on the server side the module is globally engaged) but the second error (which seems related with the addressing information) still occurs -- and again there are no errors on the server side Michele On 1 Feb 2008, at 19:59, Michele Mazzucco wrote: Paul, I did the following: - updated tomcat from 5.5 to 6.0.14 - enabled and tuned the tomcat NIO connector - upgraded the NIO listener and sender to synapse 1.1.1 (I had to upgrade the http-core library from alpha5 to beta1) - enabled the NIO sender on the server side (as I said I have some ServiceClient instances running on the server too) but it didn't fix the problem. Indeed, about 50% of the connections in TIME_WAIT state are due to the tomcat connector and the other 50% to the axis2 sender. So I enabled the NIO sender and NIO receiver on the client side. My scenario is composed by about 80% of asynchronous interactions and 20% of very fast blocking in-out MEPs. Now the latter fail this way: ERROR 19:44:03,967 (QueueController.java:192) - Unable to add
[axis2] SimpleHTTPServer as transport listener causes too many connections to stay in TIME_WAIT state
Hello everybody, I'm facing a serious problem with too many connections left in TIME_WAIT state, causing my system to hang. Since on the server side I run some ServiceClient instances as well I wasn't sure about the root of my problem, but after some investigations I've found out that the responsible for this is the SimpleHTTPServer used as transport receiver for incoming http requests. Given that the NIO listener/sender are not stable (see the JIRAs below) I have to stick with these. Is there anything I can do? Is there any way to inject a custom http connection manager and manually clean up the unused connections? Thanks in advance, Michele [1] https://issues.apache.org/jira/browse/AXIS2-3473 [2] http://www.mail-archive.com/axis-user@ws.apache.org/msg37314.html [3] https://issues.apache.org/jira/browse/AXIS2-3428 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [axis2] SimpleHTTPServer as transport listener causes too many connections to stay in TIME_WAIT state
Hello again, I've tried to write a TransportListener which uses Jetty as http server -- but I had no success: when requests come I get the following error ?xml version='1.0' encoding='utf-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:wsa=http://www.w3.org/2005/08/addressing;soapenv:Headerwsa:Actionhttp://www.w3.org/2005/08/addressing/soap/fault/wsa:Action/soapenv:Headersoapenv:Bodysoapenv:Faultfaultcodesoapenv:Server/faultcodefaultstringjava.lang.NullPointerException/faultstringdetailExceptionorg.apache.axis2.AxisFault: java.lang.NullPointerException at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:182) 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:664) 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) Caused by: java.lang.NullPointerException at ncl.qosp.modules.manager.RouterDispatcher.isFault(RouterDispatcher.java:230) at ncl.qosp.modules.manager.RouterDispatcher.invoke(RouterDispatcher.java:267) at org.apache.axis2.engine.Phase.invoke(Phase.java:292) at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:132) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:120) ... 16 more I'm attaching my implementation. Any help is appreciated, Michele On Thu, 2008-01-31 at 19:47 +, Michele Mazzucco wrote: Hello everybody, I'm facing a serious problem with too many connections left in TIME_WAIT state, causing my system to hang. Since on the server side I run some ServiceClient instances as well I wasn't sure about the root of my problem, but after some investigations I've found out that the responsible for this is the SimpleHTTPServer used as transport receiver for incoming http requests. Given that the NIO listener/sender are not stable (see the JIRAs below) I have to stick with these. Is there anything I can do? Is there any way to inject a custom http connection manager and manually clean up the unused connections? Thanks in advance, Michele [1] https://issues.apache.org/jira/browse/AXIS2-3473 [2] http://www.mail-archive.com/axis-user@ws.apache.org/msg37314.html [3] https://issues.apache.org/jira/browse/AXIS2-3428 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] package ncl.qosp.server.http; import java.lang.management.ManagementFactory; import java.net.SocketException; import java.util.concurrent.atomic.AtomicLong; import javax.management.MBeanServer; import javax.management.MalformedObjectNameException; import javax.management.ObjectName; import org.apache.axis2.AxisFault; import org.apache.axis2.addressing.EndpointReference; import org.apache.axis2.context.ConfigurationContext; import org.apache.axis2.context.MessageContext; import org.apache.axis2.context.SessionContext; import org.apache.axis2.description.Parameter; import org.apache.axis2.description.TransportInDescription; import org.apache.axis2.transport.TransportListener; import org.apache.axis2.transport.http.server.HttpUtils; import org.mortbay.jetty.Server; /** * @author a href=[EMAIL PROTECTED]Michele Mazzucco/a */ public class JettyServer implements TransportListener, JettyServerMBean { private ConfigurationContext configurationContext; private int port = -1; private String hostAddress
Re: [axis2] NPE on OMElement.build
On 27 Jan 2008, at 17:24, Upul Godage wrote: May be there weren't any payload (any content in the SOAP Body) in the request message. It's not possible. On the sender side I have if (payload == null) { log and throw exception } send request Before the request hits the target WS there's a handler which plays with the SOAP header (so the SOAP header is not null). Since on the sender side I was using the AUTO_RELEASE_CONNECTION property, is it possible that the connection is closed *before* the SOAP body is sent? Michele You can check with the tcp monitor. Just a guess. Upul On Jan 27, 2008 9:31 PM, Michele Mazzucco [EMAIL PROTECTED] wrote: Hi all, I'm getting the following NPE ?xml version='1.0' encoding='utf-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:wsa=http://www.w3.org/2005/08/ addressingsoapenv:Headerwsa:Tohttp://giga25.ncl.ac.uk:8081/ axis2/services/StreamRoutingService/ wsa:Towsa:ReplyTowsa:Addresshttp://www.w3.org/2005/08/addressing/ none/wsa:Address/wsa:ReplyTowsa:MessageIDurn:uuid: 8FD04872177CD5B0B51201449279062/wsa:MessageIDwsa:Actionhttp:// www.w3.org/2005/08/addressing/soap/fault/ wsa:Actionwsa:RelatesTourn:uuid:AA63B875CD706216A51201449279307/ wsa:RelatesTo/ soapenv:Headersoapenv:Bodysoapenv:Faultfaultcodesoapenv:Server /f aultcodefaultstringunknown/ faultstringdetailExceptionorg.apache.axis2.AxisFault at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) at org.apache.axis2.AxisFault.makeFault(AxisFault.java:406) at org.apache.axis2.receivers.RawXMLINOutMessageReceiver.invokeBusinessLo gi c(RawXMLINOutMessageReceiver.java:108) at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusi ne ssLogic(AbstractInOutSyncMessageReceiver.java:42) 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.processHTTPPostRequ es t(HTTPTransportUtils.java:275) at org.apache.axis2.transport.http.AxisServlet.doPost (AxisServlet.java:120) 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: 664) 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) Caused by: java.lang.NullPointerException at ncl.qosp.test.functional.services.Service1.test (Service1.java:24) 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:585) at org.apache.axis2.receivers.RawXMLINOutMessageReceiver.invokeBusinessLo gi c(RawXMLINOutMessageReceiver.java:97) ... 21 more /Exception/detail/soapenv:Fault/soapenv:Body/ soapenv:Envelope where line 24 the target method is highlighted below. public OMElement test(OMElement payload) { payload.build(); // - line 24 final long spinLockLenght = ServiceSupport.getSpinLockLength (payload); ServiceSupport.spinLock(spinLockLenght); return ServiceSupport.getResult(Service1.class.getSimpleName ()); } How's that possible? Michele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED
Re: [axis2] NPE on OMElement.build
Apologize, it was my fault -- I was sending the same message twice. Michele On 28 Jan 2008, at 09:49, Michele Mazzucco wrote: On 27 Jan 2008, at 17:24, Upul Godage wrote: May be there weren't any payload (any content in the SOAP Body) in the request message. It's not possible. On the sender side I have if (payload == null) { log and throw exception } send request Before the request hits the target WS there's a handler which plays with the SOAP header (so the SOAP header is not null). Since on the sender side I was using the AUTO_RELEASE_CONNECTION property, is it possible that the connection is closed *before* the SOAP body is sent? Michele You can check with the tcp monitor. Just a guess. Upul On Jan 27, 2008 9:31 PM, Michele Mazzucco [EMAIL PROTECTED] wrote: Hi all, I'm getting the following NPE ?xml version='1.0' encoding='utf-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:wsa=http://www.w3.org/2005/08/ addressingsoapenv:Headerwsa:Tohttp://giga25.ncl.ac.uk:8081/ axis2/services/StreamRoutingService/ wsa:Towsa:ReplyTowsa:Addresshttp://www.w3.org/2005/08/ addressing/ none/wsa:Address/wsa:ReplyTowsa:MessageIDurn:uuid: 8FD04872177CD5B0B51201449279062/wsa:MessageIDwsa:Actionhttp:// www.w3.org/2005/08/addressing/soap/fault/ wsa:Actionwsa:RelatesTourn:uuid:AA63B875CD706216A51201449279307/ wsa:RelatesTo/ soapenv:Headersoapenv:Bodysoapenv:Faultfaultcodesoapenv:Server /f aultcodefaultstringunknown/ faultstringdetailExceptionorg.apache.axis2.AxisFault at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) at org.apache.axis2.AxisFault.makeFault(AxisFault.java:406) at org.apache.axis2.receivers.RawXMLINOutMessageReceiver.invokeBusinessL ogi c(RawXMLINOutMessageReceiver.java:108) at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBus ine ssLogic(AbstractInOutSyncMessageReceiver.java:42) 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.processHTTPPostReq ues t(HTTPTransportUtils.java:275) at org.apache.axis2.transport.http.AxisServlet.doPost (AxisServlet.java:120) 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: 664) 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) Caused by: java.lang.NullPointerException at ncl.qosp.test.functional.services.Service1.test (Service1.java:24) 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:585) at org.apache.axis2.receivers.RawXMLINOutMessageReceiver.invokeBusinessL ogi c(RawXMLINOutMessageReceiver.java:97) ... 21 more /Exception/detail/soapenv:Fault/soapenv:Body/ soapenv:Envelope where line 24 the target method is highlighted below. public OMElement test(OMElement payload) { payload.build(); // - line 24 final long spinLockLenght = ServiceSupport.getSpinLockLength (payload); ServiceSupport.spinLock(spinLockLenght); return ServiceSupport.getResult(Service1.class.getSimpleName ()); } How's that possible? Michele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail
Re: Transport out has not been set
Try options.setTransportInProtocol(Constants.TRANSPORT_JMS); Michele On 27 Jan 2008, at 14:14, henry human wrote: Hi In the past two days I am trying to implement a simple Echo service binding jms. As long as I run my client I get error : org.apache.axis2.AxisFault: Transport out has not been set at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:383) at org.apache.axis2.description.OutInAxisOperationClient.send (OutInAxisOperation.java:374) ….. the soap address which I bind to is: jms:/myqueue? transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactoryjava.na ming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFa ctoryjava.naming.provider.url=tcp://localhost:61616); It seems that axis above in url does not recognize the jms to bind a protocol. I did a test, changing the url to something like http://localhost..; and I see that axis could get the Http TransportSender very well and client application builds a connection to the service! I read several comments in web where the similar error has been reported and has been solved adding missing jars. In my case I have all jars in the classpath! It seems that the TransportSender could not be initiated. I will be appreciated for your help Machen Sie Yahoo! zu Ihrer Startseite. Los geht's: http://de.yahoo.com/set - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[axis2] NPE on OMElement.build
Hi all, I'm getting the following NPE ?xml version='1.0' encoding='utf-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:wsa=http://www.w3.org/2005/08/ addressingsoapenv:Headerwsa:Tohttp://giga25.ncl.ac.uk:8081/ axis2/services/StreamRoutingService/ wsa:Towsa:ReplyTowsa:Addresshttp://www.w3.org/2005/08/addressing/ none/wsa:Address/wsa:ReplyTowsa:MessageIDurn:uuid: 8FD04872177CD5B0B51201449279062/wsa:MessageIDwsa:Actionhttp:// www.w3.org/2005/08/addressing/soap/fault/ wsa:Actionwsa:RelatesTourn:uuid:AA63B875CD706216A51201449279307/ wsa:RelatesTo/ soapenv:Headersoapenv:Bodysoapenv:Faultfaultcodesoapenv:Server/f aultcodefaultstringunknown/ faultstringdetailExceptionorg.apache.axis2.AxisFault at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) at org.apache.axis2.AxisFault.makeFault(AxisFault.java:406) at org.apache.axis2.receivers.RawXMLINOutMessageReceiver.invokeBusinessLogi c(RawXMLINOutMessageReceiver.java:108) at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusine ssLogic(AbstractInOutSyncMessageReceiver.java:42) 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.processHTTPPostReques t(HTTPTransportUtils.java:275) at org.apache.axis2.transport.http.AxisServlet.doPost (AxisServlet.java:120) 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:664) 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) Caused by: java.lang.NullPointerException at ncl.qosp.test.functional.services.Service1.test(Service1.java:24) 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:585) at org.apache.axis2.receivers.RawXMLINOutMessageReceiver.invokeBusinessLogi c(RawXMLINOutMessageReceiver.java:97) ... 21 more /Exception/detail/soapenv:Fault/soapenv:Body/soapenv:Envelope where line 24 the target method is highlighted below. public OMElement test(OMElement payload) { payload.build(); // - line 24 final long spinLockLenght = ServiceSupport.getSpinLockLength (payload); ServiceSupport.spinLock(spinLockLenght); return ServiceSupport.getResult(Service1.class.getSimpleName ()); } How's that possible? Michele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [axis2] problems with ServiceClient.sendRobust()
The 1.3 release. Michele On 25 Jan 2008, at 07:32, Deepal jayasinghe wrote: hmm , strange Are you using Axis2 SNAPSHOT or 1.3 release ? Thanks Deepal Hello everybody, I get this error when I invoke the sendRobust method org.apache.axis2.AxisFault: Time out while waiting for the server to send the response. at org.apache.axis2.description.OutInAxisOperationClient $SyncCallBack.waitForCompletion(OutInAxisOperation.java:469) at org.apache.axis2.description.OutInAxisOperationClient.sendAsync (OutInAxisOperation.java:286) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl (OutInAxisOperation.java:207) at org.apache.axis2.client.OperationClient.execute (OperationClient.java:163) at org.apache.axis2.client.ServiceClient.sendRobust (ServiceClient.java:454) at org.apache.axis2.client.ServiceClient.sendRobust (ServiceClient.java:434) at ncl.qosp.controller.service.streams.Sender.send(Sender.java:354) at ncl.qosp.controller.service.streams.StreamServiceHandlerImpl.queue (StreamServiceHandlerImpl.java:510) at ncl.qosp.controller.service.streams.StreamServiceHandlerImpl.queue (StreamServiceHandlerImpl.java:1) at ncl.qosp.controller.dispatcher.streams.StreamDispatcherImpl.queue (StreamDispatcherImpl.java:662) at ncl.qosp.controller.streams.StreamRoutingService.forward (StreamRoutingService.java:525) 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:585) at org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver.invokeBusiness Logic(RawXMLINOnlyMessageReceiver.java:90) 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.processHTTPPostReq uest(HTTPTransportUtils.java:275) at org.apache.axis2.transport.http.AxisServlet.doPost (AxisServlet.java:120) 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: 664) 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) Which kind of response is Axis2 waiting for, since the MEP is in- only? In fact I think the operation should be of type OutOnlyAxisOperation, not OutInAxisOperation. Michele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [axis2] issues in using custom configuration context
Deepal, the only change I've made was the port for the http listener. The axis2.xml was attached to my first email -- I'm including it to this email too. !-- ~ Licensed to the Apache Software Foundation (ASF) under one ~ or more contributor license agreements. See the NOTICE file ~ distributed with this work for additional information ~ regarding copyright ownership. The ASF licenses this file ~ to you under the Apache License, Version 2.0 (the ~ License); you may not use this file except in compliance ~ with the License. You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, ~ software distributed under the License is distributed on an ~ AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~ KIND, either express or implied. See the License for the ~ specific language governing permissions and limitations ~ under the License. -- axisconfig name=AxisJava2.0 !-- = -- !-- Parameters -- !-- = -- parameter name=hotdeploymenttrue/parameter parameter name=hotupdatefalse/parameter parameter name=enableMTOMfalse/parameter parameter name=enableSwAfalse/parameter !--Uncomment if you want to enable file caching for attachments -- !--parameter name=cacheAttachmentstrue/parameter parameter name=attachmentDIR/parameter parameter name=sizeThreshold4000/parameter-- !--This will give out the timout of the configuration contexts, in milliseconds-- parameter name=ConfigContextTimeoutInterval3/parameter !--During a fault, stack trace can be sent with the fault message. The following flag will control -- !--that behavior.-- parameter name=sendStacktraceDetailsWithFaultsfalse/parameter !--If there aren't any information available to find out the fault reason, we set the message of the exception-- !--as the faultreason/Reason. But when a fault is thrown from a service or some where, it will be -- !--wrapped by different levels. Due to this the initial exception message can be lost. If this flag-- !--is set, then Axis2 tries to get the first exception and set its message as the faultreason/Reason.-- parameter name=DrillDownToRootCauseForFaultReasonfalse/parameter parameter name=userNameadmin/parameter parameter name=passwordaxis2/parameter !--To override repository/services you need to uncomment following parameter and value SHOULD be absolute file path.-- !--ServicesDirectory only works on the following cases-- !---File based configurator and in that case the value should be a file URL (http:// not allowed)-- !---When creating URL Based configurator with URL âÃúfile://âÃù -- !--- War based configurator with expanded case , -- !--All the other scenarios it will be ignored.-- !--parameter name=ServicesDirectoryservice/parameter-- !--To override repository/modules you need to uncomment following parameter and value SHOULD be absolute file path-- !--parameter name=ModulesDirectorymodules/parameter-- !--Following params will set the proper context paths for invocations. All the endpoints will have a commons context-- !--root which can configured using the following contextRoot parameter-- !--parameter name=contextRootaxis2/parameter-- !--Our HTTP endpoints can handle both REST and SOAP. Following parameters can be used to distinguiush those endpoints-- !--In case of a servlet, if you change this you have to manually change the settings of your servlet container to map this -- !--context path to proper Axis2 servlets-- !--parameter name=servicePathservices/parameter-- !--parameter name=restPathrest/parameter-- !-- Following parameter will completely disable REST handling in Axis2-- parameter name=disableREST locked=truetrue/parameter !--POJO deployer , this will alow users to drop .class file and make that into a service deployer extension=.class directory=pojo class=org.apache.axis2.deployment.POJODeployer/ -- !-- Following parameter will set the host name for the epr-- parameter name=hostname locked=trueclient.com/parameter !-- If you have a front end host which exposes this webservice using a different public URL -- !-- use this parameter to override autodetected url -- !--parameter name=httpFrontendHostUrlhttps://someotherhost/context/parameter-- !--The way of adding listener to the system-- !--listener class=org.apache.axis2.ObserverIMPL-- !--parameter name=RSS_URLhttp://127.0.0.1/rss/parameter-- !--/listener-- !-- = -- !-- Message Receivers -- !-- = -- !--This is the deafult MessageReceiver for the system , if you want to
Re: [axis2] issues in using custom configuration context
Hi again, some more details. If the configuration context is created using the following statement ConfigurationContext configurationContext = ConfigurationContextFactory .createConfigurationContextFromFileSystem(null, null); and then the customization is made as before (i.e. MultiThreadedHttpConnectionManager and cached HttpClient) the system seems to work fine. Michele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [axis2] issues in using custom configuration context
Deepal, apart from that I made no changes at all. Here is my code. try { sender = new ServiceClient(getConfiguration(), null); } catch (Exception e) { throw new RuntimeException(e); } synchronized (ENGAGE_MODULE_LOCK) { sender.engageModule(Constants.MODULE_ADDRESSING); } private ConfigurationContext getConfiguration() throws Exception { ConfigurationContext configurationContext = ConfigurationContextFactory .createConfigurationContextFromFileSystem(null, null); HttpConnectionManager connectionManager = new MultiThreadedHttpConnectionManager(); HttpConnectionManagerParams connectionManagerParams = new HttpConnectionManagerParams(); // 10 seconds connectionManagerParams.setConnectionTimeout(1); connectionManagerParams.setMaxConnectionsPerHost( HostConfiguration.ANY_HOST_CONFIGURATION, 30); connectionManagerParams.setDefaultMaxConnectionsPerHost(30); connectionManagerParams.setMaxTotalConnections(200); connectionManagerParams.setTcpNoDelay(true); connectionManagerParams.setStaleCheckingEnabled(true); connectionManagerParams.setLinger(-1); HttpClient httpClient = new HttpClient(connectionManager); configurationContext.setThreadPool(new ThreadPool(1, 5)); configurationContext.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE); configurationContext.setProperty(HTTPConstants.CACHED_HTTP_CLIENT, httpClient); return configurationContext; } However using this set up I've noticed that after some time I get a BindException -- I think it's because I use only one AxisCallback object to receive many responses. Michele On 25 Jan 2008, at 10:02, Deepal Jayasinghe wrote: hmm ,if that is the case there should be something wrong with your axis2.xml . So what are the additional changes that you have made ? Thanks Deepal Hi again, some more details. If the configuration context is created using the following statement ConfigurationContext configurationContext = ConfigurationContextFactory .createConfigurationContextFromFileSystem(null, null); and then the customization is made as before (i.e. MultiThreadedHttpConnectionManager and cached HttpClient) the system seems to work fine. Michele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[axis2] issues in using custom configuration context
Hi all, I'm struggling to get my client working with a custom configuration context (the configuration file is attached): - The interaction is asynchronous (i.e. a callback object is in charge to receive responses) - If the service client is created by using the default (empty) constructor then the message is received by the server - It the service client is created by using the new ServiceClient(confCtx, null) constructor, messages are not received by the server (on the server I have a custom handler configured to run as first into the handler's chain, and it's not invoked), even if it looks that the message has been sent -- and no error occurs. I've noticed that if the interaction is synchronous (in-out) everything works fine. The custom configuration context is created the following way URL url = AbstractClient.class.getResource(axis2.xml); if (url == null) { throw new IllegalStateException(The URL for the axis2 config. file is NULL); } configurationContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem (axis2Home .concat(/repository), url.getPath()); connectionManager = new MultiThreadedHttpConnectionManager(); HttpConnectionManagerParams connectionManagerParams = new HttpConnectionManagerParams(); // 10 seconds connectionManagerParams.setConnectionTimeout(1); connectionManagerParams.setMaxConnectionsPerHost( HostConfiguration.ANY_HOST_CONFIGURATION, 30); connectionManagerParams.setDefaultMaxConnectionsPerHost(30); connectionManagerParams.setMaxTotalConnections(200); connectionManagerParams.setTcpNoDelay(true); connectionManagerParams.setStaleCheckingEnabled(true); connectionManagerParams.setLinger(-1); HttpClient httpClient = new HttpClient(connectionManager); try { configurationContext.setThreadPool(new ThreadPool(1, 5)); } catch (AxisFault e) { System.err.println(Unable to set the thread pool); } configurationContext.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE); configurationContext.setProperty(HTTPConstants.CACHED_HTTP_CLIENT, httpClient); I would like to stress out that the two implementations differ only in the way the ServiceClient object is created. Furthermore, since I'm using the same ServiceClient to execute several MEPs, I cannot use the default constructor because of the following problems: 1 - A BindException occurs after some messages have been sent (even if I call ServiceClient.cleanupTransport() after each sendReceiveNonBlocking() invocation) [java] ERROR 14:14:14,824 (DefaultConnectionListenerFailureHandler.java:102) - Terminating connection listener [EMAIL PROTECTED] after 10retries in 0 seconds. [java] java.net.BindException: Address already in use [java] at java.net.PlainSocketImpl.socketBind(Native Method) [java] at java.net.PlainSocketImpl.bind (PlainSocketImpl.java:359) [java] at java.net.ServerSocket.bind(ServerSocket.java:319) [java] at java.net.ServerSocket.init(ServerSocket.java:185) [java] at java.net.ServerSocket.init(ServerSocket.java:97) [java] at org.apache.axis2.transport.http.server.DefaultConnectionListener.run (DefaultConnectionListener.java:72) [java] at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor $Worker.runTask(ThreadPoolExecutor.java:665) [java] at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor $Worker.run(ThreadPoolExecutor.java:690) [java] at java.lang.Thread.run(Thread.java:613) 2 - I need to share the same configuration context between different ServiceClient instances, where each instance is driven by a different thread. The ServiceClient is created using the following code sender = new ServiceClient();//getParams().configurationContext, null); synchronized (ENGAGE_MODULE_LOCK) { sender.engageModule(Constants.MODULE_ADDRESSING); } // creates the header containing the cookie OMElement cookieElement = factory.createOMElement (SOAPConstants.COOKIE, omNs); cookieElement.setText(String.valueOf(cookie)); // set the stream into the header. All following sender.send(...) // will include the cookie into the SOAP header sender.addHeader(cookieElement); sender.setOptions(getOptions()); where the options are created using the following chunk of code: protected Options getOptions() { Options options = new Options(); options.setTo(getTargetEpr()); options.setAction(getSoapAction()); // The boolean flag informs the axis2 engine to use two separate // transport connection // to retrieve the response. options.setUseSeparateListener(true); options.setTransportInProtocol(Constants.TRANSPORT_HTTP); options.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI); options.setProperty(HTTPConstants.CHUNKED, Boolean.FALSE);
[axis2] problems with ServiceClient.sendRobust()
Hello everybody, I get this error when I invoke the sendRobust method org.apache.axis2.AxisFault: Time out while waiting for the server to send the response. at org.apache.axis2.description.OutInAxisOperationClient $SyncCallBack.waitForCompletion(OutInAxisOperation.java:469) at org.apache.axis2.description.OutInAxisOperationClient.sendAsync(OutInAxisOperation.java:286) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:207) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) at org.apache.axis2.client.ServiceClient.sendRobust(ServiceClient.java:454) at org.apache.axis2.client.ServiceClient.sendRobust(ServiceClient.java:434) at ncl.qosp.controller.service.streams.Sender.send(Sender.java:354) at ncl.qosp.controller.service.streams.StreamServiceHandlerImpl.queue(StreamServiceHandlerImpl.java:510) at ncl.qosp.controller.service.streams.StreamServiceHandlerImpl.queue(StreamServiceHandlerImpl.java:1) at ncl.qosp.controller.dispatcher.streams.StreamDispatcherImpl.queue(StreamDispatcherImpl.java:662) at ncl.qosp.controller.streams.StreamRoutingService.forward(StreamRoutingService.java:525) 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:585) at org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver.invokeBusinessLogic(RawXMLINOnlyMessageReceiver.java:90) 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.processHTTPPostRequest(HTTPTransportUtils.java:275) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:120) 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:664) 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) Which kind of response is Axis2 waiting for, since the MEP is in-only? In fact I think the operation should be of type OutOnlyAxisOperation, not OutInAxisOperation. Michele - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [axis2] ServiceClient.sendReceive blocks application forever
Pär, 1 - There's no exception on the server side 2 - I've set a timeout on opened connections, and I require the connection manager to check for stale connections 3 - Using the same HttpClient will improve the system performance (but if your client uses multiple thread you'll need to configure it to use a multithreaded connection manager) 4 - The problem seems to arise (but I'm not 100% sure) only when the same ServiceClient is used for different usage patterns, in my case synchronous and asynchronous in/out (every time I override the options) Michele On 23 Jan 2008, at 10:19, Pär Malmqvist wrote: Hi Michele! I have seen the same the same thing with a simple client when an exception is thrown from the server. I posted the issue here on the axis list ago. I found that when using configurationContext.setProperty (HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE); the client hangs. When FALSE it works fine. Can you try to use use HTTPConstants.REUSE_HTTP_CLIENT = Boolean.FALSE and se what happens? It would be interesting to know. /Pär Subject: [axis2] ServiceClient.sendReceive blocks application forever From: [EMAIL PROTECTED] To: axis-user@ws.apache.org Date: Tue, 22 Jan 2008 17:14:12 + Hi all, after some calls to ServiceClient.sendReceive() my client app. blocks forever. On the server side there are no error messages, the same on the client. By using jstack I've found out that my client blocks on sendReceive(), however the target operation is very fast Here is the output of jstack Full thread dump Java HotSpot(TM) Server VM (1.6.0_03-b05 mixed mode): Attach Listener daemon prio=10 tid=0x08790800 nid=0x32bf runnable [0x..0x] java.lang.Thread.State: RUNNABLE Locked ownable synchronizers: - None Axis2 Task daemon prio=10 tid=0x08762800 nid=0x3261 in Object.wait() [0x8240d000..0x8240e030] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on 0x85b10070 (a org.apache.commons.httpclient.MultiThreadedHttpConnectionManager $ConnectionPool) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.doGet Connection(MultiThreadedHttpConnectionManager.java:509) - locked 0x85b10070 (a org.apache.commons.httpclient.MultiThreadedHttpConnectionManager $ConnectionPool) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.getCo nnectionWithTimeout(MultiThreadedHttpConnectionManager.java:394) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod (HttpMethodDirector.java:152) at org.apache.commons.httpclient.HttpClient.executeMethod (HttpClient.java:396) at org.apache.commons.httpclient.HttpClient.executeMethod (HttpClient.java:346) at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod (AbstractHTTPSender.java:520) at org.apache.axis2.transport.http.HTTPSender.sendViaPost (HTTPSender.java:191) at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessag eWithCommons(CommonsHTTPTransportSender.java:327) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke (CommonsHTTPTransportSender.java:206) at org.apache.axis2.engine.AxisEngine $TransportNonBlockingInvocationWorker.run(AxisEngine.java:516) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor $Worker.runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor $Worker.run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:619) Locked ownable synchronizers: - None HttpListener-11000-1 prio=10 tid=0x08761c00 nid=0x3260 runnable [0x8245e000..0x8245efb0] java.lang.Thread.State: RUNNABLE at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384) - locked 0x85b10430 (a java.net.SocksSocketImpl) at java.net.ServerSocket.implAccept(ServerSocket.java:453) at java.net.ServerSocket.accept(ServerSocket.java:421) at org.apache.axis2.transport.http.server.DefaultConnectionListener.run (DefaultConnectionListener.java:79) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor $Worker.runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor $Worker.run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:619) Locked ownable synchronizers: - None MultiThreadedHttpConnectionManager cleanup daemon prio=10 tid=0x08758000 nid=0x325f in Object.wait() [0x824af000..0x824b0130] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on 0x85b10610 (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116) - locked 0x85b10610 (a java.lang.ref.ReferenceQueue$Lock) at
Re: [axis2] ServiceClient.sendReceive blocks application forever
Pär, what you said makes me think that maybe the cause is that the system blocks when all connections are busy. Does it make any sense? Michele On 23 Jan 2008, at 10:19, Pär Malmqvist wrote: Hi Michele! I have seen the same the same thing with a simple client when an exception is thrown from the server. I posted the issue here on the axis list ago. I found that when using configurationContext.setProperty (HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE); the client hangs. When FALSE it works fine. Can you try to use use HTTPConstants.REUSE_HTTP_CLIENT = Boolean.FALSE and se what happens? It would be interesting to know. /Pär Subject: [axis2] ServiceClient.sendReceive blocks application forever From: [EMAIL PROTECTED] To: axis-user@ws.apache.org Date: Tue, 22 Jan 2008 17:14:12 + Hi all, after some calls to ServiceClient.sendReceive() my client app. blocks forever. On the server side there are no error messages, the same on the client. By using jstack I've found out that my client blocks on sendReceive(), however the target operation is very fast Here is the output of jstack Full thread dump Java HotSpot(TM) Server VM (1.6.0_03-b05 mixed mode): Attach Listener daemon prio=10 tid=0x08790800 nid=0x32bf runnable [0x..0x] java.lang.Thread.State: RUNNABLE Locked ownable synchronizers: - None Axis2 Task daemon prio=10 tid=0x08762800 nid=0x3261 in Object.wait() [0x8240d000..0x8240e030] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on 0x85b10070 (a org.apache.commons.httpclient.MultiThreadedHttpConnectionManager $ConnectionPool) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.doGet Connection(MultiThreadedHttpConnectionManager.java:509) - locked 0x85b10070 (a org.apache.commons.httpclient.MultiThreadedHttpConnectionManager $ConnectionPool) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.getCo nnectionWithTimeout(MultiThreadedHttpConnectionManager.java:394) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod (HttpMethodDirector.java:152) at org.apache.commons.httpclient.HttpClient.executeMethod (HttpClient.java:396) at org.apache.commons.httpclient.HttpClient.executeMethod (HttpClient.java:346) at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod (AbstractHTTPSender.java:520) at org.apache.axis2.transport.http.HTTPSender.sendViaPost (HTTPSender.java:191) at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessag eWithCommons(CommonsHTTPTransportSender.java:327) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke (CommonsHTTPTransportSender.java:206) at org.apache.axis2.engine.AxisEngine $TransportNonBlockingInvocationWorker.run(AxisEngine.java:516) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor $Worker.runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor $Worker.run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:619) Locked ownable synchronizers: - None HttpListener-11000-1 prio=10 tid=0x08761c00 nid=0x3260 runnable [0x8245e000..0x8245efb0] java.lang.Thread.State: RUNNABLE at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384) - locked 0x85b10430 (a java.net.SocksSocketImpl) at java.net.ServerSocket.implAccept(ServerSocket.java:453) at java.net.ServerSocket.accept(ServerSocket.java:421) at org.apache.axis2.transport.http.server.DefaultConnectionListener.run (DefaultConnectionListener.java:79) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor $Worker.runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor $Worker.run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:619) Locked ownable synchronizers: - None MultiThreadedHttpConnectionManager cleanup daemon prio=10 tid=0x08758000 nid=0x325f in Object.wait() [0x824af000..0x824b0130] java.lang.Thread.State: TIMED_WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on 0x85b10610 (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116) - locked 0x85b10610 (a java.lang.ref.ReferenceQueue$Lock) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager $ReferenceQueueThread.run(MultiThreadedHttpConnectionManager.java: 1082) Locked ownable synchronizers: - None DestroyJavaVM prio=10 tid=0x0805a800 nid=0x3251 waiting on condition [0x..0xb7e3b080] java.lang.Thread.State: RUNNABLE Locked ownable synchronizers: - None pool-1-thread-1 prio=10 tid=0x0863cc00 nid=0x325e in Object.wait() [0x8250..0x825010b0]