Skip to main content

Yes, it is possible, however not necessarily easy.

SOAP Web service is (usually) receiving HTTP requests with XML in the body and sending back HTTP responses with XML in the body.

REST-assured can send HTTP requests with any content, including XML. It can also verify XML in responses with GPath.

Here's an example from REST-assured site:

Imagine that a POST request to http://localhost:8080/greetXML returns:

<greeting>
   <firstName>{params("firstName")}</firstName>
   <lastName>{params("lastName")}</lastName>
</greeting>
<greeting>
   <firstName>{params("firstName")}</firstName>
   <lastName>{params("lastName")}</lastName>
</greeting>

i.e. it sends back a greeting based on the firstNamefirstName and lastNamelastName parameter sent in the request. You can easily perform and verify e.g. the firstNamefirstName with REST assured:

given().
         parameters("firstName", "John", "lastName", "Doe").
when().
         post("/greetXML").
then().
         body("greeting.firstName", equalTo("John")).
given().
         parameters("firstName", "John", "lastName", "Doe").
when().
         post("/greetXML").
then().
         body("greeting.firstName", equalTo("John")).

The problem is that SOAP Requests and SOAP Responses are usually far more complex and you will need to understand WSDL descriptors yourself.

Yes, it is possible, however not necessarily easy.

SOAP Web service is (usually) receiving HTTP requests with XML in the body and sending back HTTP responses with XML in the body.

REST-assured can send HTTP requests with any content, including XML. It can also verify XML in responses with GPath.

Here's an example from REST-assured site:

Imagine that a POST request to http://localhost:8080/greetXML returns:

<greeting>
   <firstName>{params("firstName")}</firstName>
   <lastName>{params("lastName")}</lastName>
</greeting>

i.e. it sends back a greeting based on the firstName and lastName parameter sent in the request. You can easily perform and verify e.g. the firstName with REST assured:

given().
         parameters("firstName", "John", "lastName", "Doe").
when().
         post("/greetXML").
then().
         body("greeting.firstName", equalTo("John")).

The problem is that SOAP Requests and SOAP Responses are usually far more complex and you will need to understand WSDL descriptors yourself.

Yes, it is possible, however not necessarily easy.

SOAP Web service is (usually) receiving HTTP requests with XML in the body and sending back HTTP responses with XML in the body.

REST-assured can send HTTP requests with any content, including XML. It can also verify XML in responses with GPath.

Here's an example from REST-assured site:

Imagine that a POST request to http://localhost:8080/greetXML returns:

<greeting>
   <firstName>{params("firstName")}</firstName>
   <lastName>{params("lastName")}</lastName>
</greeting>

i.e. it sends back a greeting based on the firstName and lastName parameter sent in the request. You can easily perform and verify e.g. the firstName with REST assured:

given().
         parameters("firstName", "John", "lastName", "Doe").
when().
         post("/greetXML").
then().
         body("greeting.firstName", equalTo("John")).

The problem is that SOAP Requests and SOAP Responses are usually far more complex and you will need to understand WSDL descriptors yourself.

added 184 characters in body
Source Link
dzieciou
  • 10.5k
  • 9
  • 48
  • 102

Yes, it is possible, however not necessarily easy.

SOAP Web service is (usually) receiving HTTP requests with XML in the body and sending back HTTP responses with XML in the body.

REST-assured can send HTTP requests with any content, including XML. It can also verify XML in responses with GPath.

Here's an example from REST-assured site:

Imagine that a POST request to http://localhost:8080/greetXML returns:

<greeting>
   <firstName>{params("firstName")}</firstName>
   <lastName>{params("lastName")}</lastName>
</greeting>

i.e. it sends back a greeting based on the firstName and lastName parameter sent in the request. You can easily perform and verify e.g. the firstName with REST assured:

given().
         parameters("firstName", "John", "lastName", "Doe").
when().
         post("/greetXML").
then().
         body("greeting.firstName", equalTo("John")).

The problem is that SOAP Requests and SOAP Responses are usually far more complex and you will need to understand WSDL descriptors yourself.

Yes, it is possible.

SOAP Web service is (usually) receiving HTTP requests with XML in the body and sending back HTTP responses with XML in the body.

REST-assured can send HTTP requests with any content, including XML. It can also verify XML in responses with GPath.

Here's an example from REST-assured site:

Imagine that a POST request to http://localhost:8080/greetXML returns:

<greeting>
   <firstName>{params("firstName")}</firstName>
   <lastName>{params("lastName")}</lastName>
</greeting>

i.e. it sends back a greeting based on the firstName and lastName parameter sent in the request. You can easily perform and verify e.g. the firstName with REST assured:

given().
         parameters("firstName", "John", "lastName", "Doe").
when().
         post("/greetXML").
then().
         body("greeting.firstName", equalTo("John")).

Yes, it is possible, however not necessarily easy.

SOAP Web service is (usually) receiving HTTP requests with XML in the body and sending back HTTP responses with XML in the body.

REST-assured can send HTTP requests with any content, including XML. It can also verify XML in responses with GPath.

Here's an example from REST-assured site:

Imagine that a POST request to http://localhost:8080/greetXML returns:

<greeting>
   <firstName>{params("firstName")}</firstName>
   <lastName>{params("lastName")}</lastName>
</greeting>

i.e. it sends back a greeting based on the firstName and lastName parameter sent in the request. You can easily perform and verify e.g. the firstName with REST assured:

given().
         parameters("firstName", "John", "lastName", "Doe").
when().
         post("/greetXML").
then().
         body("greeting.firstName", equalTo("John")).

The problem is that SOAP Requests and SOAP Responses are usually far more complex and you will need to understand WSDL descriptors yourself.

Source Link
dzieciou
  • 10.5k
  • 9
  • 48
  • 102

Yes, it is possible.

SOAP Web service is (usually) receiving HTTP requests with XML in the body and sending back HTTP responses with XML in the body.

REST-assured can send HTTP requests with any content, including XML. It can also verify XML in responses with GPath.

Here's an example from REST-assured site:

Imagine that a POST request to http://localhost:8080/greetXML returns:

<greeting>
   <firstName>{params("firstName")}</firstName>
   <lastName>{params("lastName")}</lastName>
</greeting>

i.e. it sends back a greeting based on the firstName and lastName parameter sent in the request. You can easily perform and verify e.g. the firstName with REST assured:

given().
         parameters("firstName", "John", "lastName", "Doe").
when().
         post("/greetXML").
then().
         body("greeting.firstName", equalTo("John")).