...

/

Sending Requests using SOAP Client

Sending Requests using SOAP Client

In this lesson, we will learn how to send requests and receive responses using the SOAP client that we created in the previous lesson. We will also learn how to validate the response.

We'll cover the following...

Creating BaseTest class

Since we use the Spring framework and Annotations for defining beans, we need to load them before doing anything. Here, we will use the TestNG annotation @BeforeSuite to load the beans using AnnotationConfigApplicationContext which reads all the Spring annotated classes like @Configuration, @Service, etc.

In our case, we have annotated the WebServiceClient class with @Configuration for the bean that needs to be loaded.

We will create BaseTest which will be extended by all the test classes so that we need not duplicate the @BeforeSuite method that contains loading of beans. This will be executed once per test suite and initializing the WebServiceTemplate in @BeforeClass will be executed for ...