Web Services, SOAP and Java Derek Munneke AJUG / ACS Java SIG November 2001
What is a Web Service? Web services are a new breed of Web application. They are self- contained, self-describing, modular applications that can be published, located, and invoked across the Web. Web services perform functions, which can be anything from simple requests to complicated business processes...Once a Web service is deployed, other applications (and other Web services) can discover and invoke the deployed service. [ ]
What is SOAP? Simple Object Access Protocol SOAP is a lightweight protocol for exchange of information in a decentralized, distributed environment. It is an XML based protocol that consists of three parts: an envelope that defines a framework for describing what is in a message and how to process it, a set of encoding rules for expressing instances of application-defined datatypes, and a convention for representing remote procedure calls and responses. SOAP can potentially be used in combination with a variety of other protocols; however, the only bindings defined in this document describe how to use SOAP in combination with HTTP and HTTP Extension Framework. [ (1.1)]
What is SOAP 1.2? Simple Object Access Protocol SOAP version 1.2 is a lightweight protocol for exchange of information in a decentralized, distributed environment. It is an XML based protocol that consists of four parts: an envelope that defines a framework for describing what is in a message and how to process it, a transport binding framework for exchanging messages using an underlying protocol, a set of encoding rules for expressing instances of application-defined data types and a convention for representing remote procedure calls and responses. Part 1 (this document) describes the SOAP envelope and SOAP transport binding framework; Part 2[1]describes the SOAP encoding rules, the SOAP RPC convention and a concrete HTTP binding specification.[1] [ (1.2 Working Draft)]
History of SOAP SOAP 0 (1998) – Microsoft, DevelopMentor XML-RPC (1998) – Subset of SOAP ebXML (1999) – Electronic Business XML – Messaging for multiparty transactions SOAP 1.0 & 1.1 (2000) SOAP 1.2 (2001 working draft) – Messaging and RPC
SOAP Node Sender Receiver Intermediaries Actors (v1.1)
SOAP Message Envelope Header – actor attribute – mustUnderstand attribute Body Fault – Fault Code VersionMismatch MustUnderstand DataEncodingUnknown Client Server
Example SOAP Message T14:00:00-05:00 Pick up Mary at school at 2pm
Java and XML XML makes data portable Java makes code portable
Java API’s for XML JAXP : Java API for XML Processing – SAX : Simple API for XML Processing – DOM : Document Object Model JAXB : Java API for XML Binding JAXM : Java API for XML Messaging – SOAP 1.1 JAXR : Java API for XML Registries
References To be supplied… Presentation to be published: