We are creating below a sample xsd and wsdl file which we will use in further posts to create a proxy service (exposed as SOAP) and in turn a service bus project:-
demo.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://schemas.mydemo.co.in/schema" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.mydemo.co.in/schema" elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xsd:element name="rootMessage">
<xsd:complexType>
<xsd:sequence>
<xsd:choice>
<xsd:element name="rqData">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="curr" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="rsData">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="CurrencyConverted" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="fromCurrency" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="fromCurrencyValue" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="toCurrency" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="toCurrencyValue" type="xsd:string" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="curr" type="currType"/>
<xsd:complexType name="currType">
<xsd:sequence>
<xsd:element name="fromCurrCode" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="toCurrCode" type="xsd:string" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="esbFault">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="code" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="messages" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
demo.wsdl
<?xml version= '1.0' encoding= 'UTF-8' ?>
<definitions name="demoPS" targetNamespace="http://services.mydemo.co.in/ps/demo"
xmlns:ps="http://services.mydemo.co.in/ps/demo" xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:mySchema="http://schemas.mydemo.co.in/schema">
<types>
<xsd:schema>
<xsd:import namespace="http://schemas.mydemo.co.in/schema" schemaLocation="demo.xsd"/>
</xsd:schema>
</types>
<message name="CommonesbFaultMessage">
<part name="fault_CommonesbFault" element="mySchema:esbFault"/>
</message>
<message name="getDemoRqMsg">
<part name="payload" element="mySchema:rootMessage"/>
</message>
<message name="getDemoRsMsg">
<part name="payload" element="mySchema:rootMessage"/>
</message>
<portType name="demoPSPort">
<operation name="getDemo">
<input message="ps:getDemoRqMsg"/>
<output message="ps:getDemoRsMsg"/>
<fault name="CommonesbFault" message="ps:CommonesbFaultMessage"/>
</operation>
</portType>
<binding name="demoPSPortBinding" type="ps:demoPSPort">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="getDemo">
<soap12:operation soapAction="getDemo"/>
<input>
<soap12:body use="literal"/>
</input>
<output>
<soap12:body use="literal"/>
</output>
</operation>
</binding>
<service name="demoPS">
<port name="demoPSPort" binding="ps:demoPSPortBinding">
<soap12:address location=""/>
</port>
</service>
</definitions>
demo.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://schemas.mydemo.co.in/schema" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.mydemo.co.in/schema" elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xsd:element name="rootMessage">
<xsd:complexType>
<xsd:sequence>
<xsd:choice>
<xsd:element name="rqData">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="curr" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="rsData">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="CurrencyConverted" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="fromCurrency" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="fromCurrencyValue" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="toCurrency" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="toCurrencyValue" type="xsd:string" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="curr" type="currType"/>
<xsd:complexType name="currType">
<xsd:sequence>
<xsd:element name="fromCurrCode" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="toCurrCode" type="xsd:string" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="esbFault">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="code" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="messages" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
demo.wsdl
<?xml version= '1.0' encoding= 'UTF-8' ?>
<definitions name="demoPS" targetNamespace="http://services.mydemo.co.in/ps/demo"
xmlns:ps="http://services.mydemo.co.in/ps/demo" xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:mySchema="http://schemas.mydemo.co.in/schema">
<types>
<xsd:schema>
<xsd:import namespace="http://schemas.mydemo.co.in/schema" schemaLocation="demo.xsd"/>
</xsd:schema>
</types>
<message name="CommonesbFaultMessage">
<part name="fault_CommonesbFault" element="mySchema:esbFault"/>
</message>
<message name="getDemoRqMsg">
<part name="payload" element="mySchema:rootMessage"/>
</message>
<message name="getDemoRsMsg">
<part name="payload" element="mySchema:rootMessage"/>
</message>
<portType name="demoPSPort">
<operation name="getDemo">
<input message="ps:getDemoRqMsg"/>
<output message="ps:getDemoRsMsg"/>
<fault name="CommonesbFault" message="ps:CommonesbFaultMessage"/>
</operation>
</portType>
<binding name="demoPSPortBinding" type="ps:demoPSPort">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="getDemo">
<soap12:operation soapAction="getDemo"/>
<input>
<soap12:body use="literal"/>
</input>
<output>
<soap12:body use="literal"/>
</output>
</operation>
</binding>
<service name="demoPS">
<port name="demoPSPort" binding="ps:demoPSPortBinding">
<soap12:address location=""/>
</port>
</service>
</definitions>