<?xml version="1.0" encoding="utf-8" ?>
<!--Created with Liquid XML Studio 7.1.6.1440 (http://www.liquid-technologies.com)-->
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="MsgPKMZD">
    <xs:annotation>
      <xs:documentation>Zakonczenie umowy kupującego dla mikroinstalacji
Wyslanie powiadomienia o zakonczeniu umowy kupujacego dla mikroinstalacji do "Dotychczasowego Kupujacego" wysylany na podstawie przyjecia zgloszenia od "Nowego Kupujacego" (w chwili odpisania w DD </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Naglowek" type="NaglowekWytw" />
        <xs:element name="PDZUK">
          <xs:annotation>
            <xs:documentation>Planowana data zakończenia umowy z dotychczasowym kupującym (format daty "RRRR-MM-DD") - data zakończenia wstązki w DD</xs:documentation>
          </xs:annotation>
          <xs:simpleType>
            <xs:restriction base="xs:date">
              <xs:pattern value="RRRR-MM-DD" />
            </xs:restriction>
          </xs:simpleType>
        </xs:element>
        <xs:element name="DanePPE" type="DanePPE_MI" />
        <xs:element name="DaneURD" type="DaneURD" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="NaglowekWytw">
    <xs:annotation>
      <xs:documentation>Naglowek komunikatu
[Header]</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="PMSG">
        <xs:annotation>
          <xs:documentation>Powód komunikatu opisuje czy komunikat powstal w wyniku procesu biznesowego czy serwisowego (B - biznesowy, S - serwisowy)
[Reason]</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="B" />
            <xs:enumeration value="S" />
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="MST">
        <xs:annotation>
          <xs:documentation>Typ komunikatu deklaruje rodzaj komunikatu
[MsgType]</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="ZMI" />
            <xs:enumeration value="WMI" />
            <xs:enumeration value="PKMP" />
            <xs:enumeration value="PKMN" />
            <xs:enumeration value="PKMA" />
            <xs:enumeration value="PKMZ" />
            <xs:enumeration value="PKMZD" />
            <xs:enumeration value="ZRUG" />
            <xs:enumeration value="RUM" />
            <xs:enumeration value="PZSK" />
            <xs:enumeration value="ZUSR" />
            <xs:enumeration value="ZUSRK" />
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="DCW" type="xs:dateTime">
        <xs:annotation>
          <xs:documentation>Data wygenerowania komunikatu
[RegistrationDate]</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="KKU" type="xs:string">
        <xs:annotation>
          <xs:documentation>Kod kupujacego
Buyer</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="NKU" type="xs:string">
        <xs:annotation>
          <xs:documentation>Nazwa kupjacego
[BuyerName]</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="MDD" type="xs:string">
        <xs:annotation>
          <xs:documentation>Kod MDD</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="GUID" type="xs:string">
        <xs:annotation>
          <xs:documentation>Identyfikator unikalny komunikatu - moze sluzyc jako odniesienie do anulowania komunikatu</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="URD">
    <xs:sequence>
      <xs:element name="NazwaURD" type="xs:string">
        <xs:annotation>
          <xs:documentation>Nazwa odbiorcy
[LongName]</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ImieURD" type="xs:string">
        <xs:annotation>
          <xs:documentation>Imie odbiorcy
[FirstName]</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="NazwiskoURD" type="xs:string">
        <xs:annotation>
          <xs:documentation>Nazwisko odbiorcy
[LastName]</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" maxOccurs="1" name="NIPURD" type="xs:string">
        <xs:annotation>
          <xs:documentation>Numer NIP, aktywny gdy RodzajURD = P
[TaxId]</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" maxOccurs="1" name="PESELURD" type="xs:string">
        <xs:annotation>
          <xs:documentation>Nr PESEL Odbiorcy, aktywny gdy RodzajURD = I
[PersonalId]</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" maxOccurs="1" name="RodzajDokToz" type="xs:string">
        <xs:annotation>
          <xs:documentation>Rodzaj dokumentu tożsamości
[IdentityType]</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" maxOccurs="1" name="NrDokToz" type="xs:string">
        <xs:annotation>
          <xs:documentation>Nr dokumentu tożsamości
[IdentityNr]</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="AURD" type="Adres" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="DaneURD">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="NrKontrahenta" type="xs:int">
        <xs:annotation>
          <xs:documentation>Numer wewnętrzny kontrahenta - identyfikator systemowy platnika
[CustomerId]</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="RodzajURD">
        <xs:annotation>
          <xs:documentation>Rodzaj odbiorcy (I - Indywidualny, P - Płatnik)
[CustomerType]</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="I" />
            <xs:enumeration value="P" />
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element name="URD1" type="URD" />
      <xs:element minOccurs="0" maxOccurs="1" name="URD2" type="URD" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="Adres">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="Panstwo" type="xs:string">
        <xs:annotation>
          <xs:documentation>Symbol państwa - domyślnie PL
[Country]</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Miejscowosc" type="xs:string">
        <xs:annotation>
          <xs:documentation>Miejscowość
[City]</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="KodPocztowy" type="xs:string">
        <xs:annotation>
          <xs:documentation>Kod pocztowy w formacie NN-NNN dla Polski i dowolnym formacie dla innych panstw.
[ZipCode]</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" maxOccurs="1" name="Ulica" type="xs:string">
        <xs:annotation>
          <xs:documentation>Ulica
[Street]</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Poczta" type="xs:string">
        <xs:annotation>
          <xs:documentation>Poczta
[PostOffice]</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" maxOccurs="1" name="KodGUS" type="xs:string">
        <xs:annotation>
          <xs:documentation>Kod GUS
[GusCode]</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="NrDomu" type="xs:string">
        <xs:annotation>
          <xs:documentation>Numer domu
[House]</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" maxOccurs="1" name="NrLokalu" type="xs:string">
        <xs:annotation>
          <xs:documentation>Numer lokalu
[Flat]</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element minOccurs="0" maxOccurs="1" name="NrDzialki" type="xs:string">
        <xs:annotation>
          <xs:documentation>Numer działki
[Parcel]</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="DanePPE_MI">
    <xs:sequence>
      <xs:element name="PPE">
        <xs:annotation>
          <xs:documentation>Kod PPE</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="18" />
            <xs:maxLength value="32" />
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
      <xs:element minOccurs="0" maxOccurs="1" name="NLMI" type="xs:string">
        <xs:annotation>
          <xs:documentation>Numer licznika podlaczonego na ukadzie pomiarowym w dniu odpisania ZOT/OTS lub zlecenia odczytu. Pierwszy komunikat wysyłany po zatwierdzeniu umowy nie zawiera tych danych (pole puste), komunikat wysłany po odpisaniu OT powinien zawierać informację o nr licznika. 
Powinno nastąpić badanie czy uruchomiono MI, jeśli nie uruchomiono i nie ma informacji o MI to pole jest puste.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="APPE" type="Adres">
        <xs:annotation>
          <xs:documentation>Kolekcja danych adresu PPE</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:schema>