SOAP Request: How to make multiple request messages in sequence - soap

I have a SOAP endpoint and will be having more than 1000 request messages which have different values for the request parameters but same operation of SOAP Message. I want to execute them in a sequence if the previous request that got triggered was 200 OK?
Is there any way to do this without JAVA program? Is there any client that will help me?

I assume you already have some sort of loop in your test case that reads your variable properties from a file or perhaps Excel and feeds them into your SOAP request. Ready API/soapUI Pro gives you this functionality, but for open source soapUI you'll have to write your own Groovy test steps.
Then, you can use a soapUI Compliance, Status and Standards assertion to check you've received a valid or invalid HTTP status code and react accordingly.

Is there any way to do this without JAVA program? Is there any client
that will help me?
After re-reading the question, it seems to me you're not yet using SoapUI, though it has been tagged as a SoapUI question. It happens quite a lot on here where people are askign general SOAP questions, but tag SoapUI. BTW, Craig's answer should be accepted if you are using SoapUI.
In terms of options, you have lots....
Code. You can use Python, C#, Java, Javascript, etc. etc. to create a program that will call your endpoint. Any programming language will have the libraries to call web services. So, if you do know a language, you could use that.
SoapUI. There is a free version, which will allow you to call web services. In your question, you want to call the same service over and over with different parameters. In testing speak, this is a data-driven test. These can be achieved in the free SoapUI, but it is a fiddle. However, the full-licensed version offers data-driven tests out of the box. I use these all the time. Very easy to set-up. If you use SoapUI, then Craig's answer about using Assertions would stop the test if you got a status code other than a 200.
Postman. this is another free tool, which I have used a little. I haven't tried data-driven tests, but I'm sure the docs will tell you if they're supported. If you try Postman, then you ought to look at Danny Dainton's excellent tutorial on GitHub
JMeter. Another free tool. This is primarily used for performance and load testing, but would still meet your needs.

Related

Is there any functionality similar to "Schema Compliance" and "SOAP Response" as in Ready API in Karate? [duplicate]

Is it possible to use WSDL in rest assured, I'm looking for open source API automation testing tool. My services are in WSDL, I can use SOAPUI which will extract wsdl into separate end points. but Is there any way can we extract end in WSDL manually or else how I can use this with Karate or Rest Assured.
As the author of Karate, let me give you my point of view.
You don't need to worry about WSDL. All you need is a sample SOAP envelope as XML (plain-text) and you will be easily able to derive all your tests, complex scenarios and edge cases with that. This is what many teams are doing today, and you can refer this detailed set of examples to get a sense of the possibilities: xml.feature
Even if you have some complexities like encryption and signed-headers etc, you can easily plug them into your tests using Java-interop, look at this example in the documentation: https://github.com/intuit/karate#http-basic-authentication-example

Switching to Gatling for Load Testing

I'd like to use Gatling for REST performance and scalability web service testing. I'm currently using JMeter for this as I wasn't aware of gatling when I started this project. Gatling would integrate better and would be better for the project a number of reasons.
I'd like to ask one main question:
Obviously, there's a lot of overhead in configuring Gatling with the correct web service information. I've already done this in JMeter and I'm not keen to do it again. For one of the sub-projects, we have a WADL but we have no such thing for the other. Is it possible, out of the box, to import:
a. JMeter test plans and
b. WADL documents
into Gatling?
I've looked through the docs but unfortunately I can't find anything that references these.
No, Gatling has neither.
Building a jmx converter is something we might investigate in 2013, as you're not the first one to ask for it. At this point, I'm a bit skeptical, as the logic and the configuration of the 2 JMeter and Gatling are quite different, so the features and the way to use them don't map 1:1.
The easiest way to work with REST APIs is to use the recorder, so you'd dump request bodies as template and then inject data into them. See http://gatling.io/docs/2.1.6/http/http_request.html#request-body
If you work with JSON, you can use our JsonPath (or standard regex) checks in order to make assertions on the response body, or even capture data. See http://gatling.io/docs/2.1.6/http/http_check.html#defining-the-check-type
Using HttpSampler with Raw Post body And last 2.8 version is the right way to test Webservices.
Is it the way you are doing it ?
Upcoming 2.9 has new performance improvements related to memory and cpu consumed by Post Processors.
Regarding a, I don't think so.

Is there a way to build persistence in soapui or any similar software?

yeah so, our application would be connecting to not yet existing services. We were given WSDLs for those services and we mocked them in soapiu. Is there a way to build rudimentary persistence in soapui or any similar software so that we could have some functionality without actually building the service ourselves?
I've researched on datasinks and datasources for soapui but it seems it only works for testsuites.
You build your mockservice, and use enough scripting and datagens to make it seem like the real deal. Leave it running on someone's PC, or let each developer or team have their own instance to hit.
Then you just send your requests, and SoapUI returns the response. In some cases, a canned response is good enough. In other cases, you may need to pick a response based on something in the request. For example, suppose my StockQuote service has two responses - a good one with the stock price, and a failure, with "symbol not found". It's simple to script the mockservice so that it gives a known price for symbol 'AA', makes up a price for 'BB', and returns the "unknown symbol" response for everything else.
Here is the tutorial:
http://www.soapui.org/Service-Mocking/creating-dynamic-mockservices.html

iPhone WSDL service using HTTP POST and GET Bindings

I have a WSDL service that is working fine with .NET using HTTP POST Bindings, rather than using SOAP. The HTTP Post request returns the raw XML for the objects etc. removing all the overhead of SOAP.
I would like to use this within the iPhone. I have located the tool at wsdl2objc tool (http://code.google.com/p/wsdl2objc/) however it seems to only generate SOAP bindings which I don't use because I don't need the overhead.
What would be the best option for using WSDL HTTP POST Bindings within the iPhone OS? It would be great if the wsdl2objc tool also supported the HTTP POST bindings however I don't see that happening soon. I would rather have this code automatically generated for when the service changes etc.
Any ideas would be greatly appreciated.
It seems that there are very few code generators around for this kind of thing. For now I lumped with wsdl2objc but shrunk the size of the data being returned from the web service in a bid to make the XML smaller and more manageable. On a slower cellular connection that the iPhone sometimes has (2G etc.) I noticed slight improvement, but nothing worth an awards evening.

How can I create a SOAP server in Perl?

I'm working with a third-party vendor who unfortunately requires that we set up a SOAP server to handle requests from them. I'm having some trouble finding the best way to go about this. One limitation I'm imposing is that it runs as a mod_perl2 handler. After some searching I've found that the best way may be to use XML::Compile and its SOAP classes but I'm having a tough time wrapping my head around it. Part of the problem is my limited understanding of SOAP and the documentation for most modules seems a bit cryptic to me.
So, can anyone give me some pointers, sample code, anything?
EDIT: we were also given a WSDL file to use, and this was not compatible with SOAP::WSDL ("unsupported global type found in ...
Looks like a rpc/literal WSDL, which is not supported by SOAP::WSDL)
EDIT: XML::Compile::SOAP complains "RPC encoded not supported by this version" when using the WSDL with XML::Compile::WSDL11. Can/should I not worry about the WSDL file?
If you have a limited understanding of SOAP, starting reading about SOAP before you worry about implementing it. There are lots of SOAP tutorials out there. Most of the documentation probably seems cryptic to you because you don't already know SOAP.
It's not that tricky of a process. It's not that different than any other web programming when it comes to the big steps:
You get a SOAP request, which is some XML.
You pull apart the XML to figure out what to do.
You put together some XML to send as a response.
You return the response.
XML::Compile will take care of most of the details for you.
Before you start writing your own server, you might consider writing a client for an existing SOAP server just to give yourself some practice.
I found two modules that can help you make soap server, but I never use its
https://metacpan.org/pod/XML::Compile::SOAP::Daemon
https://metacpan.org/pod/SOAP::WSDL::Server