<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements. See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership. The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations
 * under the License.
-->
<definitions name="multipart.idl" 
    targetNamespace="http://schemas.apache.org/idl/multipart.idl" 
    xmlns="http://schemas.xmlsoap.org/wsdl/" 
    xmlns:corba="http://cxf.apache.org/bindings/corba" 
    xmlns:corbatm="http://cxf.apache.org/bindings/corba/typemap" 
    xmlns:ns1="http://schemas.apache.org/idl/multipart.idl/corba/typemap/" 
    xmlns:tns="http://schemas.apache.org/idl/multipart.idl" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:xsd1="http://schemas.apache.org/idltypes/multipart.idl">
    <corba:typeMapping 
        targetNamespace="http://schemas.apache.org/idl/multipart.idl/corba/typemap/">
        <corba:enum name="Test.MultiPart.Colour" 
            repositoryID="IDL:Test/MultiPart/Colour:1.0" 
            type="xsd1:Test.MultiPart.Colour">
            <corba:enumerator value="RED"/>
            <corba:enumerator value="GREEN"/>
            <corba:enumerator value="BLUE"/>
        </corba:enum>
        <corba:union discriminator="ns1:Test.MultiPart.Colour" 
            name="Test.MultiPart.Description" 
            repositoryID="IDL:Test/MultiPart/Description:1.0" 
            type="xsd1:Test.MultiPart.Description">
            <corba:unionbranch idltype="corba:string" name="x">
                <corba:case label="RED"/>
            </corba:unionbranch>
            <corba:unionbranch idltype="corba:long" name="y">
                <corba:case label="GREEN"/>
            </corba:unionbranch>
            <corba:unionbranch idltype="corba:short" name="z">
                <corba:case label="BLUE"/>
            </corba:unionbranch>
        </corba:union>
    </corba:typeMapping>
    <types>
        <schema targetNamespace="http://schemas.apache.org/idltypes/multipart.idl" 
            xmlns="http://www.w3.org/2001/XMLSchema" 
            xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
            <simpleType name="Test.MultiPart.Colour">
                <restriction base="string">
                    <enumeration value="RED"/>
                    <enumeration value="GREEN"/>
                    <enumeration value="BLUE"/>
                </restriction>
            </simpleType>
            <complexType name="Test.MultiPart.Description">
                <sequence>
                    <element maxOccurs="1" minOccurs="1" name="discriminator" 
                        type="xsd1:Test.MultiPart.Colour"/>
                    <choice>
                        <element name="x" type="string"/>
                        <element name="y" type="int"/>
                        <element name="z" type="short"/>
                    </choice>
                </sequence>
            </complexType>
            <element name="Test.MultiPart.test_enum.x" type="xsd1:Test.MultiPart.Colour"/>
            <element name="Test.MultiPart.test_enum.y" type="xsd1:Test.MultiPart.Colour"/>
            <element name="Test.MultiPart.test_enum.z" type="xsd1:Test.MultiPart.Colour"/>
            <element name="Test.MultiPart.test_enum.return" 
                type="xsd1:Test.MultiPart.Colour"/>
            <element name="Test.MultiPart.test_union.x" 
                type="xsd1:Test.MultiPart.Description"/>
            <element name="Test.MultiPart.test_union.y" 
                type="xsd1:Test.MultiPart.Description"/>
            <element name="Test.MultiPart.test_union.z" 
                type="xsd1:Test.MultiPart.Description"/>
            <element name="Test.MultiPart.test_union.return" 
                type="xsd1:Test.MultiPart.Description"/>
        </schema>
    </types>
    <message name="Test.MultiPart.test_union">
        <part element="xsd1:Test.MultiPart.test_union.x" name="x"/>
        <part element="xsd1:Test.MultiPart.test_union.y" name="y"/>
    </message>
    <message name="Test.MultiPart.test_unionResponse">
        <part element="xsd1:Test.MultiPart.test_union.return" name="return"/>
        <part element="xsd1:Test.MultiPart.test_union.y" name="y"/>
        <part element="xsd1:Test.MultiPart.test_union.z" name="z"/>
    </message>
    <portType name="Test.MultiPart">
        <operation name="test_union">
            <input message="tns:Test.MultiPart.test_union" name="test_union"/>
            <output message="tns:Test.MultiPart.test_unionResponse" 
                name="test_unionResponse"/>
        </operation>
    </portType>
    <binding name="Test.MultiPartCORBABinding" type="tns:Test.MultiPart">
        <corba:binding repositoryID="IDL:Test/MultiPart:1.0"/>
        <operation name="test_union">
            <corba:operation name="test_union">
                <corba:param idltype="ns1:Test.MultiPart.Description" mode="in" name="x"/>
                <corba:param idltype="ns1:Test.MultiPart.Description" mode="inout" 
                    name="y"/>
                <corba:param idltype="ns1:Test.MultiPart.Description" mode="out" name="z"/>
                <corba:return idltype="ns1:Test.MultiPart.Description" name="return"/>
            </corba:operation>
            <input name="test_union"/>
            <output name="test_unionResponse"/>
        </operation>
    </binding>    
</definitions>
