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

    <documentation>

        <p>Interface of the IDM Model subsystem.</p>

        <p>IDM Model Web interface provides unified access to the identity objects stored in the repository and on resources. It
        abstracts away the details about where and how are the data stored, it hides all the low-level system components.</p>

        <p>Implementations of this interface are expected to enforce a consistency of access control decisions and model, e.g. to enforce
        Role-Based Access Control (RBAC). RBAC is only one of many possibly models and this interface may have many implementations.</p>

        <p>Implementations of this interface may automatically derive properties and attributes for objects. E.g. RBAC models may
        automatically derive resource accounts attributes based on user role membership.</p>

        <p>This a web service version of the IDM Model Interface represented in WSDL. As such it has some inherent limitations but it is
        usable for remote access to the Model services.</p>

        <p>Version: 3.1</p>

    </documentation>

    <import location="../common/fault-3.wsdl" namespace="http://midpoint.evolveum.com/xml/ns/public/common/fault-3"/>

    <types>
        <!-- Element form name is QUALIFIED to prevent some problems with marshalling/unmarshalling. This deviates from RPC/Literal convention, but we
             do not have to obey this convention -->
        <xsd:schema elementFormDefault="qualified" targetNamespace="http://midpoint.evolveum.com/xml/ns/public/model/model-3">
            <xsd:import namespace="http://midpoint.evolveum.com/xml/ns/public/common/common-3" schemaLocation="../common/common-3.xsd"/>
            <xsd:import namespace="http://midpoint.evolveum.com/xml/ns/public/common/api-types-3" schemaLocation="../common/api-types-3.xsd"/>
            <xsd:import namespace="http://midpoint.evolveum.com/xml/ns/public/common/audit-3" schemaLocation="../common/audit-3.xsd"/>
            <xsd:import namespace="http://prism.evolveum.com/xml/ns/public/query-3" schemaLocation="../query-3.xsd"/>
            <xsd:import namespace="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/connector-schema-3" schemaLocation="../connector/icf-1/connector-schema-3.xsd"/>
            <xsd:import namespace="http://midpoint.evolveum.com/xml/ns/public/resource/capabilities-3" schemaLocation="../resource/capabilities-3.xsd"/>

            <xsd:complexType name="GetObjectType">
                <xsd:annotation>
                    <xsd:documentation>
                        A request for getObject operation.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:sequence>
                    <xsd:element name="objectType" type="xsd:QName">
                        <xsd:annotation>
                            <xsd:documentation>
                                Type (class) of an object to get. For example, {...common-3}UserType means the user object type.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="oid" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>
                                OID of the object to get.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="options" type="c:SelectorQualifiedGetOptionsType">
                        <xsd:annotation>
                            <xsd:documentation>
                                Options influencing the retrieval and processing of the object.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:element name="getObject" type="tns:GetObjectType"/>

            <xsd:complexType name="GetObjectResponseType">
                <xsd:annotation>
                    <xsd:documentation>
                        A response from getObject operation.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:sequence>
                    <xsd:element name="object" type="c:ObjectType">
                        <xsd:annotation>
                            <xsd:documentation>
                                The retrieved object.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="result" type="c:OperationResultType">
                        <xsd:annotation>
                            <xsd:documentation>
                                The result of the operation.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:element name="getObjectResponse" type="tns:GetObjectResponseType"/>

            <xsd:complexType name="ExecuteChangesType">
                <xsd:annotation>
                    <xsd:documentation>
                        A request for executeChanges operation.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:sequence>
                    <xsd:element name="deltaList" type="apit:ObjectDeltaListType">
                        <xsd:annotation>
                            <xsd:documentation>
                                List of object deltas to be applied.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="options" type="c:ModelExecuteOptionsType">
                        <xsd:annotation>
                            <xsd:documentation>
                                Options influencing the execution of the operation.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:element name="executeChanges" type="tns:ExecuteChangesType"/>

            <xsd:complexType name="ExecuteChangesResponseType">
                <xsd:annotation>
                    <xsd:documentation>
                        A response from executeChanges operation.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:sequence>
                    <xsd:element name="deltaOperationList" type="apit:ObjectDeltaOperationListType">
                        <xsd:annotation>
                            <xsd:documentation>
                                List of object delta operations (deltas + operation results). OIDs of newly created objects can be found
                                in these ObjectDeltas (which may or may not be original ObjectDeltas passed to the method).
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:element name="executeChangesResponse" type="tns:ExecuteChangesResponseType"/>

            <!-- TODO recompute -->

            <xsd:complexType name="SearchObjectsType">
                <xsd:annotation>
                    <xsd:documentation>
                        A request for searchObjects operation.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:sequence>
                    <xsd:element name="objectType" type="xsd:QName">
                        <xsd:annotation>
                            <xsd:documentation>
                                Type (class) of an object to get. For example, {...common-3}UserType means the user object type.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="query" type="q:QueryType">
                        <xsd:annotation>
                            <xsd:documentation>
                                Search criteria. If not specified, all objects of a given type are returned.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element minOccurs="0" name="options" type="c:SelectorQualifiedGetOptionsType">
                        <xsd:annotation>
                            <xsd:documentation>
                                Options influencing the retrieval and processing of objects.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:element name="searchObjects" type="tns:SearchObjectsType"/>

            <xsd:complexType name="SearchObjectsResponseType">
                <xsd:annotation>
                    <xsd:documentation>
                        A response from searchObjects operation.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:sequence>
                    <xsd:element name="objectList" type="apit:ObjectListType">
                        <xsd:annotation>
                            <xsd:documentation>
                                List of objects that match given criteria.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="result" type="c:OperationResultType">
                        <xsd:annotation>
                            <xsd:documentation>
                                The result of the operation.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:element name="searchObjectsResponse" type="tns:SearchObjectsResponseType"/>

            <!-- TODO countObjects -->

            <xsd:complexType name="FindShadowOwnerType">
                <xsd:annotation>
                    <xsd:documentation>
                        A request for findShadowOwner operation.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:sequence>
                    <xsd:element name="shadowOid" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>
                                OID of the shadow to look for an owner.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:element name="findShadowOwner" type="tns:FindShadowOwnerType"/>

            <xsd:complexType name="FindShadowOwnerResponseType">
                <xsd:annotation>
                    <xsd:documentation>
                        A response from findShadowOwner operation.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:sequence>
                    <xsd:element name="user" type="c:UserType">
                        <xsd:annotation>
                            <xsd:documentation>
                                Owner of the account (if found).
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="result" type="c:OperationResultType">
                        <xsd:annotation>
                            <xsd:documentation>
                                Operation result covering the operation executed.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:element name="findShadowOwnerResponse" type="tns:FindShadowOwnerResponseType"/>

            <xsd:complexType name="TestResourceType">
                <xsd:annotation>
                    <xsd:documentation>
                        A request for testResource operation.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:sequence>
                    <xsd:element name="resourceOid" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>
                                OID of the resource that is to be tested.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:element name="testResource" type="tns:TestResourceType"/>

            <xsd:complexType name="testResourceResponseType">
                <xsd:annotation>
                    <xsd:documentation>
                        A response from testResource operation.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:sequence>
                    <xsd:element name="result" type="c:OperationResultType">
                        <xsd:annotation>
                            <xsd:documentation>
                                Result from the resource test.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:element name="testResourceResponse" type="tns:testResourceResponseType"/>

            <xsd:complexType name="ImportFromResourceType">
                <xsd:annotation>
                    <xsd:documentation>
                        A request for importFromResource operation.
                    </xsd:documentation>
                </xsd:annotation>

                <xsd:sequence>
                    <xsd:element name="resourceOid" type="xsd:string">
                        <xsd:annotation>
                            <xsd:documentation>
                                OID of the resource to be imported from.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="objectClass" type="xsd:QName">           <!-- TODO consistent naming with other resource-related object classes (resourceObjectShadowType above) -->
                        <xsd:annotation>
                            <xsd:documentation>
                                Object class to import.
                                Local name, assumed to be in the resource namespace.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:element name="importFromResource" type="tns:ImportFromResourceType"/>

            <xsd:complexType name="ImportFromResourceResponseType">
                <xsd:annotation>
                    <xsd:documentation>
                        A response from importFromResource operation.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:sequence>
                    <xsd:element name="task" type="c:TaskType">
                        <xsd:annotation>
                            <xsd:documentation>
                                Task that is (asynchronously) executing the import procedure.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:element name="importFromResourceResponse" type="tns:ImportFromResourceResponseType"/>

            <!-- TODO importFromResource for single shadow -->
            <!-- TODO importObjectsFromFile -->
            <!-- TODO importObjectsFromStream -->
            <!-- TODO discoverConnectors -->

            <xsd:complexType name="NotifyChangeType">
                <xsd:annotation>
                    <xsd:documentation>
                        A request for notifyChange operation.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:sequence>
                    <xsd:element name="changeDescription" type="c:ResourceObjectShadowChangeDescriptionType">
                        <xsd:annotation>
                            <xsd:documentation>
                                Description of the change in the external resource.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:element name="notifyChange" type="tns:NotifyChangeType"/>

            <xsd:complexType name="NotifyChangeResponseType">
                <xsd:annotation>
                    <xsd:documentation>
                        A response from notifyChange operation.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:sequence>
                    <xsd:element name="task" type="c:TaskType">
                        <xsd:annotation>
                            <xsd:documentation>
                                Task, in context of which the event was processed.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:element name="notifyChangeResponse" type="tns:NotifyChangeResponseType"/>

            <xsd:complexType name="ExecuteScriptsType">
                <xsd:annotation>
                    <xsd:documentation>
                        A request for executeScripts operation.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:sequence>
                    <xsd:choice>
                        <xsd:element name="xmlScripts" type="apit:XmlScriptsType">
                            <xsd:annotation>
                                <xsd:documentation>
                                    Scripts in the XML format.
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>
                        <xsd:element name="mslScripts" type="xsd:string">
                            <xsd:annotation>
                                <xsd:documentation>
                                    Scripts in the midPoint Scripting Language (textual) format. Not yet available.
                                </xsd:documentation>
                            </xsd:annotation>
                        </xsd:element>
                    </xsd:choice>
                    <xsd:element minOccurs="0" name="options" type="apit:ExecuteScriptsOptionsType">
                        <xsd:annotation>
                            <xsd:documentation>
                                Options that drive the script execution.
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:element name="executeScripts" type="tns:ExecuteScriptsType"/>

            <xsd:complexType name="ExecuteScriptsResponseType">
                <xsd:annotation>
                    <xsd:documentation>
                        A response from executeScripts operation.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:sequence>
                    <xsd:element name="outputs" type="apit:ScriptOutputsType">
                        <xsd:annotation>
                            <xsd:documentation>
                                Output of the execution of script(s).
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                    <xsd:element name="result" type="c:OperationResultType">
                        <xsd:annotation>
                            <xsd:documentation>
                                Operation result covering the execution of script(s).
                            </xsd:documentation>
                        </xsd:annotation>
                    </xsd:element>
                </xsd:sequence>
            </xsd:complexType>
            <xsd:element name="executeScriptsResponse" type="tns:ExecuteScriptsResponseType"/>

            <!--<xsd:element name="getSchemas">-->
                <!--<xsd:complexType>-->
                    <!--<xsd:sequence>-->
                        <!--<xsd:element name="prefixMapping" type="apit:PrefixMappingType"/>-->
                    <!--</xsd:sequence>-->
                <!--</xsd:complexType>-->
            <!--</xsd:element>-->
            <!--<xsd:element name="getSchemasResponse">-->
                <!--<xsd:complexType>-->
                    <!--<xsd:sequence>-->
                        <!--<xsd:element name="schemas" type="apit:SchemaFilesType"/>-->
                    <!--</xsd:sequence>-->
                <!--</xsd:complexType>-->
            <!--</xsd:element>-->


            <!-- TODO task-related operations (suspend, resume, schedule, ...) -->
            <!-- TODO wf-related operations -->

        </xsd:schema>
    </types>

    <!-- OBJECT messages -->

    <message name="getObject">
        <part element="tns:getObject" name="parameters"/>
    </message>
    <message name="getObjectResponse">
        <part element="tns:getObjectResponse" name="parameters"/>
    </message>

    <message name="searchObjects">
        <part element="tns:searchObjects" name="parameters"/>
    </message>
    <message name="searchObjectsResponse">
        <part element="tns:searchObjectsResponse" name="parameters"/>
    </message>

    <message name="executeChanges">
        <part element="tns:executeChanges" name="parameters"/>
    </message>
    <message name="executeChangesResponse">
        <part element="tns:executeChangesResponse" name="parameters"/>
    </message>

    <!-- End of common messages -->

    <message name="findShadowOwner">
        <part element="tns:findShadowOwner" name="parameters"/>
    </message>
    <message name="findShadowOwnerResponse">
        <part element="tns:findShadowOwnerResponse" name="parameters"/>
    </message>

    <message name="testResource">
        <part element="tns:testResource" name="parameters"/>
    </message>
    <message name="testResourceResponse">
        <part element="tns:testResourceResponse" name="parameters"/>
    </message>

    <message name="importFromResource">
        <part element="tns:importFromResource" name="parameters"/>
    </message>
    <message name="importFromResourceResponse">
        <part element="tns:importFromResourceResponse" name="parameters"/>
    </message>

    <message name="notifyChange">
        <part element="tns:notifyChange" name="parameters"/>
    </message>
    <message name="notifyChangeResponse">
        <part element="tns:notifyChangeResponse" name="parameters"/>
    </message>

    <message name="executeScripts">
        <part element="tns:executeScripts" name="parameters"/>
    </message>
    <message name="executeScriptsResponse">
        <part element="tns:executeScriptsResponse" name="parameters"/>
    </message>

    <!--<message name="getSchemas">-->
        <!--<part name="parameters" element="tns:getSchemas" />-->
    <!--</message>-->
    <!--<message name="getSchemasResponse">-->
        <!--<part name="parameters" element="tns:getSchemasResponse" />-->
    <!--</message>-->

    <portType name="modelPortType">

        <!-- OBJECT operations -->

        <operation name="getObject">
            <documentation>
                <p>Returns object for provided OID. It retrieves the object from an appropriate source
                for an object type (e.g. internal repository, resource or both), merging data as necessary,
                processing any policies, caching mechanisms, etc. This can be influenced by using options.</p>

                <p>Must fail if object with the OID does not exist.</p>

                <p>Reference resolution is SUPPORTED by this operation.</p>

                <p>Faults (TODO):</p>
                <ul>
                      <li>any SystemFaultType</li>
                      <li>IllegalArgumentFaultType: wrong OID format</li>
                      <li>ObjectNotFoundFaultType: object with specified OID does not exist</li>
                </ul>
            </documentation>
            <input message="tns:getObject" name="getObject"/>
            <output message="tns:getObjectResponse" name="getObjectResponse"/>
            <fault message="f:FaultMessage" name="fault"/>
        </operation>

        <operation name="searchObjects">
            <documentation>
                <p>
                Search for objects.
                </p>
                <p>
                Searches through all object of a specified type. Returns a list of objects that match
                search criteria.
                </p>
                <p>
                Note that this method has a very limited scaling capability
                as all the results are stored in the memory. DO NOT USE on large datasets.
                Recommended usage is only when using queries that cannot return large number
                of results (e.g. queries for unique values) or when combined with paging capability.
                </p>
                <p>
                Returns empty list if object type is correct but there are no objects of
                that type. Fails if object type is wrong. Should fail if unknown property is
                specified in the query.
                </p>

                TODO  Faults:
                      any SystemFaultType
                      IllegalArgumentFaultType: wrong object type
                      SchemaViolationFaultType: unknown property used in search query
            </documentation>
            <input message="tns:searchObjects" name="searchObjects"/>
            <output message="tns:searchObjectsResponse" name="searchObjectsResponse"/>
            <fault message="f:FaultMessage" name="fault"/>
        </operation>

        <operation name="executeChanges">
            <documentation>
                <p>Execute the provided object deltas.</p>
                <p>
                The operation executes the provided object deltas. All deltas must relate to analogous objects (e.g. user
                and linked accounts). The implementation may throw an error if the objects are not analogous. The implementation
                also implicitly links the objects (mark them to be analogous) if such a link is part of the data model.
                E.g. the implementation links all accounts to the user if they are passed in a single delta collection.
                This is especially useful if the account deltas are ADD deltas without OID and therefore cannot be linked
                explicitly.
                </p>
                <p>
                There must be no more than one delta for each object.
                The order of execution is not defined and the implementation is free to determine the correct or most suitable ordering.
                </p>
                <p>
                The OID provided in ADD deltas may be empty. In that case the OID
                will be assigned by the implementation and the OIDs will be set in the
                deltas after the operation is completed.
                </p>
                <p>
                Execution of ADD deltas should fail if such object already exists (if object with
                the provided OID already exists). Execution of MODIFY and DELETE deltas should fail if
                such objects do not exist.
                </p>
                <p>
                The operation may fail if provided OIDs are in an unusable format for the
                storage. Generating own OIDs and providing them to this method is not
                recommended for normal operation.
                </p>
                <p>
                There are no explicit atomicity guarantees for the operations. Some of the operations may pass, some may fail
                or even fail partially. The consistency of the data and state are not based on operation atomicity but rather
                a data model that can "repair" inconsistencies.
                </p>
                <p>
                The operation may fail if any of the objects to be created or modified does not conform to
                the underlying schema of the storage system or the schema enforced by the implementation.
                </p>
                Faults:
                      any SystemFaultType
                TODO reword to FaultTypes
                      ObjectAlreadyExistsException: object with specified identifiers already exists, cannot add
                      ObjectNotFoundException: object required to complete the operation was not found (e.g.
                                               appropriate connector or resource definition)
                      SchemaException: error dealing with resource schema, e.g. created object does not conform to schema
                      ExpressionEvaluationException: evaluation of expression associated with the object has failed
                      CommunicationException: Communication (network) error during retrieval. E.g. error communicating with the resource
                      ConfigurationException: Configuration error. E.g. misconfigured resource parameters, invalid policies, etc.
                      PolicyViolationException: Policy violation was detected during processing of the object
                      SecurityViolationException: Security violation during operation execution. May be caused either by midPoint internal
                                                  security mechanism but also by external mechanism (e.g. on the resource)
                      IllegalArgumentException: wrong OID format, etc.

            </documentation>
            <input message="tns:executeChanges" name="executeChanges"/>
            <output message="tns:executeChangesResponse" name="executeChangesResponse"/>
            <fault message="f:FaultMessage" name="fault"/>
        </operation>

        <!-- Type-specific operations -->

        <operation name="findShadowOwner">
            <documentation>
                <p>
                Returns the User object representing owner of specified account (account
                shadow).
                </p>
                <p>
                May return null if there is no owner specified for the account.
                </p>
                <p>
                Implements the backward "owns" association between account shadow and
                user. Forward association is implemented by property "linkRef" of user
                object.
                </p>

                Faults (TODO):
                      any SystemFaultType
                      IllegalArgumentFaultType: wrong OID format
                      ObjectNotFoundFaultType: object with specified OID does not exist
            </documentation>
            <input message="tns:findShadowOwner" name="findShadowOwner"/>
            <output message="tns:findShadowOwnerResponse" name="findShadowOwnerResponse"/>
            <fault message="f:FaultMessage" name="fault"/>
        </operation>

        <operation name="testResource">
            <documentation>
                <p>WARNING:</p>
                <p>This operation should not be here. It is in fact
                just a diagnostics methods from the provisioning interface
                that need to be accessed from GUI. Do not use it for
                anything serious. It will disappear eventually.</p>

                <p>Test the resouce connection and basic resource connector
                functionality.</p>

                <p>This operation will NOT raise fault in case the resource
                connection fails. It such case it will indicate the failure in
                the return message, but the operation itself succeeds.
                The operations fails only if the provided arguments are wrong,
                in case of system error, system misconfiguration, etc.</p>

                Faults (TODO):
                any SystemFaultType
                ObjectNotFoundFaultType: specified Resource definition does not exist
            </documentation>
            <input message="tns:testResource" name="testResource"/>
            <output message="tns:testResourceResponse" name="testResourceResponse"/>
            <fault message="f:FaultMessage" name="fault"/>
        </operation>

        <operation name="importFromResource">
            <documentation>
                <p>Launch import task that will import all the accounts (or other objects
                of specified type) from the resource.</p>

                <p>WARNING: This operation is not considered public. It is a
                temporary solution until we have full-featured task management.
                It may be removed any time without a warning.</p>

                <p>DO NOT USE IT unless you are really sure you know what you
                are doing.</p>

                Faults (TODO):
                      any SystemFaultType
                      ObjectNotFoundFaultType: specified Resource definition does not exist
            </documentation>
            <input message="tns:importFromResource" name="importFromResource"/>
            <output message="tns:importFromResourceResponse" name="importFromResourceResponse"/>
            <fault message="f:FaultMessage" name="fault"/>
        </operation>

        <operation name="notifyChange">
            <documentation>
                <p>Triggers processing of a resource-related change notification.</p>
            </documentation>
            <input message="tns:notifyChange" name="notifyChange"/>
            <output message="tns:notifyChangeResponse" name="notifyChangeResponse"/>
            <fault message="f:FaultMessage" name="fault"/>
        </operation>

        <operation name="executeScripts">
            <documentation>
                <p>Executes one or more midPoint scripts (actions).</p>
                <p>NOTE: This method is not fully implemented yet.</p>
            </documentation>
            <input message="tns:executeScripts" name="executeScripts"/>
            <output message="tns:executeScriptsResponse" name="executeScriptsResponse"/>
            <fault message="f:FaultMessage" name="fault"/>
        </operation>

        <!--<operation name="getSchemas">-->
            <!--<documentation>-->
            <!--</documentation>-->
            <!--<input name="getSchemas" message="tns:getSchemas"/>-->
            <!--<output name="getSchemasResponse" message="tns:getSchemasResponse"/>-->
            <!--<fault name="fault" message="f:FaultMessage"/>-->
        <!--</operation>-->

    </portType>

    <binding name="modelBinding" type="tns:modelPortType">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="getObject">
            <soap:operation/>
            <input name="getObject">
                <soap:body use="literal"/>
            </input>
            <output name="getObjectResponse">
                <soap:body use="literal"/>
            </output>
            <fault name="fault">
                <soap:fault name="fault" use="literal"/>
            </fault>
        </operation>
        <operation name="searchObjects">
            <soap:operation/>
            <input name="searchObjects">
                <soap:body use="literal"/>
            </input>
            <output name="searchObjectsResponse">
                <soap:body use="literal"/>
            </output>
            <fault name="fault">
                <soap:fault name="fault" use="literal"/>
            </fault>
        </operation>
        <operation name="executeChanges">
            <soap:operation/>
            <input name="executeChanges">
                <soap:body use="literal"/>
            </input>
            <output name="executeChangesResponse">
                <soap:body use="literal"/>
            </output>
            <fault name="fault">
                <soap:fault name="fault" use="literal"/>
            </fault>
        </operation>
        <operation name="findShadowOwner">
            <soap:operation/>
            <input name="findShadowOwner">
                <soap:body use="literal"/>
            </input>
            <output name="findShadowOwnerResponse">
                <soap:body use="literal"/>
            </output>
            <fault name="fault">
                <soap:fault name="fault" use="literal"/>
            </fault>
        </operation>
        <operation name="testResource">
            <soap:operation/>
            <input name="testResource">
                <soap:body use="literal"/>
            </input>
            <output name="testResourceResponse">
                <soap:body use="literal"/>
            </output>
            <fault name="fault">
                <soap:fault name="fault" use="literal"/>
            </fault>
        </operation>
        <operation name="importFromResource">
            <soap:operation/>
            <input name="importFromResource">
                <soap:body use="literal"/>
            </input>
            <output name="importFromResourceResponse">
                <soap:body use="literal"/>
            </output>
            <fault name="fault">
                <soap:fault name="fault" use="literal"/>
            </fault>
        </operation>
        <operation name="notifyChange">
            <soap:operation/>
            <input name="notifyChange">
                <soap:body use="literal"/>
            </input>
            <output name="notifyChangeResponse">
                <soap:body use="literal"/>
            </output>
            <fault name="fault">
                <soap:fault name="fault" use="literal"/>
            </fault>
        </operation>
        <operation name="executeScripts">
            <soap:operation/>
            <input name="executeScripts">
                <soap:body use="literal"/>
            </input>
            <output name="executeScriptsResponse">
                <soap:body use="literal"/>
            </output>
            <fault name="fault">
                <soap:fault name="fault" use="literal"/>
            </fault>
        </operation>

        <!--<operation name="getSchemas">-->
            <!--<soap:operation/>-->
            <!--<input name="getSchemas">-->
                <!--<soap:body use="literal" />-->
            <!--</input>-->
            <!--<output name="getSchemasResponse">-->
                <!--<soap:body use="literal" />-->
            <!--</output>-->
            <!--<fault name="fault">-->
                <!--<soap:fault name="fault" use="literal"/>-->
            <!--</fault>-->
        <!--</operation>-->
    </binding>
    <service name="modelWebService">
        <port binding="tns:modelBinding" name="modelPort">
            <soap:address location="http://localhost:8080/dummy"/>
        </port>
    </service>
</definitions>