Thursday, 22 October 2015

WSDL format for rpc style

XSD content :-

  <!-- This is only definition -->
    <complexType name="AllConsultants">
    <sequence>
    <element name="consultant" type="tns:Consultant" minOccurs="0" maxOccurs="unbounded">
    <annotation>
<documentation>Consultant recored can be zero or more than zero</documentation>
</annotation>
</element>
    </sequence>
    </complexType>
   

    <!-- Defining complex element -->
<complexType name="Consultant">
<sequence>
            <element name="name" type="string" maxOccurs="1" minOccurs="1"/>
             <element name="email" type="string" maxOccurs="2" minOccurs="1"/>
    <element name="mobile" type="tns:Mobile" maxOccurs="1" minOccurs="1"/>
    <element name="age" type="int" maxOccurs="1" minOccurs="1"/>
     <element name="address" type="string" maxOccurs="1" minOccurs="0"/>
     <element name="gender" type="tns:Gender" maxOccurs="1" minOccurs="0"/>
    <element name="designation" type="string" maxOccurs="1" minOccurs="1"  default="software engineer"/>
     <element name="photo" type="base64Binary" maxOccurs="1" minOccurs="0"/>
</sequence>
<attribute name="eid" type="string" use="optional"/>
</complexType>


WSDL (employee-consultants.wsdl)

<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://www.consultants.com/it" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="synergisticit-consultants"
targetNamespace="http://www.consultants.com/it">
<wsdl:types>
<xsd:schema>
<xsd:import namespace="http://www.consultants.com/it"
schemaLocation="consultants.xsd" />
</xsd:schema>
</wsdl:types>
<!-- consultantRequest pconsultant; -->
<wsdl:message name="wconsultantRequest">
<wsdl:part name="pconsultant" type="tns:Consultant" />
</wsdl:message>
<wsdl:message name="wconsultantResponse">
<wsdl:part name="presponse" type="xsd:string" />
</wsdl:message>

<wsdl:message name="wvoidRequest">
<wsdl:part name="voidInput" type="tns:voidInput" />
</wsdl:message>

<wsdl:message name="wallConsultantsResponse">
<wsdl:part name="presponse" type="tns:AllConsultants" />
</wsdl:message>







No comments:

Post a Comment