11
Web Services, SOAP and Java Derek Munneke AJUG / ACS Java SIG November 2001

Web Services, SOAP and Java Derek Munneke AJUG / ACS Java SIG November 2001

Embed Size (px)

Citation preview

Page 1: Web Services, SOAP and Java Derek Munneke AJUG / ACS Java SIG November 2001

Web Services, SOAP and Java

Derek Munneke

AJUG / ACS Java SIG

November 2001

Page 2: 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.

[ http://www6.software.ibm.com/developerworks/education/wsbasics/ ]

Page 3: Web Services, SOAP and Java Derek Munneke AJUG / ACS Java SIG November 2001

What is SOAP?

Simple Object Access ProtocolSOAP 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.

[ http://www.w3.org/TR/SOAP/ (1.1)]

Page 4: Web Services, SOAP and Java Derek Munneke AJUG / ACS Java SIG November 2001

What is SOAP 1.2?

Simple Object Access ProtocolSOAP 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.

[ http://www.w3.org/TR/soap12-part1/ (1.2 Working Draft)]

Page 5: Web Services, SOAP and Java Derek Munneke AJUG / ACS Java SIG November 2001

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

Page 6: Web Services, SOAP and Java Derek Munneke AJUG / ACS Java SIG November 2001

SOAP Node

Sender Receiver Intermediaries Actors (v1.1)

Page 7: Web Services, SOAP and Java Derek Munneke AJUG / ACS Java SIG November 2001

SOAP Message

Envelope Header

– actor attribute– mustUnderstand attribute

Body Fault

– Fault Code VersionMismatch MustUnderstand DataEncodingUnknown Client Server

Page 8: Web Services, SOAP and Java Derek Munneke AJUG / ACS Java SIG November 2001

Example SOAP Message

<env:Envelope xmlns:env="http://www.w3.org/2001/09/soap-envelope"> <env:Header>

<n:alertcontrol xmlns:n=http://example.org/alertcontrol>

<n:priority>1</n:priority>

<n:expires>2001-06-22T14:00:00-05:00</n:expires> </n:alertcontrol> </env:Header> <env:Body>

<m:alert xmlns:m="http://example.org/alert"> <m:msg>Pick up Mary at school at

2pm</m:msg> </m:alert>

</env:Body> </env:Envelope>

Page 9: Web Services, SOAP and Java Derek Munneke AJUG / ACS Java SIG November 2001

Java and XML

XML makes data portableJava makes code portable

Page 10: Web Services, SOAP and Java Derek Munneke AJUG / ACS Java SIG November 2001

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

Page 11: Web Services, SOAP and Java Derek Munneke AJUG / ACS Java SIG November 2001

References

To be supplied… Presentation to be published:

http://www.ajug.org.au/sajug/meetings