<?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

-->

<wsdl:definitions targetNamespace="http://tempuri.org/" 
                  xmlns:tns="http://tempuri.org/" 
                  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:wsap="http://www.w3.org/2006/05/addressing/wsdl" 
                  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
                  xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" 
                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap12/">
    
    <wsp:Policy wsu:Id="PingClientPolicy"
      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 wspp:visibility="private" location="$WSIT_HOME/xws-security/etc/client-keystore.jks" type="JKS" alias="alice" storepass="changeit"></sc:KeyStore>
                <sc:TrustStore wspp:visibility="private" location="$WSIT_HOME/xws-security/etc/client-truststore.jks" type="JKS" storepass="changeit" peeralias="bob"></sc:TrustStore>
                 <sc:CallbackHandlerConfiguration wspp:visibility="private">
                    <sc:CallbackHandler name="samlHandler" classname="common.SamlCallbackHandler"/>
                </sc:CallbackHandlerConfiguration>
            </wsp:All>
        </wsp:ExactlyOne>
    </wsp:Policy>

   <wsdl:message name="PingRequest">
       <wsdl:part name="Ping" element="q:Ping" xmlns:q="http://xmlsoap.org/Ping"/>
   </wsdl:message>
   <wsdl:message name="PingResponse">
       <wsdl:part name="PingResponse" element="q:PingResponse" xmlns:q="http://xmlsoap.org/Ping"/>
   </wsdl:message>
  
    <wsdl:portType name="IPingService">
            <wsdl:operation name="Ping">
                <wsdl:input wsap:Action="http://xmlsoap.org/Ping" name="PingRequest" message="tns:PingRequest"/>
                <wsdl:output wsap:Action="http://xmlsoap.org/Ping" name="PingResponse" message="tns:PingResponse"/>
            </wsdl:operation>
    </wsdl:portType>

    <wsdl:binding name="PingBinding" type="tns:IPingService">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsp:PolicyReference URI="#PingClientPolicy"></wsp:PolicyReference>
        <wsdl:operation name="Ping">
            <soap:operation soapAction="http://xmlsoap.org/Ping" style="document"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>     

    <wsdl:service name="PingService">
        <wsdl:port name="CustomBinding_IPingService" binding="tns:PingBinding">
            <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
        </wsdl:port>
    </wsdl:service> 
</wsdl:definitions>


