Lecture 5 Web Service Program 苏伟 suweilzu@eyou.com
Lecture 5 Web Service Program 苏伟 suweilzu@eyou.com
SoA Web service 教育部-BM专业综合改革项目 Web服务实现技术知识体系 Task Specifications Description Service data XML V1.0 second Self-describing text-based data format. Widely format edition supported across many platforms Used in Web service messages and metadata Service SOAP V1.1/V1.2 XML-based messaging format for Web service invocation messages Service WSDL V1.1/V2.0 Language for specifying service interface and description implementation details within an XML document Service UDDI V3.0 Provides an information model and api for a discove ry registry of Web service metadata Lan Zhou University
SOA & Web Service Lan Zhou University 教育部-IBM专业综合改革项目 Web 服务实现技术知识体系
Part sOAP
Part I SOAP
Ce SoA Web s 教育部-BM专业综合改革项目 Agenda What is and is not soAP? SOAP Message Structure SoAP Binding Lan Zhou University
SOA & Web Service Lan Zhou University 教育部-IBM专业综合改革项目 Agenda ▪ What is and is not SOAP? ▪ SOAP Message Structure ▪ SOAP Binding
Ce SoA Web s 教育部-BM专业综合改革项目 What is soAP? W3C Definition Simple object Access Protocol SOAP Service A lightweight protocol intended Requestor request for exchanging structured message information in a decentralized,Web service distributed environment runtime engine XML-based messages Be independent of any particular programming model and other implementation SOAP specific semantics response message Web service Lan Zhou University
SOA & Web Service Lan Zhou University 教育部-IBM专业综合改革项目 What is SOAP? W3C Definition ▪ Simple Object Access Protocol ▪ A lightweight protocol intended for exchanging structured information in a decentralized, distributed environment ▪ XML-based messages ▪ Be independent of any particular programming model and other implementation specific semantics
SOA& Web Service 教育部-BM专业综合改革项目 DoI Need to know how soaP works in detail as a Java Developer? Yes Understanding it will help you to build better application EX) Understanding how TCP/P will help you build better TCP/P application You will mostly likely use high-level aPI (JAX-RPC)to build Web applications How SoaP works is hidden from developers Lan Zhou University
SOA & Web Service Lan Zhou University 教育部-IBM专业综合改革项目 Do I Need to know how SOAP works in detail as a Java Developer? ▪ Yes – Understanding it will help you to build better application – Ex) Understanding how TCP/IP will help you build better TCP/IP application ▪ No – You will mostly likely use high-level API (JAX-RPC) to build Web applications – How SOAP works is hidden from developers
Ce SOA& Web s 教育部-BM专业综合改革项目 What is SoAP? Stateless One-way message exchange paradigm Applications can create more complex interaction patterns(e.g, request/response, request/multiple responses, etc. )by combining such one-way exchanges with features provided by an underlying protocol and/or application-specific information Silent on the semantics of any application specific data it conveys Lan Zhou University
SOA & Web Service Lan Zhou University 教育部-IBM专业综合改革项目 What is SOAP? ▪ Stateless ▪ One-way message exchange paradigm – Applications can create more complex interaction patterns (e.g., request/response, request/multiple responses, etc.) by combining such one-way exchanges with features provided by an underlying protocol and/or application-specific information ▪ Silent on the semantics of any applicationspecific data it conveys
Ce SoA Web s 教育部-BM专业综合改革项目 What soAP is not Not a component model So it will not replace objects and components, i.e EJBTM JavaBeans TM Not a programming language So it will not replace java Not a solution for all So it will not replace other distributed computing technologies such as rmi Lan Zhou University
SOA & Web Service Lan Zhou University 教育部-IBM专业综合改革项目 What SOAP is Not ▪ Not a component model – So it will not replace objects and components, i.e. EJB™, JavaBeans™ ▪ Not a programming language – So it will not replace Java ▪ Not a solution for all – So it will not replace other distributed computing technologies such as RMI
Ce SOA& Web s 教育部-BM专业综合改革项目 Where is soAP? SOAP 1.2 is W3C recommendation SOAP 1.2 Part 1 defines SOAP envelope Protocol binding framework SOAP 1.2 Part 2 defines Data model for SOaP Bindingtohttp Lan Zhou University
SOA & Web Service Lan Zhou University 教育部-IBM专业综合改革项目 Where is SOAP? ▪ SOAP 1.2 is W3C recommendation ▪ SOAP 1.2 Part 1 defines – SOAP envelope – Protocol binding framework ▪ SOAP 1.2 Part 2 defines – Data model for SOAP – Binding to HTTP
Ce SoA Web s 教育部-BM专业综合改革项目 SOAP Message Structure SOAP Message SOAP Envelope with Attachments SOAP Header Primary MIME part (text/xml) Header Entry Header entr Attachment SOAP Bod Attachment Body Entry Body entry Attachment Lan Zhou University
SOA & Web Service Lan Zhou University 教育部-IBM专业综合改革项目 SOAP Message Structure