SOAP

Applies to ReadyAPI 3.5, last modified on January 19, 2021

ReadyAPI supports testing of services that use the SOAP protocol to send messages. This topic provides basic information on how ReadyAPI can work with SOAP messages.

About the SOAP Protocol

The Simple Object Access Protocol (SOAP) uses XML and schemas to define a strongly typed messaging framework. Every operation the service provides is explicitly defined along with the XML structure of the request required by it and the response it sends. Each input parameter is also defined and is bound to a type (for example, an integer or a string). All of this is codified in WSDL – the Web Service Description (Definition in later versions) Language. WSDL is a method signature for a web service.

SOAP is agnostic to the underlying transport protocol and can be sent over almost any protocol. The only restriction is that the SOAP message itself must be in the XML format. The root element for SOAP requests is called Envelope. It has two required elements: the Header and the Body. The other elements in the message must be described by using WSDL.

Sample Message

Here is how a SOAP message may look like:

POST https://www.soapui.org/sample HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "http://www.soapui.org/sample/login"
Content-Length: 297
Host: www.soapui.org
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_112)

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sam="http://www.soapui.org/sample/">
   <soapenv:Header/>
   <soapenv:Body>
      <sam:login>
         <username>John</username>
         <password>Smith</password>
      </sam:login>
   </soapenv:Body>
</soapenv:Envelope>

Requirements

You need a PRO license for one of ReadyAPI tools to test SOAP services. You do not need a ReadyAPI Test Pro license to send SOAP requests, but it may help you in creating complex functional tests.

What Your Tests Can Do

With ReadyAPI you can modify your SOAP requests in a variety of ways –

Moreover, you can use ReadyAPI tools to make your tests better in a variety of ways:

  • Create complex tests and emulate most common attacks in ReadyAPI Test to make sure the service is well-protected and responds as expected.

  • Test your service under heavy load by using ReadyAPI Performance.

  • Create a virtual copy of your service in ReadyAPI Virtualization and write tests for the functionality that is not finished yet.

Sample Projects

ReadyAPI includes a sample project that demonstrates how you can work with SOAP APIs:

<ReadyAPI Installation Folder>\tutorials\Sample-SOAP-project.xml

See Also

Creating Projects
SOAP APIs
REST

Highlight search results