Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm trying to build a SOAP message generator that will generate SOAP messages of different kinds that I have specified. Each of these messages also has a reply that will be coming back. The meaning of this generator is to generate SOAP messages and measure performance on some equipment that the messages are being sent over. I therefor need to be able to generate messages at a high pace and while sending them I also need to confirm how many messages where dropped, if any.

My basic plan in this project is to send and receive the SOAP messages (and replies) in different Threads to allow for maximum performance. I've tried to read up on SOAP by reading the Wikipedia and W3Schools articles here:

http://www.w3schools.com/soap/default.asp

http://en.wikipedia.org/wiki/SOAP

http://www.w3schools.com/wsdl/wsdl_intro.asp

http://en.wikipedia.org/wiki/Web_Services_Description_Language

I still haven't got a clear picture on how SOAP works though. Is it possible to send and receive replies in different Threads? How could this be done?

If it's not possible I guess the SOAP message/reply would have to go through the same "socket". Is it possible to send multiple messages without waiting for a reply over the same "socket"? How could that be done? (just keep looping and sending?)

Java and Apache CXF will be used in the implementation. I would greatly appreciate any thoughts, guidelines or general ideas on this subject.

EDIT: There are a lot of recommendations on using other tools but however silly it might sound I really would like to invent the wheel again and write my own little performance testing environment. What I really wish to know is about the message flow in SOAP. I've clarified the questions a bit.

share|improve this question
1  
You are looking a bit low-level. If you do decided to write this in Java, spawn a few threads and use an HTTP Client library to send the soap requests. Even better, use a Soap Client. stackoverflow.com/questions/4296432/a-simple-java-soap-client –  gahooa Feb 3 '13 at 20:40
1  
SoapUI might be able to help you: soapui.org –  Jesse C. Slicer Feb 4 '13 at 0:46

4 Answers 4

JMeter is an easy to use load testing tool with UI which also is able to send SOAP requests see here. I think it would be exactly what you are searching for.

share|improve this answer
1  
Thank you for your recommendation but however silly it might sound I really would like to invent the wheel again and write my own little performance testing environment. I will look at this tool for inspiration though :) –  span Feb 4 '13 at 7:42

While what you are saying is possible, I think you would be much better served by using a load-testing tool like ab which comes with apache.

It has options like -H to allow custom HTTP headers, and -p to allow you to specify the contents to post.

SOAP is an XML format. Just get a sample message and use ab to slam your web-service.

For load-testing a regular page, I run:

[jason@step AppCove]$ ab -n 100 -c 10 http://www.appcove.com/
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking www.appcove.com (be patient).....done


Server Software:        nginx/1.2.3
Server Hostname:        www.appcove.com
Server Port:            80

Document Path:          /
Document Length:        5516 bytes

Concurrency Level:      10
Time taken for tests:   1.128 seconds
Complete requests:      100
Failed requests:        0
Write errors:           0
Total transferred:      574700 bytes
HTML transferred:       551600 bytes
Requests per second:    88.61 [#/sec] (mean)
Time per request:       112.849 [ms] (mean)
Time per request:       11.285 [ms] (mean, across all concurrent requests)
Transfer rate:          497.33 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       50   53   1.6     53      63
Processing:    52   58   4.0     57      75
Waiting:       52   57   3.8     56      74
Total:        104  111   4.3    110     129

Percentage of the requests served within a certain time (ms)
  50%    110
  66%    111
  75%    111
  80%    112
  90%    117
  95%    121
  98%    127
  99%    129
 100%    129 (longest request)
[jason@step AppCove]$
share|improve this answer
    
This looks lika a pretty awesome tool. If I wanted to simulate lets say 1500 connections at the same time, would this tool help me accomplish that? –  span Feb 3 '13 at 20:45

I can recommend "Soap Sonar" - worked great for me when I needed to test a bunch of stuff. http://www.crosschecknet.com/download/p_cust_info_try_p.php

share|improve this answer
1  
Thank you for your recommendation but however silly it might sound I really would like to invent the wheel again and write my own little performance testing environment. I will look at this tool for inspiration though :) –  span Feb 4 '13 at 7:43
    
Fair enough, you'll learn stuff... but don't waste your time ! –  LachlanB Feb 4 '13 at 22:32

Some colleagues of mine have recently used SOAPUI for doing some load tests for their services. There's also something called LoadUI.

Using both of these tools you can do some fantastic testing of your services.

I'm not really familiar with all of the functionality in these tools, but it appears you can also create some kind of workflow to follow in your testing scenario.

share|improve this answer
1  
Thank you for your recommendation! I've looked at these tools but I really wish to write my own generator to allow for maximum control and flexibility. –  span Feb 4 '13 at 12:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.