Contact Us 1-800-596-4880

To Generate a SOAP Fault

In this procedure, you use the SoapUI tool to identify an operation you need to implement by making the API fail. You use the OrderTshirt operation to create a request in SOAP UI to place an order for a large t-shirt for John. The API cannot handle this operation and a SOAP fault occurs.

  1. Create a SoapUI project using the http://localhost:8081/TshirtService/TshirtServicePort?wsdl for the initial WSDL:

    *New SOAP Project* dialog with the the initial WSDL.
  2. In the SoapUI client, request a large t-shirt for John by entering some values into the request envelope. For example:

    • Enter L between the <size> tags.

    • Enter John between the <name> tags.

  3. Submit the request.

    The result is the SOAP fault.

    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
       <soap:Body>
          <soap:Fault xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
             <faultcode>soap:Server</faultcode>
             <faultstring>Operation [OrderTshirt:/TshirtService/TshirtServicePort/api-config] not implemented</faultstring>
          </soap:Fault>
       </soap:Body>
    </soap:Envelope>