<?xml version="1.0" encoding="UTF-8"?>
<definitions name="UtilityService"
             targetNamespace="http://util.mcppiper.com/soap"
             xmlns="http://schemas.xmlsoap.org/wsdl/"
             xmlns:tns="http://util.mcppiper.com/soap"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema"
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
    <types>
        <xsd:schema targetNamespace="http://util.mcppiper.com/soap">
            <xsd:element name="GenerateRandomNumber">
                <xsd:complexType>
                    <xsd:sequence/>
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="GenerateRandomNumberResponse">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="value" type="xsd:int"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="GetCurrentDateTime">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="timezone" type="xsd:string" minOccurs="0"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="GetCurrentDateTimeResponse">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="dateTime" type="xsd:string"/>
                        <xsd:element name="timezone" type="xsd:string"/>
                        <xsd:element name="epochMillis" type="xsd:long"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
        </xsd:schema>
    </types>

    <message name="GenerateRandomNumberRequest"><part name="parameters" element="tns:GenerateRandomNumber"/></message>
    <message name="GenerateRandomNumberResponse"><part name="parameters" element="tns:GenerateRandomNumberResponse"/></message>
    <message name="GetCurrentDateTimeRequest"><part name="parameters" element="tns:GetCurrentDateTime"/></message>
    <message name="GetCurrentDateTimeResponse"><part name="parameters" element="tns:GetCurrentDateTimeResponse"/></message>

    <portType name="UtilityPort">
        <operation name="GenerateRandomNumber">
            <documentation>Generate a random integer from 0 to 1000 inclusive.</documentation>
            <input message="tns:GenerateRandomNumberRequest"/>
            <output message="tns:GenerateRandomNumberResponse"/>
        </operation>
        <operation name="GetCurrentDateTime">
            <documentation>Get the current date and time. timezone is an IANA id such as UTC or Europe/Berlin. Defaults to UTC.</documentation>
            <input message="tns:GetCurrentDateTimeRequest"/>
            <output message="tns:GetCurrentDateTimeResponse"/>
        </operation>
    </portType>

    <binding name="UtilityBinding" type="tns:UtilityPort">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="GenerateRandomNumber">
            <soap:operation soapAction="http://util.mcppiper.com/soap/GenerateRandomNumber"/>
            <input><soap:body use="literal"/></input>
            <output><soap:body use="literal"/></output>
        </operation>
        <operation name="GetCurrentDateTime">
            <soap:operation soapAction="http://util.mcppiper.com/soap/GetCurrentDateTime"/>
            <input><soap:body use="literal"/></input>
            <output><soap:body use="literal"/></output>
        </operation>
    </binding>

    <service name="UtilityService">
        <documentation>Small SOAP utility API for testing MCP Piper SOAP → MCP.</documentation>
        <port name="UtilityPort" binding="tns:UtilityBinding">
            <soap:address location="http://test-api.mcppiper.com/soap/util"/>
        </port>
    </service>
</definitions>
