Przykad 13.1. Najbardziej podstawowa forma deklarowania schematu

<schema xmlns="http://www.w3.org/2001/XMLSchema">
-------------------------------------------------------------------------------
Przykad 13.2. Przykadowa deklaracja elementu w schemacie XSD

<element name="NumerFaktury" type="xsd:integer"/>
-------------------------------------------------------------------------------
Przykad 13.3. Odwoanie do zadeklarowanego elementu w instancji dokumentu XML

<NumerFaktury>12345</NumerFaktury>
-------------------------------------------------------------------------------
Przykad 13.4. Element complexType grupujcy deklaracje dwch innych elementw

<complexType name="GodzinyPracownika">
   <sequence>
      <element name="ID" type="xsd:integer"/>
      <element name="TygodniowyLimitGodzin" type="xsd:short"/>
   </sequence>
</complexType>
-------------------------------------------------------------------------------
Przykad 13.5. Elementy import i include

<schema xmlns="http://www.w3.org/2001/XMLSchema" ...>
   <import schemaLocation="..."
      namespace="http://www.xmltc.com/tls/schema"/>
   <include schemaLocation="..."/>
-------------------------------------------------------------------------------
Przykad 13.6. Element definitions usugi Pracownik z licznymi deklaracjami 
przestrzeni nazw

<definitions name="Pracownik"
   targetNamespace="http://www.xmltc.com/tls/employee/wsdl/"
   xmlns="http://schemas.xmlsoap.org/wsdl/"
   xmlns:act="http://www.xmltc.com/tls/employee/schema/accounting/"
   xmlns:hr="http://www.xmltc.com/tls/employee/schema/hr/"
   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
   xmlns:tns="http://www.xmltc.com/tls/employee/wsdl/"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   ...
</definitions>
-------------------------------------------------------------------------------
Przykad 13.7. Konstrukcja types z osadzon konstrukcj schema, w ramach ktrej 
definiowany jest typ zoony (complexType)

<types>
   <schema
      xmlns="http://www.w3.org/2001/XMLSchema"
      targetNamespace=
         "http://www.xmltc.com/railco/transform/schema/">
      <complexType name="TypKoduPowrotu">
         <sequence>
            <element name="Kod" type="xsd:integer"/>
            <element name="Komunikat" type="xsd:string"/>
         </sequence>
      </complexType>
   </schema>
</types>
-------------------------------------------------------------------------------
Przykad 13.8. Dwie konstrukcje message, definiujce prawdopodobnie wyjciowy 
i wejciowy komunikat dla operacji

<message name="getEmployeeWeeklyHoursRequestMessage">
   <part name="RequestParameter"
      element="act:EmployeeHoursRequestType"/>
</message>
<message name="getEmployeeWeeklyHoursResponseMessage">
   <part name="ResponseParameter"
      element="act:EmployeeHoursResponseType"/>
</message>
-------------------------------------------------------------------------------
Przykad 13.9. Prosty parametr komunikatu, okrelany za pomoc 
jednej liczby cakowitej

<message name="getID">
   <part type="xsd:integer"/>
</message>
-------------------------------------------------------------------------------
Przykad 13.10. Konstrukcja portType hostujca dwie konstrukcje operation

<portType name="EmployeeInterface">
   <operation name="PodajTygodniowyLimitGodzin">
      ...
   </operation>
   <operation name="AktualizujHistorie">
      ...
   </operation>
</portType>
-------------------------------------------------------------------------------
Przykad 13.11. Elementy operation z potomnymi elementami input i output       

<operation name="PodajTygodniowyLimitGodzin">
   <input message="tns:getWeeklyHoursRequestMessage"/>
   <output message="tns:getWeeklyHoursResponseMessage"/>
</operation>
<operation name="AktualizujHistorie">
   <input message="tns:updateHistoryRequestMessage"/>
   <output message="tns:updateHistoryResponseMessage"/>
</operation>
-------------------------------------------------------------------------------
Przykad 13.12. Element operation z jednym elementem potomnym input

<operation name="Wystaw">
   <input message="tns:receiveSubmitMessage"/>
</operation>
-------------------------------------------------------------------------------
Przykad 13.13. Konstrukcja binding hostujca skonkretyzowane opisy operacji

<binding name="EmployeeBinding" type="tns:EmployeeInterface">
   <soap:binding style="document"
      transport="http://schemas.xmlsoap.org/soap/http"/>
   <operation name="PodajTygodniowyLimitGodzin">
      <soap:operation soapAction="..."/>
       ...
   </operation>
   <operation name="AktualizujHistorie">
      <soap:operation soapAction="..."/>
       ...
   </operation>
</binding>
-------------------------------------------------------------------------------
Przykad 13.14. Elementy input i output dostarczajce informacje o sposobie 
przetwarzania komunikatw

<operation name="PodajTygodniowyLimitGodzin">
   <soap:operation soapAction="..."/>
   <input>
      <soap:body use="literal"/>
   </input>
   <output>
      <soap:body use="literal"/>
   </output>
</operation>

<operation name="AktualizujHistorie">
   <soap:operation soapAction="..."/>
   <input>
      <soap:body use="literal"/>
   </input>
   <output>
      <soap:body use="literal"/>
   </output>
</operation>
-------------------------------------------------------------------------------
Przykad 13.15. Elementy service i port ustanawiajce fizyczny adres usugi

<service name="EmployeeService">
   <port binding="tns:EmployeeBinding" name="EmployeePort">
      <soap:address
         location="http://www.xmltc.com/tls/employee/"/>
   </port>
</service>
-------------------------------------------------------------------------------
Przykad 13.16. Element import odwoujcy si do schematu XSD

<import namespace="http://www.xmltc.com/tls/schemas/"
   location="http://www.xmltc.com/tls/schemas/employee.xsd"/>
-------------------------------------------------------------------------------   
Przykad 13.17. Element documentation zawierajcy oglny opis interfejsu usugi

<portType name="TransformInterface">
  <documentation>
     Odbiera dokument w formacie XML i konwertuje go 
     na format natywny dla systemu finansowo-ksigowego.
   </documentation>
...
</portType>
-------------------------------------------------------------------------------
Przykad 13.18. Korze Envelope hostujcy konstrukcje Header i Body

<Envelope xmlns ="http://schemas.xmlsoap.org/soap/envelope/">
   <Header>
      ...
   </Header>
   <Body>
      ...
   </Body>
</Envelope>
-------------------------------------------------------------------------------
Przykad 13.19. Konstrukcja Header hostujca blok nagwkowy komunikatu SOAP

<Header>
   <x:CorrelationID
      xmlns:x="http://www.xmltc.com/tls/headersample/" 
      mustUnderstand="1">
         0131858580-JDJ903KD
   </x:CorrelationID>
</Header>
-------------------------------------------------------------------------------
Przykad 13.20. Posta przykadowej konstrukcji Body

<Body>
   <soa:book xmlns:soa="http://www.serviceoriented.ws/">
      <soa:ISBN>
         0131858580
      </soa:ISBN>
      <soa:title>
         Service-Oriented Architecture
         Concepts, Technology, and Design
      </soa:title>
   </soa:book>
</Body>
-------------------------------------------------------------------------------
Przykad 13.21. Konstrukcja Fault rezydujca wewntrz konstrukcji Body

<Body>
   <Fault>
      <faultcode>
         MustUnderstand
      </faultcode>
      <faultstring>
         nie rozpoznano nagwka
      </faultstring>
      <detail>
         <x:appMessage
            xmlns:x="http://www.xmltc.com/tls/faults">
               Nagwek CorrelationID nie zosta rozpoznany przez odbiorc
               zobowizanego do jego przetworzenia. Wygenerowany zosta wyjtek 
               sygnalizujcy prawdopodobne problemy z funkcjonowaniem tego 
               odbiorcy.
         </x:appMessage>
      </detail>
   </Fault>
</Body>
