Web services architecture 10252020 22 9 Web services
Web services architecture 10/25/2020 2/2 9
Web services stack l Transport layer ¡ HTTP, FTP, SMTP l Packaging layer ¡ SOAP (Simple Object Access Protocol) l Επιτρέπει στις εφαρμογές να ανταλλάσσουν πληροφορία μέσω του HTTP l Description layer ¡ WSDL (Web Services Description Language) l Χρησιμοποιείται για την περιγραφή των Web services και για το πώς να αποκτηθεί η πρόσβαση σε αυτές l Discovery layer ¡ UDDI (Universal Description, Discovery, and Integration project) 10/25/2020 10
SOAP – συντακτικό 2/2 <? xml version="1. 0"? > <soap: Envelope xmlns: soap="http: //www. w 3. org/2001/12/soapenvelope" soap: encoding. Style="http: //www. w 3. org/2001/ 12/soap-encoding"> <soap: Header>. . . </soap: Header> <soap: Body>. . . <soap: Fault>. . . </soap: Fault> </soap: Body> </soap: Envelope> 10/25/2020 14
SOAP – request 1/2 <? xml version="1. 0"? > <soap: Envelope xmlns: soap="http: //www. w 3. org/2001/12/soapenvelope“ soap: encoding. Style="http: //www. w 3. org/2001/12 /soap-encoding"> <soap: Body> <m: Get. Price xmlns: m="http: //www. test_soap. gr/prices"> <m: Item>Apples</m: Item> </m: Get. Price> </soap: Body> 10/25/2020 15 </soap: Envelope>
SOAP – response 2/2 <? xml version="1. 0"? > <soap: Envelope xmlns: soap="http: //www. w 3. org/2001/12/soapenvelope“ soap: encoding. Style="http: //www. w 3. org/2001/12/s oap-encoding"> <soap: Body> <m: Get. Price. Response xmlns: m="http: //www. test_soap. gr/prices"> <m: Price>1. 90</m: Price> </m: Get. Price. Response> </soap: Body> 10/25/2020 16 </soap: Envelope>
WSDL – συντακτικό 2/3 <message name="get. Term. Request"> <part name="term" type="xs: string"/> </message> <message name="get. Term. Response"> <part name="value" type="xs: string"/> </message> <port. Type name="glossary. Terms"> <operation name="get. Term"> <input message="get. Term. Request"/> <output message="get. Term. Response"/> </operation> </port. Type> 10/25/2020 19
WSDL – συντακτικό 3/3 <binding type="glossary. Terms" name="b 1"> <soap: binding style="document" transport="http: //schemas. xmlsoap. org/soap/ http"/> <operation> <soap: operation soap. Action="http: //example. com/get. Term"/> <input><soap: body use="literal"/> </input> <output><soap: body use="literal"/> </output> </operation> </binding> 10/25/2020 20
- Slides: 22