title: Handling SOAP Fault in Spring Boot WebServiceTemplate
body: <p>I am new to SOAP, trying to run a sample SOAP client using Spring Boot</p>
  
  <p>How the SOAP fault, Exceptions or Errors are handled while using  WebServiceTemplate</p>
  
  <pre><code> public class CountryClient extends WebServiceGatewaySupport {
  
    private static final Logger log = LoggerFactory.getLogger(CountryClient.class);
  
    public GetCountryResponse getCountry(String country) {
  
      GetCountryRequest request = new GetCountryRequest();
      request.setName(country);
  
      log.info("Requesting location for " + country);
  
      GetCountryResponse response = (GetCountryResponse) getWebServiceTemplate()
          .marshalSendAndReceive("http://localhost:8080/ws/countries", request,
              new SoapActionCallback(
                  "http://spring.io/guides/gs-producing-web-service/GetCountryRequest"));
  
      return response;
    }
  
  }
  </code></pre>