Three methods for generating a WSDL File

Source: Internet
Author: User
Tags wsdl example

There are three methods to generate WSDL in. Net:

1. Add the wdsl requirement after the URL of the Web Service, as follows:

Http: // localhost/webexamples/simpleservice. asmx? WSDL

2.use disco.exe. Write the following command in the command line:

Disco http: // localhost/webexamples/simpleservice. asmx

3. Use the class provided in the namespace system. Web. Services. Description

The root element of each WSDL file is <definitions>, which must provide a complete description of the service. First, declarations of various namespaces must be provided in the <definitions> element.

The <definitions> element contains one or more <porttype> elements, each of which is a series of operations. You can think of a single porttype element as a logical grouping of classes composed of various methods. Each types should be called a service, so the entire WSDL file will become a service set.

There can be several methods or operation in each service. WSDL references them through the <operation> element.

The following is a simple WSDL example.

<? XML version = "1.0" encoding = "UTF-8"?>
<Definitions name = "mobilephoneservice"
Targetnamespace = "www.mobilephoneservice.com/mobilephoneservice-interface"
Xmlns = "http://schemas.xmlsoap.org/wsdl"
Xmlns: Soap = "http://schemas.xmlsoap.org/wsdl/soap"
Xmlns: TNS = "http://www.mobilephoneservice.com/MobilePhoneService"
Xmlns: XSD = "http://www.w3.org/1999/XMLSchema">

<Porttype name = "mobilephoneservice_port">
<Operation name = "getlistofmodels">
.......
.......
</Operation>

<Operation name = "getprice">
.......
.......
</Operation>
</Porttype>
</Definitions>

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.