RE: Cannot load SchemaTypeSystem
General observation on NPE. Might apply to your case, Shalk, or it might not. I sometimes found NPEs in the execution of generated code when I wasn't careful to exactly match the axis2 version used for generation with the version used at runtime. (missing/renamed member variables, missing/renamed methods, etc) Regards, Michael Christian Gosch-2 wrote: Ouuh sorry I missed that single .class file... but anyway, if all of the xsb stuff is on the runtime class path (i. e. the directories containing it all) this is OK. I preferred to pack this all together as a JAR and add it to the JAR zoo of the application. But that problem solved, now the constructors. The generated XyzStub class is the user-friendly frontend of all generated stuff. For standard scenarios this will do, and it has some additional constructors allowing you to add additional configuration besides the endpoint. I think this is merely a guess what may be needed in usual scenarios -- but in the simplest cases, you should be done simply using the constructor taking the endpoint only. In my case I needed additional configuration, and that forced me to use a neighbour class of XyzStub -- Xyz. This class provides some additional functionality to set up Options. I needed this to prevent the generated code to use chunked transfer, which usually is allowed to use, but was not in ma case. Not that helpful maybe, but the existing constructors should work if provided with useful non-null arguments. (but whats useful at the end...) hth, --cg -Original Message- From: sch...@afrigis.co.za [mailto:sch...@afrigis.co.za] Sent: Friday, October 09, 2009 7:31 AM To: axis-user@ws.apache.org; fryar...@gmail.com Subject: RE: Cannot load SchemaTypeSystem Awesome Michael, That did the job, in my case I had to copy it to the build directory as it is a web app but it worked perfectly. Now though I encountered a lovely surprise, a NullPointerException thrown by one of the generated stubs, specifically this line: _messageContext.getTransportOut().getSender().cleanup(_messageContext); I will add some log statements in here but I am guessing it is _messageContext. I now the stub had various constructors and for some of these if you only provide the end point it sets the other, which I believe is this _messageContext to null, not sure why those constructors exist then if you should not really be using them, or am I missing something? -- Kind Regards Schalk Neethling -- View this message in context: http://www.nabble.com/Cannot-load-SchemaTypeSystem-tp25801609p25819161.html Sent from the Axis - User mailing list archive at Nabble.com.
Re: Increase performance using axis 2 client stubs
From memory (apologies in advance if this is off the mark), I think it's the axis2 client stub that will serialize multiple calls - i.e. will finish one request/response before beginning another. So if you want to parallelize the calls, what's needed is multiple client stubs, and multiple threads to run them in. [I used java.util.concurrent.ThreadPoolExecutor, one stub object per thread, to do some basic load testing of a service.] Regards, Michael Håkon Sagehaug wrote: Hi One more thing I create the HttpClient object like this MultiThreadedHttpConnectionManager conMrg = new MultiThreadedHttpConnectionManager(); conMrg.getParams().setDefaultMaxConnectionsPerHost(10); httpClient = new HttpClient(conMrg); cheers, Håkon 2009/10/9 Håkon Sagehaug hakon.sageh...@bccs.uib.no hi all, In our project we've got a web portal that uses web services, that we call by generating stubs using axis2 lib, as the back bone. I'm looking for ways to improve the performance in the calling bit now I've stated reusing the HttpClient object that is used, we have a Util class that wrappes the logic of calliing all the services so for now we're interacting with three, and all uses the same HttpClient object. Should every call be inside a syncronized block?like this synchronized(httpClient){ call service } Or is it a better way to do this?Could the http clients be in a pool managed by tomcat in some way? Also if there is any other tricks on how to increase performace on client side axis2 calls, please say how cheers, Håkon -- Håkon Sagehaug, Scientific Programmer Parallab, Bergen Center for Computational Science (BCCS) UNIFOB AS (University of Bergen Research Company) -- Håkon Sagehaug, Scientific Programmer Parallab, Bergen Center for Computational Science (BCCS) UNIFOB AS (University of Bergen Research Company) -- View this message in context: http://www.nabble.com/Increase-performance-using-axis-2-client-stubs-tp25819232p25819536.html Sent from the Axis - User mailing list archive at Nabble.com.
Re: Increase performance using axis 2 client stubs
Again apologies in advance if I've misunderstood. You talked of a util that encapsulates three WS client stub calls (all calls on the same HttpClient object). This util executes in a web container thread triggered by a request to your portal app. You want to speed up the execution of the util. My observation/suggestion is that, assuming the WS calls don't *need* to be consecutive, you can speed things up by making all of the WS calls simultaneously. As it stands, it sounds to me like all of the action happens in the single web container thread allocated to the request. The util executes in this thread, the util makes calls to each of the stubs it holds, also in this single thread. It's with multiple threads (and stubs), not a pool of connections, that you can make the stub calls simultaneous. (although pooling the stubs/connections should certainly help performance too) To do this your util must create the extra threads it needs, or take them from a threadpool, or whatever. In any case it needs to call each stub in a separate thread, not just in the single thread allocated to the request. Regards, Michael Håkon Sagehaug wrote: Hi Thanks for the replys, I could tell little more about my setup perhaps. I've got on eConfigurationContext that is shared between the stubs, each service has one stub connecte to it. Thw web app is running inside tomcat, so the util class that is responsible for calling managing the stubs, is I guess on instance per thread, if on erequest to the web app equals one thread. Hence one stub per service per thread. One way to go is a pool of stunbs I guess shared by the web application. cheers, Håkon 2009/10/9 mfr fryar...@gmail.com From memory (apologies in advance if this is off the mark), I think it's the axis2 client stub that will serialize multiple calls - i.e. will finish one request/response before beginning another. So if you want to parallelize the calls, what's needed is multiple client stubs, and multiple threads to run them in. [I used java.util.concurrent.ThreadPoolExecutor, one stub object per thread, to do some basic load testing of a service.] Regards, Michael -- View this message in context: http://www.nabble.com/Increase-performance-using-axis-2-client-stubs-tp25819232p25822510.html Sent from the Axis - User mailing list archive at Nabble.com.