<?xml version="1.0" encoding="UTF-8"?>
<definitions name="FuelIndexService"
             targetNamespace="http://fuel.mcppiper.com/soap"
             xmlns="http://schemas.xmlsoap.org/wsdl/"
             xmlns:tns="http://fuel.mcppiper.com/soap"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema"
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
    <types>
        <xsd:schema targetNamespace="http://fuel.mcppiper.com/soap">
            <xsd:element name="GetFuelSurcharge">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="originCity" type="xsd:string"/>
                        <xsd:element name="originState" type="xsd:string"/>
                        <xsd:element name="destCity" type="xsd:string"/>
                        <xsd:element name="destState" type="xsd:string"/>
                        <xsd:element name="miles" type="xsd:int" minOccurs="0"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
            <xsd:element name="GetFuelSurchargeResponse">
                <xsd:complexType>
                    <xsd:sequence>
                        <xsd:element name="dieselIndexUsd" type="xsd:decimal"/>
                        <xsd:element name="surchargeCentsPerMile" type="xsd:decimal"/>
                        <xsd:element name="miles" type="xsd:int"/>
                        <xsd:element name="fuelSurchargeUsd" type="xsd:decimal"/>
                        <xsd:element name="asOf" type="xsd:string"/>
                    </xsd:sequence>
                </xsd:complexType>
            </xsd:element>
        </xsd:schema>
    </types>

    <message name="GetFuelSurchargeRequest"><part name="parameters" element="tns:GetFuelSurcharge"/></message>
    <message name="GetFuelSurchargeResponse"><part name="parameters" element="tns:GetFuelSurchargeResponse"/></message>

    <portType name="FuelIndexPort">
        <operation name="GetFuelSurcharge">
            <documentation>DOE-style diesel index and the fuel surcharge in cents per mile for a lane. Offer = linehaul + (miles × surcharge).</documentation>
            <input message="tns:GetFuelSurchargeRequest"/>
            <output message="tns:GetFuelSurchargeResponse"/>
        </operation>
    </portType>

    <binding name="FuelIndexBinding" type="tns:FuelIndexPort">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="GetFuelSurcharge">
            <soap:operation soapAction="http://fuel.mcppiper.com/soap/GetFuelSurcharge"/>
            <input><soap:body use="literal"/></input>
            <output><soap:body use="literal"/></output>
        </operation>
    </binding>

    <service name="FuelIndexService">
        <documentation>Dummy fuel index SOAP API (HTTP Basic fuel:fuel) for brokerage scenario 1.</documentation>
        <port name="FuelIndexPort" binding="tns:FuelIndexBinding">
            <soap:address location="http://test-api.mcppiper.com/soap/fuel"/>
        </port>
    </service>
</definitions>
