<?xml version="1.0" encoding="UTF-8"?>

<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
        xmlns:tns="http://www.example.com/example/subscriberInterface/"
        xmlns:merch="http://www.example.com/example/commonTypes/"
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
        xmlns:xs="http://www.w3.org/2001/XMLSchema"
        targetNamespace="http://www.example.com/example/subscriberInterface/" 
        xmlns:wsp="http://www.w3.org/ns/ws-policy" 
        xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" 
        xmlns:fi="http://java.sun.com/xml/ns/wsit/2006/09/policy/fastinfoset/service" 
        xmlns:tcp="http://java.sun.com/xml/ns/wsit/2006/09/policy/soaptcp/service">


    <wsdl:types>
     <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns:wsdl="http://schemas.xmlsoap.org/soap/encoding/"
           targetNamespace="http://www.example.com/example/subscriberInterface/">

    <xs:import namespace="http://www.example.com/example/commonTypes/"
	schemaLocation="commonTypes.xsd"/>

    <xs:element name="setSubscriberRequest" type="tns:setSubscriberRequest"/>

    <xs:complexType name="setSubscriberRequest">
        <xs:complexContent>
            <xs:extension base="merch:requestBaseType">
                <xs:sequence>
                    <xs:element name="subscriber" type="tns:subscriberType"/>
                </xs:sequence>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

    <xs:complexType name="subscriberType">
        <xs:sequence>
            <xs:element name="name" type="merch:nonEmptyString"/>
            <xs:element name="phone" type="merch:nonEmptyString" minOccurs="0"/>
            <xs:element name="age" type="merch:nonNegativeInteger"/>
        </xs:sequence>
    </xs:complexType>

   </xs:schema>

  </wsdl:types><!-- End of Types -->

<!--************************************************************************-->
<!-- Messages -->

  <wsdl:message name="setSubscriberRequest">
    <wsdl:part name="parameters" element="tns:setSubscriberRequest"/>
  </wsdl:message>
  
<!--************************************************************************-->
<!-- Port -->

  <wsdl:portType name="subscriberInterface">
    <wsdl:operation name="setsubscriber">
      <wsdl:input message="tns:setSubscriberRequest"/>
      <wsdl:output message="tns:setSubscriberResponse"/>
    </wsdl:operation>
  </wsdl:portType>


<!--************************************************************************-->
<!-- Bindings -->

    <wsdl:binding name="subscriberPortBinding" type="tns:subscriberInterface">
        <wsp:PolicyReference URI="#subscriberPortBindingPolicy"/>
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
    <wsdl:operation name="setSubscriber">
      <soap:operation soapAction="http://www.example.com/example/subscriberInterface/setSubscriber"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>

<!--************************************************************************-->
<!-- Service -->

    <wsdl:service name="subscriberInterface">
        <wsdl:port name="contentRating"
               binding="tns:subscriberPortBinding">
            <soap:address location="http://www.example.com/example/subscriberInterface/" />
        </wsdl:port>
    </wsdl:service>
    <wsp:Policy wsu:Id="subscriberPortBindingPolicy">
        <wsp:ExactlyOne>
            <wsp:All/>
        </wsp:ExactlyOne>
    </wsp:Policy>
</wsdl:definitions>

