<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XML Spy v4.4 (http://www.xmlspy.com) by Adam Fiącek (AFMC) -->
<wsdl:definitions name="PrzykładZakupu" targetNamespace="http://www.fluidimagination.com/sams/PurchaseExample.wsdl" xmlns:tns="http://www.fluidimagination.com/sams/PurchaseExample.wsdl" xmlns:soap="http://www.schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:types>
    <xsd:schema targetNamespace="http://www.fluidimagination.com/sams/productType.wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:complexType name="kasaType">
        <xsd:all>
          <xsd:element name="upc" type="upcType"/>
          <xsd:element name="isbn" type="isbnType"/>
        </xsd:all>
      </xsd:complexType>
      <xsd:simpleType name="pkwiuType">
        <xsd:restriction base="xsd:string">
          <xsd:pattern value="[0-9]{12}"/>
        </xsd:restriction>
      </xsd:simpleType>
      <xsd:simpleType name="isbnType">
        <xsd:restriction base="xsd:string">
          <xsd:pattern value="([0-9]-){10}"/>
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:schema>
  </wsdl:types>
  <!--Komunikat z dwoma adresami-->
  <wsdl:message name="zakupMessage">
    <wsdl:part name="kodProduktu" element="tns:kasaType"/>
  </wsdl:message>
  <!--Utworzenie typu portu z jednym komunikatem-->
  <wsdl:portType name="zakupType">
    <wsdl:operation name="zakupOperation">
      <wsdl:input name="tns:zakupMessage"/>
    </wsdl:operation>
  </wsdl:portType>
  <!--Wiązanie komunikatu do SOAP z wykorzystaniem HTTP -->
  <wsdl:binding name="zakupBinding" type="tns:zakupType">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="tns:zakupOperation">
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
    </wsdl:operation>
  </wsdl:binding>
  <!--Wiązanie komunikatu do SOAP z wykorzystaniem SMTP-->
  <wsdl:binding name="zakupBindingSMTP" type="tns:zakupType">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/smtp"/>
    <wsdl:operation name="tns:zakupOperation">
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
    </wsdl:operation>
  </wsdl:binding>
 <service name=”Zakup_Service”>
     <documentation>Usługa umożliwiająca zakup materiałów opisanych za pomocą kodu ISBN lub PKWiU.</documentation>
     <port binding=”tns:zakupBinding” name=”Zakup_ServicePort”>
         <soap:address location=”http://www.fluidimagination.com:8080/soap/servlet/rpcrouter”/>
     </port>
 </service>
</wsdl:definitions>
