Josef und Schuler und Schüler
I suggest running Jmeter at command line thri mvn with maven-jmeterplugin at http://wiki.apache.org/jmeter/JMeterMavenPlugin concerning Josef's suggestion of callback you could create a simple AxisCallback as seen here AxisCallback callback = new AxisCallback() { /** * This is called when we receive a message. * * @param msgContext the (response) MessageContext */ public void onMessage(MessageContext msgContext) { OMElement result = msgContext.getEnvelope().getBody().getFirstElement(); TestingUtils.compareWithCreatedOMElement(result); log.debug("result = " + result); } /** * This gets called when a fault message is received. * * @param msgContext the MessageContext containing the fault. */ public void onFault(MessageContext msgContext) { fail("Fault received"); } /** * This gets called ONLY when an internal processing exception occurs. * * @param e the Exception which caused the problem */ public void onError(Exception e) { } /** This is called at the end of the MEP no matter what happens, quite like a finally block. */ public void onComplete() { finish = true; try { notify(); } catch(Exception excp) { System.err.println("AsyncServiceTest::onComplete throws Exception message="+excp.getMessage()); } } }; sender = new ServiceClient(configcontext, service); sender.setOptions(options); sender.sendReceiveNonBlocking(operationName, method, callback); log.info("send the request"); synchronized (callback) { if (!finish) { callback.wait(45000); if (!finish) { throw new AxisFault( "Server was shutdown as the async response take too long to complete"); } } } ServiceClient object calls: public void sendReceiveNonBlocking(QName operation, OMElement elem, AxisCallback callback) throws AxisFault { MessageContext mc = new MessageContext(); fillSOAPEnvelope(mc, elem); OperationClient mepClient = createClient(operation); // here a blocking invocation happens in a new thread, so the // progamming model is non blocking mepClient.setCallback(callback); mepClient.addMessageContext(mc); mepClient.execute(false); } callback will route toonMessage for normal processing onError for handling error onFault for handling faults I dont understand the need for a new protocol when HTTP 1.1 using NIO connector will handle any callback nicelyperhaps you can explain? Viel Gluck! Martin ______________________________________________ Verzicht und Vertraulichkeitanmerkung Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Subject: AW: AW: AW: a question about Axis2 performance test with JMeter Date: Thu, 31 Jan 2013 14:41:20 +0100 From: josef.stadelm...@axa-winterthur.ch To: java-user@axis.apache.org Hi Yunxi as you said, fireAndForget() sends without expecting a response OK given the web-service intends to answer this fireAndForget() request you need to pass it an address OK,this is normally done in an addressing header also engaging the addressing.mar of axis2 (requestor and responder) each side how do you intend to do that ? well I think for your service requestor and for your web-service this is no problem, you have done so ! What you in fact implement that way is some sort of an asynchronous request response behavior (a protocol) which you might achieve differently too using axis2. BUT In any case, if the requestor does not wait for the responder the responder needs to know the network address & port of the http-listener maybe a callback routine which handles this late returning asynchronous response event Regarding JMeterit must play very exactly the role of your service requestorit is the requestor, and hence it has to send a request and all the responder needs to know to call back later at asynchronous time, laterit has to prepare for the responder the same environment as said aboveby passing listeners address and portby passing a call back routine which shall handle the response event In this regard it is very logically what JMeter needs to do. BUTI think you can't do that with JMeter as it stands today.JMeter is very menu driven, and that limits you (potentially). I would suggest to try to contact the developer of JMeter offline and ask about such further going possibilities. Also I encourage others in the forum to participate on this interesting area, given they know (and I know there are some) much more then I do. Josef Von: Yunxi Zhang [mailto:zhangyx...@hotmail.com] Gesendet: Mittwoch, 30. Januar 2013 12:55 An: java-user@axis.apache.org Betreff: Re: AW: AW: a question about Axis2 performance test with JMeter Hi, Josef, Thank you for your reply. To be honest, i am a PhD student and i've been designing and developing my own protocol for two Web Services. Basically, to apply my protocol, the two Web Services should be both Web Services (i would call them as a service provider and a service requester instead of a server or a client). Due to the unique characteristics of my protocol, each Web Service can determine whether or not to send out a response message after processing a receiving message. To enable each Web Service to decide whether to send out a response message, i tried using the function fireAndForget(element) with the RawXMLInOnlyMessageReceiver, since this function can send out a message without any concerns about receiving a response, after processing an incoming message through the use of the RawXMLInOnlyMessageReceiver. In order to verify my protocol, i only want to test its performance. i then found the JMeter, which seemed as an appropriate testing tool for testing the performance of Web Services, and i've gone through the tutorial already. Normally, in order to use the fireAndForget() function, a receiver's EndpointReference as an address is required. There is no issue to enable two Web Services to communicate in this deployment, since i can set the EndpointReference of the counterpart in each Web Service. However, when the JMeter is used to simulate an initial message sender that can send a message to a Web Service and wait for the reply, i would assume that the Web Service should be able to know the address of the JMeter. That's why i asked my initial question. By the way, since i'm using Mac OS, so software and tools for Windows OS may not be suitable to my testing platform. Hope you can understand my situation and give me more suggestions on the performance testing. Best wishes, Yunxi On 29 Jan 2013, at 19:06, Stadelmann Josef wrote: Good you understand that. To be honest and say the true, I never used JMeter but I used Visual Studios Universal Test and Performance Measurement facilites to get a clue about how well we designed our .NET WCF-3.5 Web-Service SOAP/XML Client talking to or OpenVMS / TOMCAT / Apache Axis2 / Spezpla Web Service Server - talking to our integrated SPg-Legacy (some 120'000 Lines of Pascal Code on OpenVMS of course ;-)). This tools are somewhat complex to explain in 5 minutes, but I have read just briefly over the NetBeans Tutorial and I come fast into the Apache User Guide for JMeter, also real worth to read, as released by Apache. JMeter Plugin brings almost a lot components one needs to understand a bit This my impression;; The Help is therefore real worth to read; The components available to JMeter should be understood first (at least the big picture needs to be understood in proper context (your setup)); Else I think you AND I get lost in space. You can measure whatever you want ! i.e. access times to remote running FTP servers to catch down 2 files by 3 concurrent users each catching down a file 3 times ... get the recording and show a graphical output. So you need to know what you want to measure! I would not suggest to start first with Web Services but get familiar with the tools as such and more simpler things. BUT you can measure the time from when a SOAP/XML package leaves the client and when it returns to client code control. and if you like do a great job you should best start at http://jmeter.apache.org/usermanual/index.html then read click you to the user manual http://jmeter.apache.org/usermanual/index.html Or take the NetBeans Tour http://netbeans.org/kb/docs/javaee/ecommerce/test-profile.html AND Just by doing a very simple example taking the NetBeans On-Line Help; an awful a lot of information is provided. So Question: what are you all doing with so many component? You need to understand the big picture first! A sampler which will sample data for you, in your case it is a sampler able to sample SOAP messages as they arrive from the server. Be warned: I just saw Axis but not Axis2 So that's all for today/night - interesting - isn't it? AND if you can give me more details - then I might be able to help you for what to look for. Josef 18.1 Samplers FTP Request HTTP Request JDBC Request Java Request SOAP/XML-RPC Request WebService(SOAP) Request LDAP Request LDAP Extended Request Access Log Sampler BeanShell Sampler BSF Sampler JSR223 Sampler TCP Sampler JMS Publisher JMS Subscriber JMS Point-to-Point JUnit Request Mail Reader Sampler Test Action SMTP Sampler 18.2 Logic Controllers Simple Controller Loop Controller Once Only Controller Interleave Controller Random Controller Random Order Controller Throughput Controller Runtime Controller If Controller While Controller Switch Controller ForEach Controller Module Controller Include Controller Transaction Controller Recording Controller 18.3 Listeners Sample Result Save Configuration Graph Full Results Graph Results Spline Visualizer Assertion Results View Results Tree Aggregate Report View Results in Table Simple Data Writer Monitor Results Distribution Graph (alpha) Aggregate Graph Mailer Visualizer BeanShell Listener Summary Report Save Responses to a file BSF Listener JSR223 Listener Generate Summary Results Comparison Assertion Visualizer 18.4 Configuration Elements CSV Data Set Config FTP Request Defaults HTTP Authorization Manager HTTP Cache Manager HTTP Cookie Manager HTTP Request Defaults HTTP Header Manager Java Request Defaults JDBC Connection Configuration Login Config Element LDAP Request Defaults LDAP Extended Request Defaults TCP Sampler Config User Defined Variables Random Variable Counter Simple Config Element 18.5 Assertions Response Assertion Duration Assertion Size Assertion XML Assertion BeanShell Assertion MD5Hex Assertion HTML Assertion XPath Assertion XML Schema Assertion BSF Assertion JSR223 Assertion Compare Assertion SMIME Assertion 18.6 Timers Constant Timer Gaussian Random Timer Uniform Random Timer Constant Throughput Timer Synchronizing Timer BeanShell Timer BSF Timer JSR223 Timer 18.7 Pre Processors HTML Link Parser HTTP URL Re-writing Modifier HTML Parameter Mask HTTP User Parameter Modifier User Parameters BeanShell PreProcessor BSF PreProcessor JSR223 PreProcessor 18.8 Post-Processors Regular Expression Extractor XPath Extractor Result Status Action Handler BeanShell PostProcessor BSF PostProcessor JSR223 PostProcessor 18.9 Miscellaneous Features Test Plan Thread Group WorkBench SSL Manager HTTP Proxy Server HTTP Mirror Server Property Display Debug Sampler Debug PostProcessor 18.10 Reports Report Plan Report Table HTML Report Writer Report Page Line Graph Bar Chart -----Ursprüngliche Nachricht----- Von: Yunxi Zhang [mailto:zhangyx...@hotmail.com] Gesendet: Dienstag, 29. Januar 2013 12:19 An: java-user@axis.apache.org Betreff: Re: AW: a question about Axis2 performance test with JMeter Hi, Josef, Thank you for your reply. So, according to your explanation, should i use RawXMLInOutMessageReceiver. If i am going to use RawXMLInOutMessageReceiver, will the Axis2 reply to JMeter automatically or do i need to set the reply address manually? Many Thanks, Yunxi On 29 Jan 2013, at 08:32, Stadelmann Josef wrote: The RawXMLInonlyMessageReceiver hais by definition no SOAP/XML return message!There is a return to the client on the TCP/IP layer as an ACK, saying that the TCP/IP package has arrived and its content, the SOAP Message has been delivered.But that's it.Josef -----Ursprüngliche Nachricht-----Von: Yunxi Zhang [mailto:zhangyx...@hotmail.com]Gesendet: Montag, 28. Januar 2013 15:14An: java-user@axis.apache.orgBetreff: a question about Axis2 performance test with JMeter Hi, I've developed my own Web Service by using the POJO method of Axis2, and the receiver i'm using is the RawXMLInonlyMessageReceiver. Now i want to use JMeter to test the performance of my Web Service. I know JMeter can send soap messages to a Web Service, but how should i set the responding address in my Web Service to enable JMeter to obtain the correct response soap message? Has anyone got any idea about it? Regards Yunxi---------------------------------------------------------------------To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.orgFor additional commands, e-mail: java-user-h...@axis.apache.org ---------------------------------------------------------------------To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.orgFor additional commands, e-mail: java-user-h...@axis.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org For additional commands, e-mail: java-user-h...@axis.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org For additional commands, e-mail: java-user-h...@axis.apache.org