-1

Is there any SOAP Client available for free that will allow me to trigger different request messages in sequence for the same SOAP Operation?

I have 1000+ soap requests and I have created the file in file system and would like to trigger them automatically by having the SOAP client read from the file system.

The SOAP endpoint can accept one value at a time and we will be updating 1000 values so that's why we need to create 1000 requests to update 1000 values. I am looking for a way I can tell the soap client to look at the file system and run all the request messages in sequence. I do not need to parse the responses.

5
  • Are you just going to send the requests or you'd also like to get and parse the responses? What is the point of testing?
    – Alexey R.
    Commented Jul 27, 2018 at 11:01
  • I am just going to send the request. I dont need to do any parsing of response. Commented Jul 27, 2018 at 11:10
  • Actually the problem is that Soap endpoint can accept one value at a time and we will be updating 1000 values so thats why we need to create 1000 requests to update 1000 values...so I was trying to see if there is anyway I can tell soap client to look at the file system and run all the request messages in sequence Commented Jul 27, 2018 at 11:12
  • Do you also have all 1000 requests in a single xml file?
    – Alexey R.
    Commented Jul 27, 2018 at 12:15
  • 1000 requests are in separate files. so there will be 1000 different request messages in the file system. Commented Jul 27, 2018 at 12:34

2 Answers 2

4

If you do not have a lot of programming skills you can just run command line utilities like CURL. Here is the post on SO describing how to send a single SOAP request having XML file.

Above example explains how to send a single request. However you have 1000 requests, hence you would need to prepare some shell script (bash or batch or powershell or something your OS supports) that would repeat that command for each file in your folder:

The only thing you should consider is that this approach would run request by request in a synchronous way.

4
  • Thanks for this hint. I am doing further analysis and trying. When you say request by request means: If one request is executed then it will wait for the response for this request before making a next request. is that right? Commented Jul 27, 2018 at 14:16
  • 1
    Yes. This is what "synchronous way" means.
    – Alexey R.
    Commented Jul 27, 2018 at 14:18
  • Update: I managed to write a curl script. Successfully sent one request message. Now trying to understand the batch script that I need to use as using windows. Commented Jul 27, 2018 at 14:46
  • Thanks Alexey. I managed to make it work. Thanks a ton for your idea. Commented Jul 27, 2018 at 15:49
0

This got solved by the use of curl and batch(Bcuz I was using windows) script . Thanks to Alexey (in the comments) for giving the hint.

I hope this helps someone else.

Curl script to make only 1 request:

curl -X POST -H "Content-Type: text/xml" -H "SOAPAction: \"**<Specify SOAP Action>**"" --data-binary @%%i **<Endpoint url>**

I then created a batch script (.bat) with the above curl command.

**for** %%i in (<Directory path>\*.xml) do  curl -X POST -H "Content-Type: text/xml" -H "SOAPAction: \"**<Specify SOAP Action>**"" --data-binary @%%i **<Endpoint url>**

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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