<?xml version="1.0" ?>
<!--

    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

-->

<definitions

    xmlns:wsaw = "http://www.w3.org/2006/05/addressing/wsdl"
    xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
    xmlns:soap = "http://schemas.xmlsoap.org/wsdl/soap12/"
    xmlns:tns = "http://rm.demo/"
    xmlns:xsd = "http://www.w3.org/2001/XMLSchema"
    xmlns = "http://schemas.xmlsoap.org/wsdl/"
    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:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm/policy"
    targetNamespace = "http://rm.demo/"
    name = "RMDemoService">

    

     <wsp:Policy wsu:Id="RM_policy">
        <wsp:ExactlyOne>
            <wsp:All>
                <wsrm:RMAssertion>
                </wsrm:RMAssertion>
                <wsaw:UsingAddressing/>
            </wsp:All>
        </wsp:ExactlyOne>
    </wsp:Policy>


    <types>
        <xsd:schema>
            <xsd:import namespace = "http://rm.demo/" schemaLocation = "RMDemo.xsd"></xsd:import>
        </xsd:schema>
    </types>

    <message name = "getResult">
        <part name = "parameters" element = "tns:getResult"></part>
    </message>

    <message name = "getResultResponse">
        <part name = "parameters" element = "tns:getResultResponse"></part>
    </message>

    <message name = "addString">
        <part name = "parameters" element = "tns:addString"></part>
    </message>

    <message name = "addStringResponse">
        <part name = "parameters" element = "tns:addStringResponse"></part>
    </message>

    <portType name = "RMDemo">
        <operation name = "getResult">
            <input message = "tns:getResult" wsaw:Action="urn:wsrm:getResult"></input>
            <output message = "tns:getResultResponse" wsaw:Action="urn:wsrm:getResultResponse"></output>
        </operation>
        <operation name = "addString">
            <input message = "tns:addString" wsaw:Action="urn:wsrm:addString"></input>
            <output message = "tns:addStringResponse" wsaw:Action="urn:wsrm:addStringResponse"></output>
        </operation>
    </portType>

    <binding name = "RMDemoPortBinding" type = "tns:RMDemo">
        <wsp:PolicyReference URI="#RM_policy"/>
        <wsaw:UsingAddressing></wsaw:UsingAddressing>
        <soap:binding transport = "http://schemas.xmlsoap.org/soap/http" style = "document"></soap:binding>
        <operation name = "getResult">
            <soap:operation></soap:operation>
            <input>
                <soap:body use = "literal"></soap:body>
            </input>
            <output>
                <soap:body use = "literal"></soap:body>
            </output>
        </operation>
        <operation name = "addString">
            <soap:operation></soap:operation>
            <input>
                <soap:body use = "literal"></soap:body>
            </input>
            <output>
                <soap:body use = "literal"></soap:body>
            </output>
        </operation>
    </binding>

    <service name = "RMDemoService">
        <port name = "RMDemoPort" binding = "tns:RMDemoPortBinding">
            <soap:address location = "http://localhost:8080/rmdemo"></soap:address>
        </port>
    </service>

</definitions>

