<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
             xmlns:tns="http://www.wso2.org"
             xmlns:types="http://www.wso2.org/types"
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
             xmlns:xs="http://www.w3.org/2001/XMLSchema"
             targetNamespace="http://www.wso2.org">
    <types/>
    <types>
        <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
                xmlns:tns="http://www.wso2.org/types"
                targetNamespace="http://www.wso2.org/types">
            <xs:element name="getQuoteRequest">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="symbol" type="xs:string"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:element name="getQuoteResponse">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="stockQuote" type="tns:StockQuote"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:complexType name="StockQuote">
                <xs:sequence>
                    <xs:element name="name" type="xs:string" minOccurs="0" maxOccurs="1"/>
                    <xs:element name="symbol" type="xs:string" minOccurs="0" maxOccurs="1"/>
                    <xs:element name="price" type="xs:float" minOccurs="0" maxOccurs="1"/>
                    <xs:element name="high" type="xs:float" minOccurs="0" maxOccurs="1"/>
                    <xs:element name="low" type="xs:float" minOccurs="0" maxOccurs="1"/>
                </xs:sequence>
            </xs:complexType>
            <xs:element name="getSymbolsResponse">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="return" type="tns:ArrayOfString"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
            <xs:complexType name="ArrayOfString">
                <xs:sequence>
                    <xs:element name="value" minOccurs="0" maxOccurs="unbounded" type="xs:string"/>
                </xs:sequence>
            </xs:complexType>
        </xs:schema>
    </types>
    <message name="getQuoteRequestMessage">
        <part name="part1" element="types:getQuoteRequest"/>
    </message>
    <message name="getQuoteResponseMessage">
        <part name="part1" element="types:getQuoteResponse"/>
    </message>
    <message name="getSymbolsRequestMessage">
    </message>
    <message name="getSymbolsResponseMessage">
        <part name="part1" element="types:getSymbolsResponse"/>
    </message>
    <portType name="CommodityQuotePortType">
        <!-- Get Quote -->
        <operation name="getQuote">
            <input message="tns:getQuoteRequestMessage"/>
            <output message="tns:getQuoteResponseMessage"/>
        </operation>
        <!-- Get Symbols -->
        <operation name="getSymbols">
            <input message="tns:getSymbolsRequestMessage"/>
            <output message="tns:getSymbolsResponseMessage"/>
        </operation>
    </portType>
    <binding name="CommodityQuoteBinding" type="tns:CommodityQuotePortType">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="getQuote">
            <soap:operation soapAction="getQuote" style="document"/>
            <input>
                <soap:body use="literal"/>
            </input>
            <output>
                <soap:body use="literal"/>
            </output>
        </operation>
        <operation name="getSymbols">
            <soap:operation soapAction="getSymbols" style="document"/>
            <input>
                <soap:body use="literal"/>
            </input>
            <output>
                <soap:body use="literal"/>
            </output>
        </operation>
    </binding>
    <service name="CommodityQuote">
        <port name="CommodityQuotePort" binding="tns:CommodityQuoteBinding">
            <soap:address location="http://nagoya.apache.org:5049/axis/services/echo"/>
        </port>
    </service>
</definitions>