<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
             xmlns:wsp="http://www.w3.org/ns/ws-policy"
             xmlns:tns="http://org.openecomp.mso/vnfNotify"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema"
             xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy"
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
             xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
             xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
             name="vnfAdapterNotify"
             targetNamespace="http://org.openecomp.mso/vnfNotify">
  <types>
      <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
                 targetNamespace="http://org.openecomp.mso/vnfNotify"
                 version="1.0">

         <xs:element name="createVnfNotification" type="tns:createVnfNotification"/>
      
         <xs:element name="updateVnfNotification" type="tns:updateVnfNotification"/>

         <xs:element name="deleteVnfNotification" type="tns:deleteVnfNotification"/>

         <xs:element name="queryVnfNotification" type="tns:queryVnfNotification"/>

         <xs:element name="rollbackVnfNotification" type="tns:rollbackVnfNotification"/>

         <xs:complexType name="queryVnfNotification">
            <xs:sequence>
               <xs:element name="messageId" type="xs:string"/>
               <xs:element name="completed" type="xs:boolean"/>
               <xs:element minOccurs="0" name="exception" type="tns:msoExceptionCategory"/>
               <xs:element minOccurs="0" name="errorMessage" type="xs:string"/>
               <xs:element minOccurs="0" name="vnfExists" type="xs:boolean"/>
               <xs:element minOccurs="0" name="vnfId" type="xs:string"/>
               <xs:element minOccurs="0" name="status" type="tns:vnfStatus"/>
               <xs:element minOccurs="0" name="outputs">
                  <xs:complexType>
                     <xs:sequence>
                        <xs:element maxOccurs="unbounded" minOccurs="0" name="entry">
                           <xs:complexType>
                              <xs:sequence>
                                 <xs:element minOccurs="0" name="key" type="xs:string"/>
                                 <xs:element minOccurs="0" name="value" type="xs:string"/>
                              </xs:sequence>
                           </xs:complexType>
                        </xs:element>
                     </xs:sequence>
                  </xs:complexType>
               </xs:element>
            </xs:sequence>
         </xs:complexType>

         <xs:complexType name="deleteVnfNotification">
            <xs:sequence>
               <xs:element name="messageId" type="xs:string"/>
               <xs:element name="completed" type="xs:boolean"/>
               <xs:element minOccurs="0" name="exception" type="tns:msoExceptionCategory"/>
               <xs:element minOccurs="0" name="errorMessage" type="xs:string"/>
            </xs:sequence>
         </xs:complexType>

         <xs:complexType name="rollbackVnfNotification">
            <xs:sequence>
               <xs:element name="messageId" type="xs:string"/>
               <xs:element name="completed" type="xs:boolean"/>
               <xs:element minOccurs="0" name="exception" type="tns:msoExceptionCategory"/>
               <xs:element minOccurs="0" name="errorMessage" type="xs:string"/>
            </xs:sequence>
         </xs:complexType>

         <xs:complexType name="createVnfNotification">
            <xs:sequence>
               <xs:element name="messageId" type="xs:string"/>
               <xs:element name="completed" type="xs:boolean"/>
               <xs:element minOccurs="0" name="exception" type="tns:msoExceptionCategory"/>
               <xs:element minOccurs="0" name="errorMessage" type="xs:string"/>
               <xs:element minOccurs="0" name="vnfId" type="xs:string"/>
               <xs:element minOccurs="0" name="outputs">
                  <xs:complexType>
                     <xs:sequence>
                        <xs:element maxOccurs="unbounded" minOccurs="0" name="entry">
                           <xs:complexType>
                              <xs:sequence>
                                 <xs:element minOccurs="0" name="key" type="xs:string"/>
                                 <xs:element minOccurs="0" name="value" type="xs:string"/>
                              </xs:sequence>
                           </xs:complexType>
                        </xs:element>
                     </xs:sequence>
                  </xs:complexType>
               </xs:element>
               <xs:element minOccurs="0" name="rollback" type="tns:vnfRollback"/>
            </xs:sequence>
         </xs:complexType>
      
         <xs:complexType name="updateVnfNotification">
            <xs:sequence>
               <xs:element name="messageId" type="xs:string"/>
               <xs:element name="completed" type="xs:boolean"/>
               <xs:element minOccurs="0" name="exception" type="tns:msoExceptionCategory"/>
               <xs:element minOccurs="0" name="errorMessage" type="xs:string"/>
               <xs:element minOccurs="0" name="outputs">
                  <xs:complexType>
                     <xs:sequence>
                        <xs:element maxOccurs="unbounded" minOccurs="0" name="entry">
                           <xs:complexType>
                              <xs:sequence>
                                 <xs:element minOccurs="0" name="key" type="xs:string"/>
                                 <xs:element minOccurs="0" name="value" type="xs:string"/>
                              </xs:sequence>
                           </xs:complexType>
                        </xs:element>
                     </xs:sequence>
                  </xs:complexType>
               </xs:element>
               <xs:element minOccurs="0" name="rollback" type="tns:vnfRollback"/>
            </xs:sequence>
         </xs:complexType>

         <xs:complexType name="vnfRollback">
            <xs:sequence>
               <xs:element minOccurs="0" name="cloudSiteId" type="xs:string"/>
               <xs:element minOccurs="0" name="msoRequest" type="tns:msoRequest"/>
               <xs:element name="tenantCreated" type="xs:boolean"/>
               <xs:element minOccurs="0" name="tenantId" type="xs:string"/>
               <xs:element name="vnfCreated" type="xs:boolean"/>
               <xs:element minOccurs="0" name="vnfId" type="xs:string"/>
            </xs:sequence>
         </xs:complexType>

         <xs:complexType name="msoRequest">
            <xs:sequence>
               <xs:element minOccurs="0" name="requestId" type="xs:string"/>
               <xs:element minOccurs="0" name="serviceInstanceId" type="xs:string"/>
            </xs:sequence>
         </xs:complexType>

         <xs:simpleType name="msoExceptionCategory">
            <xs:restriction base="xs:string">
               <xs:enumeration value="OPENSTACK"/>
               <xs:enumeration value="IO"/>
               <xs:enumeration value="INTERNAL"/>
               <xs:enumeration value="USERDATA"/>
            </xs:restriction>
         </xs:simpleType>

         <xs:simpleType name="vnfStatus">
            <xs:restriction base="xs:string">
               <xs:enumeration value="ACTIVE"/>
               <xs:enumeration value="FAILED"/>
               <xs:enumeration value="NOTFOUND"/>
               <xs:enumeration value="UNKNOWN"/>
            </xs:restriction>
         </xs:simpleType>
      </xs:schema>
  </types>
  <message name="rollbackVnfNotification">
      <part element="tns:rollbackVnfNotification" name="parameters"/>
  </message>
  <message name="queryVnfNotification">
      <part element="tns:queryVnfNotification" name="parameters"/>
  </message>
  <message name="createVnfNotification">
      <part element="tns:createVnfNotification" name="parameters"/>
  </message>
  <message name="updateVnfNotification">
      <part element="tns:updateVnfNotification" name="parameters"/>
  </message>
  <message name="deleteVnfNotification">
      <part element="tns:deleteVnfNotification" name="parameters"/>
  </message>
  <portType name="vnfAdapterNotify">
      <operation name="rollbackVnfNotification">
         <input message="tns:rollbackVnfNotification"
                wsam:Action="http://org.openecomp.mso/notify/adapterNotify/rollbackVnfNotificationRequest"/>
      </operation>
      <operation name="queryVnfNotification">
         <input message="tns:queryVnfNotification"
                wsam:Action="http://org.openecomp.mso/notify/adapterNotify/queryVnfNotificationRequest"/>
      </operation>
      <operation name="createVnfNotification">
         <input message="tns:createVnfNotification"
                wsam:Action="http://org.openecomp.mso/notify/adapterNotify/createVnfNotificationRequest"/>
      </operation>
      <operation name="updateVnfNotification">
         <input message="tns:updateVnfNotification"
                wsam:Action="http://org.openecomp.mso/notify/adapterNotify/updateVnfNotificationRequest"/>
      </operation>
      <operation name="deleteVnfNotification">
         <input message="tns:deleteVnfNotification"
                wsam:Action="http://org.openecomp.mso/notify/adapterNotify/deleteVnfNotificationRequest"/>
      </operation>
  </portType>
  <binding name="MsoVnfAdapterAsyncImplPortBinding" type="tns:vnfAdapterNotify">
      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
      <operation name="rollbackVnfNotification">
         <soap:operation soapAction=""/>
         <input>
            <soap:body use="literal"/>
         </input>
      </operation>
      <operation name="queryVnfNotification">
         <soap:operation soapAction=""/>
         <input>
            <soap:body use="literal"/>
         </input>
      </operation>
      <operation name="createVnfNotification">
         <soap:operation soapAction=""/>
         <input>
            <soap:body use="literal"/>
         </input>
      </operation>
      <operation name="updateVnfNotification">
         <soap:operation soapAction=""/>
         <input>
            <soap:body use="literal"/>
         </input>
      </operation>
      <operation name="deleteVnfNotification">
         <soap:operation soapAction=""/>
         <input>
            <soap:body use="literal"/>
         </input>
      </operation>
  </binding>
  <service name="vnfAdapterNotify">
      <port binding="tns:MsoVnfAdapterAsyncImplPortBinding"
            name="MsoVnfAdapterAsyncImplPort">
         <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
      </port>
  </service>
</definitions>