170 likes | 311 Views
WSDL. Universitatea “ Politehnica ” Bucuresti Facultatea de Automatic ă si Calculatoare Catedra Calculatoar e Florescu Silvia-Alina silvia.florescu@itacad.ro. Obiective. Ce este WSDL? Elemente WSDL Structura unui document WSDL Descrierea elementelor WSDL Concluzii.
E N D
WSDL Universitatea “Politehnica” Bucuresti Facultatea de AutomaticăsiCalculatoare CatedraCalculatoare Florescu Silvia-Alina silvia.florescu@itacad.ro
Obiective • Ce este WSDL? • Elemente WSDL • Structura unui document WSDL • Descriereaelementelor WSDL • Concluzii
Ceeste WSDL? • Web Services Description Language • Este un limbaj de descriere a serviciilor web. • SOAP • UDDI • Descrie un set de masaje SOAP si cum sunteletransmiseperetea • Este in format XML • Usor de intelessi de editat
Ceeste WSDL? • WSDL a fostdezvoltat de Microsoft si IBM. • WSDL este un protocol bazatpe XML pentruinterschimbulinformatiilor in mediidistribuite. • WSDL descriemodul de acces al unuiserviciu web siceoperatiivarealiza. • WSDL este o parte integrala UDDI.
Elemente WSDL • WSDL imparteserviciile Web in treielementespecifice, care pot ficombinatesaurefolositedupace au fost definite. • Treitipuri de elementeimportante WSDL care pot fi definite separat: • Types • Operations • Binding
Elemente WSDL • Definition • Data types • Message • Operation • Port type • Binding • Port • Service • Elementeaditionale • Documentation • Import
Structuraunui document WSDL <definitions> <types> definition of types........ </types> <message> definition of a message.... </message> <portType> <operation> definition of a operation....... </operation> </portType> <binding> definition of a binding....</binding> <service> definition of a service.... </service> </definitions>
Elementul<definition> • Elementiul<definition> trebuiesa fie elementulradacinapentrupentrutoatedocumentele WSDL. • Definestenumeleserviciului Web. <definitions name="HelloService" targetNamespace="http://www.examples.com/wsdl/HelloService.wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.examples.com/wsdl/HelloService.wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> ................................................ </definitions>
Elementul<types> • Descrietoatetipurile de date folositeintre client si server. <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> </schema> </types>
Elementul<message> • Descriedatele care suntinterschimbateintrefurnizoriiservicului Web siclienti. <message name="SayHelloRequest"> <part name="firstName" type="xsd:string"/> </message> <message name="SayHelloResponse"> <part name="greeting" type="xsd:string"/> </message>
Elementul<portType> • Combinaelemente de mesaje multiple pentru a forma anumiteoperatiuni. • One-Way • Request-Response • Solicit-Response • Notification <portType name="Hello_PortType"> <operation name="sayHello"> <input message="tns:SayHelloRequest"/> <output message="tns:SayHelloResponse"/> </operation> </portType>
Elementul<binding> • Furnizeazadetaliispecificedespre cum vafitrimisa o operatiuneportType. • Furnizeazainformatii concrete desprece protocol estefolositpentrutransferuloperatiunilorportType. <binding name="Hello_Binding" type="tns:Hello_PortType">
Elementul<port> • Defineste un terminal prinspecificareauneiadresepentrurealizarealegaturii. <wsdl:definitions .... > <wsdl:service .... > * <wsdl:port name="nmtoken" binding="qname"> * <-- extensibility element (1) --> </wsdl:port> </wsdl:service> </wsdl:definitions>
Elementul<service> • Definesteporturilesuportate de un serviciu Web. • Pentrufiecare protocol suportat, exista un port element. <service name="Hello_Service"> <documentation>WSDL File for HelloService </documentation> <port binding="tns:Hello_Binding" name="Hello_Port"> <soap:addresslocation = "http://www.examples.com/SayHello/"> </port> </service
Concluzii • Usor de intelessi de editat • Utilizatori • Aplicatii • WSDL este in format XML • Independent de limbaj • Independent de platforma