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

    Copyright (c) 2012, 2019 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 name="SOAPBuilders-mime-cr-test"
    xmlns:types="http://example.org/mime/data"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
    xmlns:tns="http://example.org/mime"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    targetNamespace="http://example.org/mime">

	<wsdl:types>
		<schema 
			xmlns="http://www.w3.org/2001/XMLSchema" 
			targetNamespace="http://example.org/mime/data"
            xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
			elementFormDefault="qualified"
            xmlns:ref="http://ws-i.org/profiles/basic/1.1/xsd">
        <import namespace="http://ws-i.org/profiles/basic/1.1/xsd" schemaLocation="http://ws-i.org/profiles/basic/1.1/swaref.xsd"/>
        <complexType name="DetailType">
            <sequence>
                <element name="name" type="string"/>
                <element name="address" type="string"/>
            </sequence>
        </complexType>

        <complexType name="claimFormTypeRequest">
            <sequence>
                <element name="total" type="xsd:int"/>
                <element name="request" type="ref:swaRef"/>
            </sequence>
        </complexType>

        <complexType name="claimFormTypeResponse">
            <sequence>
                <element name="total" type="xsd:int"/>
                <element name="response" type="ref:swaRef"/>
            </sequence>
        </complexType>

        <element name="claimFormRequest"  type="types:claimFormTypeRequest"/>

        <element name="claimFormResponse" type="types:claimFormTypeResponse"/>
		<element name="Detail" type="types:DetailType"/>
		<element name="DetailResponse" type="types:DetailType"/>
        <element name="body" type="string"/>
        <element name="mimeBody" type="string"/>
		</schema>

	</wsdl:types>

     <wsdl:message name="claimFormIn">
        <wsdl:part name="data" element="types:claimFormRequest"/>
    </wsdl:message>

    <wsdl:message name="claimFormOut">
        <wsdl:part name="data" element="types:claimFormResponse"/>
    </wsdl:message>

	<wsdl:portType name="Hello">

        <!-- swaref test -->
        <wsdl:operation name="claimForm">
			<wsdl:input message="tns:claimFormIn"/>
			<wsdl:output message="tns:claimFormOut"/>
		</wsdl:operation>

	</wsdl:portType>

	<wsdl:binding name="HelloBinding" type="tns:Hello">
		<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>


        <wsdl:operation name="claimForm">
            <soap:operation soapAction=""/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>

	</wsdl:binding>

	<wsdl:service name="HelloService">
  		<wsdl:port name="HelloPort" binding="tns:HelloBinding">
    			<soap:address location="http://example/mime-test-cr"/>
  		</wsdl:port>
	</wsdl:service>

</wsdl:definitions>	
