Three elements of WebService

Source: Internet
Author: User
Tags soap wsdl

WebService (jax-ws) Three-element SOAP: Based on the HTTP protocol, in XML format, used to convey the format of information. WSDL: Used to describe how to access a specific service. (equivalent to Manual) UDDI: Users can build UDDI servers by their own UDDI standards for management, distribution, and query webservice. Other users can register themselves to publish WebService calls. (now basically obsolete)1. The SOAP (communication protocol) Simple object Accrss Protocol, which is a simple protocol for exchanging information in a decentralized or distributed environment, is an XML-based protocol that consists of four parts: (1In soap Encapsulation (envelop), the wrapper defines a framework that describes what the content in the message is, who sent it, who should accept and process it, and how to handle it;2A SOAP encoding rule that represents an instance of the data type that the application needs to use. (2SOAP RPC represents a contract for remote procedure calls and replies. (4) Soap binding (binding) to exchange information using the underlying protocol. (1) The requested protocol body post/weather http/1.1Accept:text/xml, multipart/relatedcontent-type:text/xml; Charset=utf-8SOAPAction:"Http://weather.itheima.com/WeatherInterface/getWeatherByCityNameRequest"User-agent:jax-ws RI 2.2.4-B01host:127.0.0.1:54321Connection:keep-alivecontent-length:235<?xml version= "1.0"? ><s:envelope xmlns:s= "http://schemas.xmlsoap.org/soap/envelope/" > < s:body> <ns2:getweatherbycityname xmlns:ns2= "http://weather.itheima.com" > <cityna Me> Beijing </cityName> </ns2:getWeatherByCityName> </S:Body></S:Envelope> (2) The protocol body of the response HTTP/1.1 200Oktransfer-encoding:chunkedcontent-type:text/xml; Charset=utf-8Date:fri,OCT 2015 07:23:29GMT<?xml version= "1.0"? ><s:envelope xmlns:s= "http://schemas.xmlsoap.org/soap/envelope/" > <S:Body>                           <ns2:getweatherbycitynameresponse xmlns:ns2= "http://weather.itheima.com" > <WeatherInfo> the wind is very big today </WeatherInfo> </ns2:getWeatherByCityNameResponse> </s:body ></S:Envelope> (3to publish a service based on the soap1.2 protocol, add the following annotation on the SEI (Service Endpoint Interface Services endpoint interface) implementation Class @bindingtype ( Javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING) to publish a service based on the soap1.2 protocol, requires Jax-WS Package Requirements 2.2. 8 or later. (4) soap1.2 The requested protocol body post/weather http/1.1accept:application/soap+xml, multipart/relatedcontent-type:application/soap+xml; Charset=utf-8; Action= "Http://weather.itheima.com/WeatherInterface/getWeatherByCityNameRequest"User-agent:jax-ws RI 2.2.4-B01host:127.0.0.1:54321Connection:keep-alivecontent-length:233<?xml version= "1.0"? ><s:envelope xmlns:s= "Http://www.w3.org/2003/05/soap-envelope" >                          <S:Body> <ns2:getweatherbycityname xmlns:ns2= "http://weather.itheima.com" > <cityName> Beijing </cityName> </ns2:getWeatherByCityName> </s:body ></S:Envelope> (5) soap1.2 response of the protocol body HTTP/1.1 200Oktransfer-encoding:chunkedcontent-type:application/soap+xml; Charset=utf-8Date:fri,OCT 2015 07:54:53GMT<?xml version= ' 1.0 ' encoding= ' UTF-8 '? ><s:envelope xmlns:s= "Http://www.w3.org/2003/05/soap-envelope" > & Lt                          s:body> <ns2:getweatherbycitynameresponse xmlns:ns2= "http://weather.itheima.com" >        <WeatherInfo> the wind is very big today </WeatherInfo> </ns2:getWeatherByCityNameResponse> </S:Body></S:Envelope> 2. WSDL WSDL (Web service Description Language) is an XML language used to describe Web services (Web service) and to describe how to communicate with Web services. Because it's XML-based,
So WSDL is both machine readable and human readable, which is a great benefit.

  ( 1 1 2 and the service node to find the Port node. Each port corresponds to a porttype.  3 4 5, operation has input (parameter) and output (return value)  6, The Input (parameter) and output (return values) correspond to the message node  7 2

http: // 127.0.0.1:12345/weather?wsdl

http: // 127.0.0.1:12345/weather?xsd=1





3. UDDI UDDI is a directory service through which enterprises can register and search for WEB services. The enterprise registers its own web service with UDDI, or it can use a UDDI-registered Web service service from another enterprise to achieve resource sharing. UDDI aims to share global WEBSERVCIE resources and promote global economic cooperation. However, using WebService does not have to use UDDI because the user knows the address of the Web service through WSDL and can call webservice directly from the WSDL. (now obsolete)

Three elements of WebService

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.