<?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" >
<!--* Type element, which defines the data format for exchanging information.
* To achieve maximum interoperability (interoperability) and platform neutrality (neutrality), WSDL uses the XML SCHEMA datatypes * abbreviation XSD as the standard type system and as an intrinsic type system. * Here is the data definition section, which defines two elements, one is SayHello, the other is sayhelloresponse: * SayHello: Defines a complex type that contains only a simple string that will be used to describe the incoming part of the operation in the future; Sayhelloresponse: Defines a complex type that contains only a simple string that will be used in future to describe the return value of the operation;--> <wsdl:types> <xsd:schema xmlns:xsd= "htt P://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&
Gt <xsd:element maxoccurs= "1" minoccurs= "1" name= "Out" nillable= "true" type= "xsd:string"/> </xs d:sequence> </xsd:complexType> </xsd:element> </xsd:schema> & lt;/wsdl:types> <!--* Message element specifies that the XML data type forms the parts of the messages.
The message element is used to define the input and output parameters of an operation. * This section is an abstract definition of the information format: Two messages are defined SayhelloreSponse and Sayhellorequest: * The request message format of the Sayhellorequest:sayhello operation, consisting of a message fragment, the name is parameters, and the element is the element in the types we defined earlier; The response message format for the Sayhelloresponse:sayhello operation, consisting of a message fragment with the name parameters, * element is the element in the types that we defined earlier; * If RPC-style message delivery is used,
You only need to modify the element elements in the document to type. * Message: Structure used to define messages * Part: Specifies reference to the label section defined in types--> <wsdl:message name= "Sayhellorequest" > <wsdl:par T name= "parameters" element= "Tns:sayhello"/> </wsdl:message> <wsdl:message name= "Sayhelloresponse"
; <wsdl:part name= "Parameters" element= "Tns:sayhelloresponse"/> </wsdl:message> <!--* PortType element defines W EB service operation.
The operation defines an XML message that can appear in the input and output data stream. * A collection of abstract operations.
Each operation associates an input message with an output message. * PortType defines the type of invocation pattern for the service, which contains an operation SayHello method, with input and output indicating that * The operation is a request/response pattern, the request message is the previously defined sayhellorequest, * The response message is the Sayhelloresponse defined earlier.
Input represents a payload that is delivered to a Web service, * Output: A message represents a payload that is delivered to a customer. * PortType: Use to define the service-side SEI * Operation: A method to specify the processing in the SEI * Input: Specifies the data that is passed by the client application and references the above defined <message> * output: Specify service-side return to guestThe user's data, which references the above defined <message>--> <wsdl:porttype name= "Helloserviceporttype" > <wsdl:operation n Ame= "SayHello" > <wsdl:input name= "sayhellorequest" message= "Tns:sayhellorequest"/> <w Sdl:output name= "Sayhelloresponse" message= "Tns:sayhelloresponse"/> </wsdl:operation> </wsdl:port
type> <!--* Binding element describes the protocol, data format, security, and other attributes of a particular service interface.
* Specify the actual protocol and data format specifications for the messages used in operations and porttype.
* Binding: The Implementation class * Type attribute used to define SEI: reference above <portType> * <soap:operation style= "document"/> binding data is a document (XML) * Operation: To define the implementation of the method * <soap:operation style= "document"/> Transmission is document (XML) * Input: Specify the client application pass data * <soap:bo Dy use= "literal"/>: Text data * Output: Specify server-side return client data * <soap:body use= "literal"/>: Text data--> <wsdl:binding Name= "helloservicehttpbinding" type= "Tns:helloserviceporttype" > <wsdlsoap:binding style= "Document" Transpor
t= "Http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name= "SayHello" > <wsdlsoap:operation soapaction= ""/> <wsdl:inp
UT name= "sayhellorequest" > <wsdlsoap:body use= "literal"/> </wsdl:input> <wsdl:output name= "Sayhelloresponse" > <wsdlsoap:body use= "literal"/> </w Sdl:output> </wsdl:operation> </wsdl:binding> <!--* Service elements. The service element contains a set of port elements.
The Port associates the endpoint with the binding element that is defined by the service interface.
* Port Specifies a binding address so that a communication terminal is defined. * Service: A WebService Container * Name: attribute: It is used to specify the portal of a server-side processing request (that is, the implementation of the SEI) * Binding attribute: Refer to the <binding> * address defined above: The current WebService request address--> <wsdl:service name= "HelloService" > <wsdl:port name= "helloservicehttpport" b inding= "tns:helloservicehttpbinding" > <soap:address location= "Http://localhost:8080/xfire/services/Hello Service "/> </wsdl:port> </wsdl:service> </wsdl:definitions>