Example: Faults

This example demonstrates a SOAP fault envelope returned by the getOrderForm() method in the order endpoint.

Example: An envelope for a SOAP fault

This SOAP fault is returned when an order form does not exist. Note that your application determines the format in which an error message is displayed to a user.

<?xml version='1.0' encoding='UTF-8'?>
<Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
  <Body>
    <Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope">
      <faultcode>S:Server</faultcode>
      <faultstring>NoSuchOrderFormException [pkgId=123]. Use getOrderForms() to discover available order forms</faultstring>
      <detail>
        <OrderException xmlns:="http://ws.inomial.com/smile.2" xmlns:="http://xml.inomial.com/smile/2.xsd">
          <message>NoSuchOrderFormException [pkgId=123]. Use getOrderForms() to discover available order forms</message>
        </OrderException>
      </detail>
    </Fault>
  </Body>
</Envelope>

In this guide, this fault is documented in the following format:

OrderException