<?xml version="1.0" encoding="utf-8"?>
<!--

    Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.

    This program and the accompanying materials are made available under the
    terms of the Eclipse Distribution License v. 1.0, which is available at
    http://www.eclipse.org/org/documents/edl-v10.php.

    SPDX-License-Identifier: BSD-3-Clause

-->

<!--
 $Id: wsit-client-wsitwqs.xml,v 1.8 2010-10-21 14:23:14 snajper Exp $
-->

<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
             xmlns:wsaw="http://www.w3.org/2005/08/addressing"
             xmlns:wsap10="http://www.w3.org/2005/08/addressing"
             xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
             xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
             xmlns:tns="http://example.org/wholesaler"
             targetNamespace="http://example.org/wholesaler">

     <wsp:Policy wsu:Id="KeyStorePolicy">
      <wsp:ExactlyOne>
         <wsp:All>
             <sc:KeyStore xmlns:sc="http://schemas.sun.com/2006/03/wss/client" location="d:/testbed/apache-tomcat-5.5.16/xws-security/etc/client-keystore.jks" storepass="changeit" alias="alice" optional="true"/>
             <sc:TrustStore xmlns:sc="http://schemas.sun.com/2006/03/wss/client" location="d:/testbed/apache-tomcat-5.5.16/xws-security/etc/client-truststore.jks" storepass="changeit"  optional="true"/>
             <sc:CallbackHandlerConfiguration xmlns:sc="http://schemas.sun.com/2006/03/wss/client"  optional="true">
             <sc:CallbackHandler  name="usernameHandler"  default="Alice"  optional="true"/>
             <!--<sc:CallbackHandler  name="passwordHandler"  default="abcd!1234"/>-->
            <!--<sc:CallbackHandler  name="passwordHandler"  default="ecilA"/>-->
            </sc:CallbackHandlerConfiguration>
       </wsp:All>
      </wsp:ExactlyOne>
   </wsp:Policy>


    <types>
        <xsd:schema
                xmlns="http://www.w3.org/2001/XMLSchema"
                xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                targetNamespace="http://example.org/wholesaler"
                xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
                elementFormDefault="qualified"
                attributeFormDefault="unqualified">
            <xsd:element name='id' type='xsd:int'/>
            <element name="quote">
                <complexType>
                    <sequence>
                        <element name="price" type="float"/>
                        <!--<element name="specs" type="string" xmime:expectedContentTypes="text/xml"/>-->
                        <element name="photo" type="base64Binary" xmime:expectedContentTypes="image/jpeg"/>
                    </sequence>
                </complexType>
            </element>
        </xsd:schema>
    </types>

    <message name="getQuoteRequest">
        <part name="request" element="tns:id"/>
    </message>

    <message name="getQuoteResponse">
        <part name="response" element="tns:quote"/>
    </message>

    <portType name="WholesalerPortType">
        <operation name="getQuote">
            <input message="tns:getQuoteRequest" wsaw:Action="http://example.org/wholesaler/request"/>
            <output message="tns:getQuoteResponse" wsaw:Action="http://example.org/wholesaler/response"/>
        </operation>
    </portType>

    <binding name="WholesalerBinding" type="tns:WholesalerPortType">
        <!--<wsp:PolicyReference URI="#OnlyMTOM_policy"/>-->
        <!--<wsp:PolicyReference URI="#OnlyRM_policy"/>-->
        <wsp:PolicyReference URI="#KeyStorePolicy"/>
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="getQuote">
            <soap:operation style="document" soapAction="http://example.org/wholesaler/request"/>
            <input>
                <!--<wsp:PolicyReference URI="#Wholesaler_getQuote_Input_policy"/>-->
                <soap:body use="literal"/>
            </input>
            <output>
                <!--<wsp:PolicyReference URI="#Wholesaler_getQuote_Output_policy"/>-->
                <soap:body use="literal"/>
            </output>
        </operation>

    </binding>

    <service name="WholesaleService">
        <port name="WholesalerPort" binding="tns:WholesalerBinding">
            <soap:address location="http://129.145.133.244/WcfInterop/WholesaleService.wsdl"/>
        </port>
    </service>
    <service name="WholesalerQuoteService">
        <port name="WholesalerPort" binding="tns:WholesalerBinding">
            <soap:address location="http://localhost:8080/pricequote/wholesaler?wsdl"/>
        </port>
    </service>
    <plink:partnerLinkType xmlns:plink="http://schemas.xmlsoap.org/ws/2004/03/partner-link" name="Wholeslaer1PLT">
        <plink:role portType="tns:WholesalerPortType" name="Wholesaler1Role"/>
    </plink:partnerLinkType>
</definitions>

