<?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.xml,v 1.11 2010-10-21 14:29:02 snajper Exp $
-->

<wsdl:definitions targetNamespace="http://tempuri.org/" xmlns:tns="http://tempuri.org/"
                  xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract"
                  xmlns:wsa10="http://www.w3.org/2005/08/addressing"  xmlns:wsap10="http://www.w3.org/2006/05/addressing/wsdl"
                  xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/09/policy/addressing"
                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
                  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
                  xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
                  xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
                  xmlns:ci="http://schemas.microsoft.com/ws/2005/01/WSDL/Extensions/ContractInheritance"
                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                  xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"
                  xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
                  xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/">

    <!-- begin :Keystore Info : latest method : referred from wsdl:service element -->
    <wsp:Policy wsu:Id="ClientKeystorePolicy"
                xmlns:sc="http://schemas.sun.com/2006/03/wss/client"
                xmlns:wspp="http://java.sun.com/xml/ns/wsit/policy"
                xmlns:scc="http://schemas.sun.com/ws/2006/05/sc/client">
        <wsp:ExactlyOne>
            <wsp:All>
                <sc:KeyStore location="$WSIT_HOME/xws-security/etc/client-keystore.jks"
                             type="JKS" alias="alice" storepass="changeit"></sc:KeyStore>
                <sc:TrustStore location="$WSIT_HOME/xws-security/etc/client-truststore.jks"
                               type="JKS" storepass="changeit" peeralias="wssip"></sc:TrustStore>

                <!--sc:ValidatorConfiguration wspp:visibility="private" sc:maxClockSkew="1200000" sc:timestampFreshnessLimit="1200000"/-->
                <scc:SCClientConfiguration wspp:visibility="private">
                    <scc:LifeTime>36000</scc:LifeTime>
                </scc:SCClientConfiguration>

                <tc:PreconfiguredSTS xmlns:tc="http://schemas.sun.com/ws/2006/05/trust/client"
                                     endpoint="http://localhost:8080/pricequote/sts"
                                     wsdlLocation="http://localhost:8080/pricequote/sts?wsdl"
                                     serviceName="SecurityTokenServiceSun"
                                     portName="WSHttpBinding_ISecurityTokenService"
                                     namespace="http://tempuri.org/">
                </tc:PreconfiguredSTS>
                
                <!--tc:PreconfiguredSTS xmlns:tc="http://schemas.sun.com/ws/2006/05/trust/client"
                                     endpoint="http://131.107.72.15/Security_Federation_SecurityTokenService_Indigo/Symmetric.svc/Scenario_5_IssuedTokenForCertificate_MutualCertificate11"
                                     metadata="http://131.107.72.15/Security_Federation_SecurityTokenService_Indigo/Symmetric.svc"
                                     >
                </tc:PreconfiguredSTS-->
            </wsp:All>
        </wsp:ExactlyOne>
    </wsp:Policy>
    <!-- end :Keystore Info : latest method : referred from wsdl:service element -->

    <wsdl:message name="ISecurityTokenService_IssueToken_InputMessage">
        <wsdl:part name="rstMessage" element="q1:MessageBody" xmlns:q1="http://schemas.microsoft.com/Message"/>
    </wsdl:message>
    <wsdl:message name="ISecurityTokenService_IssueToken_OutputMessage">
        <wsdl:part name="IssueTokenResult" element="q2:MessageBody" xmlns:q2="http://schemas.microsoft.com/Message"/>
    </wsdl:message>
    <wsdl:portType msc:usingSession="false" name="ISecurityTokenService">
        <wsdl:operation name="IssueToken">
            <wsdl:input wsap10:Action="http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue"
                        message="tns:ISecurityTokenService_IssueToken_InputMessage"/>
            <wsdl:output wsap10:Action="http://schemas.xmlsoap.org/ws/2005/02/trust/RSTR/Issue"
                         message="tns:ISecurityTokenService_IssueToken_OutputMessage"/>
        </wsdl:operation>
    </wsdl:portType>

    <wsdl:binding name="CustomBinding_ISecurityTokenService" type="tns:ISecurityTokenService">
        <wsp:PolicyReference URI="#ClientKeystorePolicy"></wsp:PolicyReference>
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="IssueToken">
            <soap:operation soapAction="http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue" style="document"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>

    <wsdl:binding name="WSHttpBinding_ISecurityTokenService" type="tns:ISecurityTokenService">
        <wsp:PolicyReference URI="#ClientKeystorePolicy"></wsp:PolicyReference>
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="IssueToken">
            <soap:operation soapAction="http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue" style="document"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>

    <!--
    Sun STS
    -->
    <wsdl:service name="SecurityTokenServiceSun">
        <wsdl:port name="WSHttpBinding_ISecurityTokenService" binding="tns:WSHttpBinding_ISecurityTokenService">
            <soap:address location="http://localhost:8080/pricequote-wcf/sts"/>
        </wsdl:port>
    </wsdl:service>
    
     <!--
    Microsoft STS
    -->
    <wsdl:service name="SecurityTokenService">
        <wsdl:port name="CustomBinding_ISecurityTokenService" binding="tns:CustomBinding_ISecurityTokenService">
            <soap:address location="http://localhost:8080/pricequote/sts"/>
    </wsdl:port>
   </wsdl:service>

</wsdl:definitions>
