<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions name="SOAPBuilders-mtom-cr-test" 
    xmlns="http://soapinterop.org/mtom-cr-test" 
    xmlns:types="http://example.org/mtom/data" 
    xmlns:types2="http://example.org/rrshb/test" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" 
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
    xmlns:tns="http://soapinterop.org/mtom-cr-test"
    targetNamespace="http://soapinterop.org/mtom-test">

	<wsdl:types>

		<schema 
			xmlns="http://www.w3.org/2001/XMLSchema" 
			targetNamespace="http://example.org/mtom/data" 
                        xmlns:xmime="http://www.w3.org/2004/06/xmlmime"
			elementFormDefault="qualified">

                <import namespace="http://www.w3.org/2004/06/xmlmime"/>
		
		<complexType name="DataType">
			<simpleContent>
				<extension base="xsd:base64Binary">
					<attribute ref="xmime:contentType"/>
				</extension>
			</simpleContent>
		</complexType >
		<element name="Data" type="types:DataType"/>
	
		<complexType name="WrapperType">
			<sequence>
				<element name="Data" type="types:DataType" minOccurs="0" maxOccurs="unbounded"/>
			</sequence>
		</complexType>		
		<element name="Wrapper" type="types:WrapperType"/>

		</schema>

		<schema 
			xmlns="http://www.w3.org/2001/XMLSchema" 
			targetNamespace="http://example.org/rrshb/test" 
                        xmlns:xmime="http://www.w3.org/2004/06/xmlmime"
			elementFormDefault="qualified">

                <import namespace="http://www.w3.org/2004/06/xmlmime"/>
		
		<complexType name="DataType">
			<simpleContent>
				<extension base="xsd:base64Binary">
					<attribute ref="xmime:contentType"/>
				</extension>
			</simpleContent>
		</complexType >
		<element name="Data" type="types2:DataType"/>
	
		<complexType name="WrapperType">
			<sequence>
				<element name="Data" type="types2:DataType" minOccurs="0" maxOccurs="unbounded"/>
			</sequence>
                        <attribute name="resource" type="xsd:anyURI" use="required" />
		</complexType>		
		<element name="ResourceRepresentation" type="types2:WrapperType"/>

		<complexType name="RequestType">
                        <attribute name="resource" type="xsd:anyURI" use="required" />
		</complexType>		
		<element name="GetResourceRepresentation" type="types2:RequestType"/>

		</schema>

	</wsdl:types>
	
	<wsdl:message name="EchoTestSingleIn">
		<wsdl:part name="In" element="types:Data"/>
	</wsdl:message>
	<wsdl:message name="EchoTestSingleOut">
		<wsdl:part name="Out" element="types:Data"/>
	</wsdl:message>
	<wsdl:message name="EchoTestMultipleIn">
		<wsdl:part name="In" element="types:Wrapper"/>
	</wsdl:message>
	<wsdl:message name="EchoTestMultipleOut">
		<wsdl:part name="Out" element="types:Wrapper"/>
	</wsdl:message>
	<wsdl:message name="RepHeaderTestIn">
		<wsdl:part name="In" element="types2:GetResourceRepresentation"/>
	</wsdl:message>
	<wsdl:message name="RepHeaderTestOut">
		<wsdl:part name="Out" element="types2:ResourceRepresentation"/>
	</wsdl:message>
	
	<wsdl:portType name="EchoTestPortType">
		<wsdl:operation name="EchoTestSingle">
			<wsdl:input name="EchoTestSingleInput" message="tns:EchoTestSingleIn"/>
			<wsdl:output name="EchoTestSingleOutput" message="tns:EchoTestSingleOut"/>
		</wsdl:operation>
		<wsdl:operation name="EchoTestMultiple">
			<wsdl:input name="EchoTestMultipleInput" message="tns:EchoTestMultipleIn"/>
			<wsdl:output name="EchoTestMultipleOutput" message="tns:EchoTestMultipleOut"/>
		</wsdl:operation>
		<wsdl:operation name="RepHeaderTest">
			<wsdl:input name="RepHeaderTestInput" message="tns:RepHeaderTestIn"/>
			<wsdl:output name="RepHeaderTestOutput" message="tns:RepHeaderTestOut"/>
		</wsdl:operation>
	</wsdl:portType>

	<wsdl:portType name="EchoTestInterPortType">
		<wsdl:operation name="RepHeaderTest">
			<wsdl:input name="RepHeaderTestInput" message="tns:RepHeaderTestIn"/>
			<wsdl:output name="RepHeaderTestOutput" message="tns:RepHeaderTestOut"/>
		</wsdl:operation>
	</wsdl:portType>

	<wsdl:binding name="EchoTestBinding" type="tns:EchoTestPortType">
		<soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
		<wsdl:operation name="EchoTestSingle">
			<soap12:operation soapAction=""/>
			<wsdl:input name="EchoTestSingleInput">
				<soap12:body use="literal"/>
			</wsdl:input>
			<wsdl:output name="EchoTestSingleOutput">
				<soap12:body use="literal"/>
			</wsdl:output>
		</wsdl:operation>
		<wsdl:operation name="EchoTestMultiple">
			<soap12:operation soapAction=""/>
			<wsdl:input name="EchoTestMultipleInput">
				<soap12:body use="literal"/>
			</wsdl:input>
			<wsdl:output name="EchoTestMultipleOutput">
				<soap12:body use="literal"/>
			</wsdl:output>
		</wsdl:operation>
		<wsdl:operation name="RepHeaderTest">
			<soap12:operation soapAction=""/>
			<wsdl:input name="RepHeaderTestInput">
				<soap12:body use="literal"/>
			</wsdl:input>
			<wsdl:output name="RepHeaderTestOutput">
				<soap12:body use="literal"/>
			</wsdl:output>
		</wsdl:operation>
	</wsdl:binding>

	<wsdl:binding name="EchoTestInterBinding" type="tns:EchoTestInterPortType">
		<soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
		<wsdl:operation name="RepHeaderTest">
			<soap12:operation soapAction=""/>
			<wsdl:input name="RepHeaderTestInput">
				<soap12:body use="literal"/>
			</wsdl:input>
			<wsdl:output name="RepHeaderTestOutput">
				<soap12:body use="literal"/>
			</wsdl:output>
		</wsdl:operation>
	</wsdl:binding>

	<wsdl:service name="EchoTestSvc">
  		<wsdl:port name="EchoTestPort" binding="tns:EchoTestBinding">
    			<soap12:address location="http://www.whitemesa.net/mtom-test-cr"/>
  		</wsdl:port>
	</wsdl:service>

	<wsdl:service name="EchoTestInterSvc">
  		<wsdl:port name="EchoTestInterPort" binding="tns:EchoTestInterBinding">
    			<soap12:address location="http://www.whitemesa.net/mtom-test-cr-inter"/>
  		</wsdl:port>
	</wsdl:service>

</wsdl:definitions>	