A complete WSDL document and detailed description of each label, detailed description of the wsdl document

Source: Internet
Author: User
Tags abstract definition

A complete WSDL document and detailed description of each label, detailed description of the wsdl document

<? Xml version = "1.0" encoding = "UTF8"?>

<Wsdl: definitions targetNamespace ="Http://www.57market.com.cn/HelloService"Xmlns: soapenc12 ="Http://www.w3.org/2003/05/soapencoding"Xmlns: tns ="Http://www.57market.com.cn/HelloService"Xmlns: wsdl ="Http://schemas.xmlsoap.org/wsdl/"Xmlns: xsd ="Http://www.w3.org/2001/XMLSchema"Xmlns: soap11 ="Http://schemas.xmlsoap.org/soap/envelope/"Xmlns: wsdlsoap ="Http://schemas.xmlsoap.org/wsdl/soap/"Xmlns: soapenc11 ="Http://schemas.xmlsoap.org/soap/encoding/"Xmlns: soap12 ="Http://www.w3.org/2003/05/soapenvelope">

 

/**

* The type element defines the data format of the exchanged information.

* To achieve maximum interoperability and neutral platform, XML Schema PES ypes is used for WSDL.

* XSD stands for the standard type system and uses it as the inherent type system.

* Below is the data definition section, which defines two elements: sayHello and sayHelloResponse:

* SayHello: defines a complex type that only contains a simple string and will be used to describe the input part of the operation parameter;

* SayHelloResponse: defines a complex type that only contains a simple string and will be used to describe the return value of the operation in the future;

*/

<Wsdl: types>

<Xsd: schema xmlns: xsd ="Http://www.w3.org/2001/XMLSchema"AttributeFormDefault ="Qualified"ElementFormDefault ="Qualified"TargetNamespace ="Http://www.57market.com.cn/HelloService">

<Xsd: element name ="SayHello">

<Xsd: complexType>

<Xsd: sequence>

 <Xsd: element maxOccurs ="1"MinOccurs ="1"Name ="In0"Nillable ="True"Type ="Xsd: string"/>

 </Xsd: sequence>

 </Xsd: complexType>

</Xsd: element>

 

<Xsd: element name ="SayHelloResponse">

<Xsd: complexType>

<Xsd: sequence>

 <Xsd: element maxOccurs ="1"MinOccurs ="1"Name ="Out"Nillable ="True"Type ="Xsd: string"/>

 </Xsd: sequence>

</Xsd: complexType>

</Xsd: element>

 

 </Xsd: schema>

 </Wsdl: types>

 

/**

* The message element specifies the XML data type to constitute each part of the message. The message element is used to define the input and output parameters of an operation.

* This part is an abstract definition of the Information Format: defines two messages: sayHelloResponse and sayHelloRequest:

* SayHelloRequest: The Request Message format for the sayHello operation. It consists of a message segment named parameters,

* Elements are the elements in the types we previously defined;

* SayHelloResponse: The Response Message format of the sayHello operation, which is composed of a message segment named parameters,

* Elements are the elements in the types defined previously;

* If RPC-style message transmission is used, you only need to change the element in the document to type.

* Message: used to define the message structure

* Part: Specify the parameter for referencing the specified parameter image in types.

*/

<Wsdl: message name ="SayHelloRequest">

 <Wsdl: part name ="Parameters"Element ="Tns: sayHello"/>

 </Wsdl: message>

 

<Wsdl: message name ="SayHelloResponse">

 <Wsdl: part name ="Parameters"Element ="Tns: sayHelloResponse"/>

 </Wsdl: message>

 

/**

* The portType element defines Web service operations. The operation defines XML messages that can appear in the input and output data streams.

* A set of abstract operations. Each operation is associated with one input message and one output message.

* PortType defines the type of the service call mode. Here, it contains an operation sayHello method, and both input and output indicate

* This operation is a request/response mode. The request message is the previously defined sayHelloRequest,

* The response message is the previously defined sayHelloResponse. Input indicates the load passed to the Web service,

* The output message indicates the server load that is passed to the customer.

* PortType: used to define the service end's SEI

* Operation: used to specify the handling REQUEST METHOD IN SEI

* Input: specify the number of bytes used by the client. The preceding <message>

* Output: specify the number of data records that the server returns to the client. The preceding <message>

*/

<Wsdl: portType name ="HelloServicePortType">

<Wsdl: operation name ="SayHello">

 <Wsdl: input name ="SayHelloRequest"Message ="Tns: sayHelloRequest"/>

 <Wsdl: output name ="SayHelloResponse"Message ="Tns: sayHelloResponse"/>

 </Wsdl: operation>

 </Wsdl: portType>

 

/**

* The binding element describes the protocol, data format, security, and other attributes of a specific service interface.

* Specify the actual protocol and data format specifications for the messages used in the operation and portType.

* Binding: the actual type used to define SEI

* Type adequacy: reference the preceding <portType>

* <Soap: operation>* Operation: used to define the implementation method

* <Soap: operation>* Input: specify the number of bytes that should be used by the client.

* <Soap: body use = "literal"/>: Text Data

* Output: specify the number of data records returned by the server to the client.

* <Soap: body use = "literal"/>: Text Data

*/

<Wsdl: binding name ="HelloServiceHttpBinding"Type ="Tns: HelloServicePortType">

 

 <Wsdlsoap: binding> <wsdl: operation name ="SayHello">

 <Wsdlsoap: operation soapAction = ""/>

<Wsdl: input name ="SayHelloRequest">

 <Wsdlsoap: body use ="Literal"/>

 </Wsdl: input>

<Wsdl: output name ="SayHelloResponse">

 <Wsdlsoap: body use ="Literal"/>

 </Wsdl: output>

 </Wsdl: operation>

 

</Wsdl: binding>

 

 

/**

* Service element. A service element contains a set of port elements. The port associates the endpoint with the binding element defined by the service interface.

* Port specifies a bound address to define a communication terminal.

* Service: a webservice container

* Name: Attention: it is used to specify the portal for processing a server (that is, the SEI)

* Binding atomicity: reference the <binding>

* Address: the request address of the current webservice

*/

<Wsdl: service name ="HelloService">

<Wsdl: port name ="HelloServiceHttpPort"Binding ="Tns: HelloServiceHttpBinding">

<Soap: address location ="Http: // localhost: 8080/xfire/services/HelloService"/>

 </Wsdl: port>

 </Wsdl: service>

 

</Wsdl: 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.