<?xml version="1.0" encoding="UTF-8" standalone="no"?><!--
  ~ Copyright (c) 2010-2015 Evolveum and contributors
  ~
  ~ Licensed under the EUPL-1.2 or later.
  --><definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3" xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" xmlns:tns="http://midpoint.evolveum.com/xml/ns/public/common/fault-3" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="fault" targetNamespace="http://midpoint.evolveum.com/xml/ns/public/common/fault-3">

    <types>
        <xsd:schema elementFormDefault="qualified" targetNamespace="http://midpoint.evolveum.com/xml/ns/public/common/fault-3">

            <xsd:import namespace="http://midpoint.evolveum.com/xml/ns/public/common/common-3" schemaLocation="common-3.xsd"/>

            <xsd:complexType abstract="true" name="FaultType">
                <xsd:sequence>
                    <xsd:element ref="tns:message"/>
                    <xsd:element ref="tns:operationResult"/>
                </xsd:sequence>
            </xsd:complexType>

            <xsd:element name="fault" type="tns:FaultType"/>

            <xsd:element name="message" type="xsd:string"/>
            <xsd:element name="operationResult" type="c:OperationResultType"/>

            <xsd:complexType name="SystemFaultType">
                <xsd:annotation>
                    <xsd:documentation>
                All system (non-business) error condition should be derived
                from this type.
                These errors are result
                from the system and network conditions
                and are usually temporary (although some may be permanent).
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:complexContent>
                    <xsd:extension base="tns:FaultType">
                    </xsd:extension>
                </xsd:complexContent>
            </xsd:complexType>

            <xsd:element name="systemFault" type="tns:SystemFaultType"/>

            <xsd:complexType abstract="true" name="ObjectAccessFaultType">
                <xsd:annotation>
                    <xsd:documentation>
                TODO
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:complexContent>
                    <xsd:extension base="tns:FaultType">
                    </xsd:extension>
                </xsd:complexContent>
            </xsd:complexType>

            <xsd:complexType name="ObjectNotFoundFaultType">
                <xsd:annotation>
                    <xsd:documentation>
                Object with specified criteria (OID) has not been found in the
                repository.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:complexContent>
                    <xsd:extension base="tns:ObjectAccessFaultType">
                    </xsd:extension>
                </xsd:complexContent>
            </xsd:complexType>

            <xsd:element name="objectNotFoundFault" type="tns:ObjectNotFoundFaultType"/>

            <xsd:complexType name="ObjectAlreadyExistsFaultType">
                <xsd:annotation>
                    <xsd:documentation>
                Object with specified criteria (OID) already exists in the
                repository.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:complexContent>
                    <xsd:extension base="tns:ObjectAccessFaultType">
                    </xsd:extension>
                </xsd:complexContent>
            </xsd:complexType>

            <xsd:element name="objectAlreadyExistsFault" type="tns:ObjectAlreadyExistsFaultType"/>

            <xsd:complexType name="InapplicableOperationFaultType">
                <xsd:annotation>
                    <xsd:documentation>
                Operation cannot be applied to the object.
                (e.g. conflicting change)
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:complexContent>
                    <xsd:extension base="tns:ObjectAccessFaultType">
                    </xsd:extension>
                </xsd:complexContent>
            </xsd:complexType>

            <xsd:element name="inapplicableOperationFault" type="tns:InapplicableOperationFaultType"/>

            <xsd:complexType name="SchemaViolationFaultType">
                <xsd:annotation>
                    <xsd:documentation>
                Provided object does not conform to the internal schema.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:complexContent>
                    <xsd:extension base="tns:ObjectAccessFaultType">
                        <xsd:sequence>
                            <xsd:element maxOccurs="unbounded" minOccurs="0" name="violatingPropertyName" type="xsd:QName"/>
                        </xsd:sequence>
                    </xsd:extension>
                </xsd:complexContent>
            </xsd:complexType>

            <xsd:element name="schemaViolationFault" type="tns:SchemaViolationFaultType"/>

            <xsd:complexType name="PolicyViolationFaultType">
                <xsd:annotation>
                    <xsd:documentation>
                Provided object does not conform to the policies (such as password policy).
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:complexContent>
                    <xsd:extension base="tns:ObjectAccessFaultType">
                    </xsd:extension>
                </xsd:complexContent>
            </xsd:complexType>

            <xsd:element name="policyViolationFault" type="tns:PolicyViolationFaultType"/>

            <xsd:complexType name="ConcurrencyFaultType">
                <xsd:annotation>
                    <xsd:documentation>
                        Exceptional concurrency state or operation invocation.

                         This fault is thrown in case of race conditions and similar conflicting concurrency conditions.
                        It is also thrown in an attempt to acquire already acquired locks and similar cases.
                     </xsd:documentation>
                </xsd:annotation>
                <xsd:complexContent>
                    <xsd:extension base="tns:ObjectAccessFaultType">
                    </xsd:extension>
                </xsd:complexContent>
            </xsd:complexType>

            <xsd:element name="concurrencyFault" type="tns:ConcurrencyFaultType"/>

            <xsd:complexType name="ReferentialIntegrityFaultType">
                <xsd:annotation>
                    <xsd:documentation>
                Operation on an object would cause inconsistencies in referential
                integrity. E.g. attempt to delete
                an object that is a target of
                existing reference.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:complexContent>
                    <xsd:extension base="tns:ObjectAccessFaultType">
                        <xsd:sequence>
                            <xsd:element maxOccurs="unbounded" minOccurs="0" name="referringObjectOid" type="xsd:string"/>
                        </xsd:sequence>
                    </xsd:extension>
                </xsd:complexContent>
            </xsd:complexType>

            <xsd:element name="referentialIntegrityFault" type="tns:ReferentialIntegrityFaultType"/>

            <xsd:complexType name="UnsupportedObjectTypeFaultType">
                <xsd:annotation>
                    <xsd:documentation>
                Object type passed to the operation is not supported by the
                implementation.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:complexContent>
                    <xsd:extension base="tns:ObjectAccessFaultType">
                    </xsd:extension>
                </xsd:complexContent>
            </xsd:complexType>

            <xsd:element name="unsupportedObjectTypeFault" type="tns:UnsupportedObjectTypeFaultType"/>

            <xsd:complexType name="IllegalArgumentFaultType">
                <xsd:annotation>
                    <xsd:documentation>
                Argument provided to the operation is illegal.
                E.g. mandatory argument is null or empty, the
                argument does not
                conform to the required format, etc.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:complexContent>
                    <xsd:extension base="tns:FaultType">
                    </xsd:extension>
                </xsd:complexContent>
            </xsd:complexType>

            <xsd:element name="illegalArgumentFault" type="tns:IllegalArgumentFaultType"/>

            <xsd:complexType name="UnsupportedOperationFaultType">
                <xsd:annotation>
                    <xsd:documentation>
                The invoked operation is not supported.
                E.g. attempt to invoke non-implemented optional operation
                or
                attempt to use resource capability that is not supported.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:complexContent>
                    <xsd:extension base="tns:FaultType">
                    </xsd:extension>
                </xsd:complexContent>
            </xsd:complexType>

            <xsd:element name="unsupportedOperationFault" type="tns:UnsupportedOperationFaultType"/>

            <xsd:complexType name="CommunicationFaultType">
                <xsd:annotation>
                    <xsd:documentation>
                        Generic communication error. May happen in case of various network communication errors, including
                         (but not limited to) connection refused and timeouts.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:complexContent>
                    <xsd:extension base="tns:FaultType">
                    </xsd:extension>
                </xsd:complexContent>
            </xsd:complexType>

            <xsd:element name="communicationFault" type="tns:CommunicationFaultType"/>

            <xsd:complexType name="ConfigurationFaultType">
                <xsd:annotation>
                    <xsd:documentation>
                        Configuration exception indicates that something is mis-configured.

                         The system or its part is misconfigured and therefore the intended operation
                        cannot be executed.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:complexContent>
                    <xsd:extension base="tns:FaultType">
                    </xsd:extension>
                </xsd:complexContent>
            </xsd:complexType>

            <xsd:element name="configurationFault" type="tns:ConfigurationFaultType"/>

        </xsd:schema>
    </types>

    <message name="FaultMessage">
        <part element="tns:fault" name="fault"/>
    </message>

</definitions>