Sample WSDL File for Testing

Spread the love

WSDL File stands for Web Service Description Language which is based on the XML. For describing the functionality of a SOAP-based web service this language is used. SoapUI also uses sample WSDL file to test the request. Various SOAP messages are also defined by WSDL files.

Key features of WSDL:

Usually, to provide web services over the internet, WSDL is used with the combination of XML Schema and SOAP. The Sample WDSL file there contains the methods (which are exposed by web service) and the location of the web service. All the necessary information’s are available in this file but it looks complex to any user.

There are mainly 5 main elements of WSDL

  1. Type tag
  2. Message tag
  3. Prototype tag        
  4. Binding tag
  5. Service tag
Sample WSDL file

It can be compared to a postcard which contains the particular location address. Similarly, the WSDL file is having an address of web service.Also this web service delivers all the functionality that the client seeks for. 

Below there are varios types of sample WSDL file example uploaded there just go through it and use it. You can also download wsdl file for demo use  

<types>
 <schema targetNamespace = "http://example.com/stockquote.xsd"
    xmlns = "http://www.w3.org/2000/10/XMLSchema">
    <element name = "TradePriceRequest">
       <complexType>
          <all>
             <element name = "tickerSymbol" type = "string"/>
          </all>
       </complexType>
      </element>

    <element name = "TradePrice">
       <complexType>
          <all>
             <element name = "price" type = "float"/>
          </all>
       </complexType>
    </element>
 </schema>
</types>

 

Message element in WSDL File – The information being transferred between web service providers and customers is described in the <message> element. Below we uploded some samples of wsdl message element file. 

<message name = "SayHelloRequest">
 <part name = "firstName" type = "xsd:string"/>
</message>


<message name = "SayHelloResponse">
 <part name = "greeting" type = "xsd:string"/>
</message>

Prototype tag in WSDL File – Multiple message components are combined into a one-way or round-trip operation by the portType> element.

One request and one response message, for instance, can be combined into a single request/response operation using a portType>. The majority of the time, SOAP services use this. Multiple operations may be defined by a portType.

<portType name = "HeyPortType">
 <operation name = "sayHey">
    <input message = "tns:SayHeyRequest"/>
    <output message = "tns:SayHeyResponse"/>
 </operation>
</portType>