38
Web services. DOM parsing and SOAP .

Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

Embed Size (px)

Citation preview

Page 1: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

Web services

DOM parsing and SOAP

Summary

Exercise SAX-Based checkInvoice() push parsing event-based parsing traversal order is depth-first

Intro to SOAP

Todays agenda

Practical exercise DOM parsing (p91 - 96) SOAP revisited Practical exercise calling the web service

googleSearch

XMLDocument

Character Stream

Parser

Serializer

StandardizedXML APIs

Basic XML processing architecture

(deserializer)

Application

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Todays exercise DOM parsing(Document Object Model W3C)

ONE-STEP parsing model

Most popular and widely used parser model

Builds the parse tree first before parsing

Easy to program with but takes up a lot of memory takes time to instantiate the parse tree

DOM parsing

Building a DOM parse tree Navigating and manipulating the DOM tree

Two important packages orgw3cdom javaxxmlparsers

httpjavasuncomwebservices Java API for XML Web Services (JAX-WS) Java Architecture for XML Binding (JAXB) Java API for XML Messaging (JAXM) gtgtgt Java API for XML Processing (JAXP) Java API for XML Registries (JAXR) Java API for XML-based RPC (JAX-RPC) SOAP with attachments API for Java (SAAJ) Java API for XML WS addressing (JAX-WSA) XML Web Services Security (XWSS)

Building the DOM parse tree

The DOM parsing architecture

ob

ob ob

ob ob

W3CDOMDocument

BuilderInstance

XML Data

DocumentBuilderFactory

get

build

read

Package to build DOM tree

javaxxmlparsers Specifies

DocumentBuilder classes and DocumentBuilderFactory classes

Navigate and manipulate DOM parse tree

Key DOM interfaces (Fig29)Interface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()DocumentFragm

ent createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)Node

List

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Node (root) Interface key methods

+ getNodeName()String + getNodeValue()String + setNodeValue(nodeValueString)void +getNodeType()short +getParentNode()Node +getChildNodes()NodeList +getAttributes()NamedNodeMap

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Element Interface key methods

+getTagName()String +getAttribute(nameString)String +setAttribute(nameStringvalueString)void +hasAttribute(nameString)boolean

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

InterfaceElement

InterfaceAttr

Attribute Interface key methods

+getName()String +getValue()String +setValue(valueString)void

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

DOM has a name-space awareversion

API version of most key interfaces getAttributeNS(String nsURIString localName)

Example ldquohttpskatestowncomnsinvoicerdquo (ns URI) ldquoitemrdquo ldquotaxrdquo etc (local name wo prefix)

Requires the parser become name space aware

After

DocumentBuilderFactory factory=

DocumentBuilderFactorynewInstance()

insert

factorySetNamespaceAware(true)

Todays DOM exercise

Use DOM for invoice checker repeat last weeks exercise using a DOM parser instead

( Down load files InvoiceCheckerjava InvoiceCheckerDOMjava with ftpevarosenet)

Transform InvoiceCheckerDOMjava to read an invoice xml document which uses name spaces (Download skatextownInvoiceNSxml with ftpevarosenet)

Java API Specifications

To help you in developing Java programs Go to

httpjavasuncomj2se

Then click on

API Specifications

Then click on

J2SE

DOM-based Invoice Checkerimports

package comskatestowninvoice

import javaioInputStream

import orgw3cdomNode

import orgw3cdomNodeList

import orgw3cdomElement

import orgw3cdomCharacterData

import javaxxmlparsersDocumentBuilder

importjavaxxmlparsersDocumentBuilderFactory

SOAP

The Simple Access Object Protocol

Service requester Service provider

soapmessages

application object(client)

SOAP-basedmiddleware

application object(service provider)

SOAP-basedmiddleware

stub skeleton

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 2: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

Summary

Exercise SAX-Based checkInvoice() push parsing event-based parsing traversal order is depth-first

Intro to SOAP

Todays agenda

Practical exercise DOM parsing (p91 - 96) SOAP revisited Practical exercise calling the web service

googleSearch

XMLDocument

Character Stream

Parser

Serializer

StandardizedXML APIs

Basic XML processing architecture

(deserializer)

Application

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Todays exercise DOM parsing(Document Object Model W3C)

ONE-STEP parsing model

Most popular and widely used parser model

Builds the parse tree first before parsing

Easy to program with but takes up a lot of memory takes time to instantiate the parse tree

DOM parsing

Building a DOM parse tree Navigating and manipulating the DOM tree

Two important packages orgw3cdom javaxxmlparsers

httpjavasuncomwebservices Java API for XML Web Services (JAX-WS) Java Architecture for XML Binding (JAXB) Java API for XML Messaging (JAXM) gtgtgt Java API for XML Processing (JAXP) Java API for XML Registries (JAXR) Java API for XML-based RPC (JAX-RPC) SOAP with attachments API for Java (SAAJ) Java API for XML WS addressing (JAX-WSA) XML Web Services Security (XWSS)

Building the DOM parse tree

The DOM parsing architecture

ob

ob ob

ob ob

W3CDOMDocument

BuilderInstance

XML Data

DocumentBuilderFactory

get

build

read

Package to build DOM tree

javaxxmlparsers Specifies

DocumentBuilder classes and DocumentBuilderFactory classes

Navigate and manipulate DOM parse tree

Key DOM interfaces (Fig29)Interface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()DocumentFragm

ent createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)Node

List

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Node (root) Interface key methods

+ getNodeName()String + getNodeValue()String + setNodeValue(nodeValueString)void +getNodeType()short +getParentNode()Node +getChildNodes()NodeList +getAttributes()NamedNodeMap

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Element Interface key methods

+getTagName()String +getAttribute(nameString)String +setAttribute(nameStringvalueString)void +hasAttribute(nameString)boolean

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

InterfaceElement

InterfaceAttr

Attribute Interface key methods

+getName()String +getValue()String +setValue(valueString)void

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

DOM has a name-space awareversion

API version of most key interfaces getAttributeNS(String nsURIString localName)

Example ldquohttpskatestowncomnsinvoicerdquo (ns URI) ldquoitemrdquo ldquotaxrdquo etc (local name wo prefix)

Requires the parser become name space aware

After

DocumentBuilderFactory factory=

DocumentBuilderFactorynewInstance()

insert

factorySetNamespaceAware(true)

Todays DOM exercise

Use DOM for invoice checker repeat last weeks exercise using a DOM parser instead

( Down load files InvoiceCheckerjava InvoiceCheckerDOMjava with ftpevarosenet)

Transform InvoiceCheckerDOMjava to read an invoice xml document which uses name spaces (Download skatextownInvoiceNSxml with ftpevarosenet)

Java API Specifications

To help you in developing Java programs Go to

httpjavasuncomj2se

Then click on

API Specifications

Then click on

J2SE

DOM-based Invoice Checkerimports

package comskatestowninvoice

import javaioInputStream

import orgw3cdomNode

import orgw3cdomNodeList

import orgw3cdomElement

import orgw3cdomCharacterData

import javaxxmlparsersDocumentBuilder

importjavaxxmlparsersDocumentBuilderFactory

SOAP

The Simple Access Object Protocol

Service requester Service provider

soapmessages

application object(client)

SOAP-basedmiddleware

application object(service provider)

SOAP-basedmiddleware

stub skeleton

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 3: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

Todays agenda

Practical exercise DOM parsing (p91 - 96) SOAP revisited Practical exercise calling the web service

googleSearch

XMLDocument

Character Stream

Parser

Serializer

StandardizedXML APIs

Basic XML processing architecture

(deserializer)

Application

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Todays exercise DOM parsing(Document Object Model W3C)

ONE-STEP parsing model

Most popular and widely used parser model

Builds the parse tree first before parsing

Easy to program with but takes up a lot of memory takes time to instantiate the parse tree

DOM parsing

Building a DOM parse tree Navigating and manipulating the DOM tree

Two important packages orgw3cdom javaxxmlparsers

httpjavasuncomwebservices Java API for XML Web Services (JAX-WS) Java Architecture for XML Binding (JAXB) Java API for XML Messaging (JAXM) gtgtgt Java API for XML Processing (JAXP) Java API for XML Registries (JAXR) Java API for XML-based RPC (JAX-RPC) SOAP with attachments API for Java (SAAJ) Java API for XML WS addressing (JAX-WSA) XML Web Services Security (XWSS)

Building the DOM parse tree

The DOM parsing architecture

ob

ob ob

ob ob

W3CDOMDocument

BuilderInstance

XML Data

DocumentBuilderFactory

get

build

read

Package to build DOM tree

javaxxmlparsers Specifies

DocumentBuilder classes and DocumentBuilderFactory classes

Navigate and manipulate DOM parse tree

Key DOM interfaces (Fig29)Interface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()DocumentFragm

ent createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)Node

List

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Node (root) Interface key methods

+ getNodeName()String + getNodeValue()String + setNodeValue(nodeValueString)void +getNodeType()short +getParentNode()Node +getChildNodes()NodeList +getAttributes()NamedNodeMap

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Element Interface key methods

+getTagName()String +getAttribute(nameString)String +setAttribute(nameStringvalueString)void +hasAttribute(nameString)boolean

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

InterfaceElement

InterfaceAttr

Attribute Interface key methods

+getName()String +getValue()String +setValue(valueString)void

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

DOM has a name-space awareversion

API version of most key interfaces getAttributeNS(String nsURIString localName)

Example ldquohttpskatestowncomnsinvoicerdquo (ns URI) ldquoitemrdquo ldquotaxrdquo etc (local name wo prefix)

Requires the parser become name space aware

After

DocumentBuilderFactory factory=

DocumentBuilderFactorynewInstance()

insert

factorySetNamespaceAware(true)

Todays DOM exercise

Use DOM for invoice checker repeat last weeks exercise using a DOM parser instead

( Down load files InvoiceCheckerjava InvoiceCheckerDOMjava with ftpevarosenet)

Transform InvoiceCheckerDOMjava to read an invoice xml document which uses name spaces (Download skatextownInvoiceNSxml with ftpevarosenet)

Java API Specifications

To help you in developing Java programs Go to

httpjavasuncomj2se

Then click on

API Specifications

Then click on

J2SE

DOM-based Invoice Checkerimports

package comskatestowninvoice

import javaioInputStream

import orgw3cdomNode

import orgw3cdomNodeList

import orgw3cdomElement

import orgw3cdomCharacterData

import javaxxmlparsersDocumentBuilder

importjavaxxmlparsersDocumentBuilderFactory

SOAP

The Simple Access Object Protocol

Service requester Service provider

soapmessages

application object(client)

SOAP-basedmiddleware

application object(service provider)

SOAP-basedmiddleware

stub skeleton

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 4: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

XMLDocument

Character Stream

Parser

Serializer

StandardizedXML APIs

Basic XML processing architecture

(deserializer)

Application

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Todays exercise DOM parsing(Document Object Model W3C)

ONE-STEP parsing model

Most popular and widely used parser model

Builds the parse tree first before parsing

Easy to program with but takes up a lot of memory takes time to instantiate the parse tree

DOM parsing

Building a DOM parse tree Navigating and manipulating the DOM tree

Two important packages orgw3cdom javaxxmlparsers

httpjavasuncomwebservices Java API for XML Web Services (JAX-WS) Java Architecture for XML Binding (JAXB) Java API for XML Messaging (JAXM) gtgtgt Java API for XML Processing (JAXP) Java API for XML Registries (JAXR) Java API for XML-based RPC (JAX-RPC) SOAP with attachments API for Java (SAAJ) Java API for XML WS addressing (JAX-WSA) XML Web Services Security (XWSS)

Building the DOM parse tree

The DOM parsing architecture

ob

ob ob

ob ob

W3CDOMDocument

BuilderInstance

XML Data

DocumentBuilderFactory

get

build

read

Package to build DOM tree

javaxxmlparsers Specifies

DocumentBuilder classes and DocumentBuilderFactory classes

Navigate and manipulate DOM parse tree

Key DOM interfaces (Fig29)Interface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()DocumentFragm

ent createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)Node

List

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Node (root) Interface key methods

+ getNodeName()String + getNodeValue()String + setNodeValue(nodeValueString)void +getNodeType()short +getParentNode()Node +getChildNodes()NodeList +getAttributes()NamedNodeMap

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Element Interface key methods

+getTagName()String +getAttribute(nameString)String +setAttribute(nameStringvalueString)void +hasAttribute(nameString)boolean

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

InterfaceElement

InterfaceAttr

Attribute Interface key methods

+getName()String +getValue()String +setValue(valueString)void

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

DOM has a name-space awareversion

API version of most key interfaces getAttributeNS(String nsURIString localName)

Example ldquohttpskatestowncomnsinvoicerdquo (ns URI) ldquoitemrdquo ldquotaxrdquo etc (local name wo prefix)

Requires the parser become name space aware

After

DocumentBuilderFactory factory=

DocumentBuilderFactorynewInstance()

insert

factorySetNamespaceAware(true)

Todays DOM exercise

Use DOM for invoice checker repeat last weeks exercise using a DOM parser instead

( Down load files InvoiceCheckerjava InvoiceCheckerDOMjava with ftpevarosenet)

Transform InvoiceCheckerDOMjava to read an invoice xml document which uses name spaces (Download skatextownInvoiceNSxml with ftpevarosenet)

Java API Specifications

To help you in developing Java programs Go to

httpjavasuncomj2se

Then click on

API Specifications

Then click on

J2SE

DOM-based Invoice Checkerimports

package comskatestowninvoice

import javaioInputStream

import orgw3cdomNode

import orgw3cdomNodeList

import orgw3cdomElement

import orgw3cdomCharacterData

import javaxxmlparsersDocumentBuilder

importjavaxxmlparsersDocumentBuilderFactory

SOAP

The Simple Access Object Protocol

Service requester Service provider

soapmessages

application object(client)

SOAP-basedmiddleware

application object(service provider)

SOAP-basedmiddleware

stub skeleton

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 5: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Todays exercise DOM parsing(Document Object Model W3C)

ONE-STEP parsing model

Most popular and widely used parser model

Builds the parse tree first before parsing

Easy to program with but takes up a lot of memory takes time to instantiate the parse tree

DOM parsing

Building a DOM parse tree Navigating and manipulating the DOM tree

Two important packages orgw3cdom javaxxmlparsers

httpjavasuncomwebservices Java API for XML Web Services (JAX-WS) Java Architecture for XML Binding (JAXB) Java API for XML Messaging (JAXM) gtgtgt Java API for XML Processing (JAXP) Java API for XML Registries (JAXR) Java API for XML-based RPC (JAX-RPC) SOAP with attachments API for Java (SAAJ) Java API for XML WS addressing (JAX-WSA) XML Web Services Security (XWSS)

Building the DOM parse tree

The DOM parsing architecture

ob

ob ob

ob ob

W3CDOMDocument

BuilderInstance

XML Data

DocumentBuilderFactory

get

build

read

Package to build DOM tree

javaxxmlparsers Specifies

DocumentBuilder classes and DocumentBuilderFactory classes

Navigate and manipulate DOM parse tree

Key DOM interfaces (Fig29)Interface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()DocumentFragm

ent createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)Node

List

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Node (root) Interface key methods

+ getNodeName()String + getNodeValue()String + setNodeValue(nodeValueString)void +getNodeType()short +getParentNode()Node +getChildNodes()NodeList +getAttributes()NamedNodeMap

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Element Interface key methods

+getTagName()String +getAttribute(nameString)String +setAttribute(nameStringvalueString)void +hasAttribute(nameString)boolean

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

InterfaceElement

InterfaceAttr

Attribute Interface key methods

+getName()String +getValue()String +setValue(valueString)void

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

DOM has a name-space awareversion

API version of most key interfaces getAttributeNS(String nsURIString localName)

Example ldquohttpskatestowncomnsinvoicerdquo (ns URI) ldquoitemrdquo ldquotaxrdquo etc (local name wo prefix)

Requires the parser become name space aware

After

DocumentBuilderFactory factory=

DocumentBuilderFactorynewInstance()

insert

factorySetNamespaceAware(true)

Todays DOM exercise

Use DOM for invoice checker repeat last weeks exercise using a DOM parser instead

( Down load files InvoiceCheckerjava InvoiceCheckerDOMjava with ftpevarosenet)

Transform InvoiceCheckerDOMjava to read an invoice xml document which uses name spaces (Download skatextownInvoiceNSxml with ftpevarosenet)

Java API Specifications

To help you in developing Java programs Go to

httpjavasuncomj2se

Then click on

API Specifications

Then click on

J2SE

DOM-based Invoice Checkerimports

package comskatestowninvoice

import javaioInputStream

import orgw3cdomNode

import orgw3cdomNodeList

import orgw3cdomElement

import orgw3cdomCharacterData

import javaxxmlparsersDocumentBuilder

importjavaxxmlparsersDocumentBuilderFactory

SOAP

The Simple Access Object Protocol

Service requester Service provider

soapmessages

application object(client)

SOAP-basedmiddleware

application object(service provider)

SOAP-basedmiddleware

stub skeleton

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 6: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

Todays exercise DOM parsing(Document Object Model W3C)

ONE-STEP parsing model

Most popular and widely used parser model

Builds the parse tree first before parsing

Easy to program with but takes up a lot of memory takes time to instantiate the parse tree

DOM parsing

Building a DOM parse tree Navigating and manipulating the DOM tree

Two important packages orgw3cdom javaxxmlparsers

httpjavasuncomwebservices Java API for XML Web Services (JAX-WS) Java Architecture for XML Binding (JAXB) Java API for XML Messaging (JAXM) gtgtgt Java API for XML Processing (JAXP) Java API for XML Registries (JAXR) Java API for XML-based RPC (JAX-RPC) SOAP with attachments API for Java (SAAJ) Java API for XML WS addressing (JAX-WSA) XML Web Services Security (XWSS)

Building the DOM parse tree

The DOM parsing architecture

ob

ob ob

ob ob

W3CDOMDocument

BuilderInstance

XML Data

DocumentBuilderFactory

get

build

read

Package to build DOM tree

javaxxmlparsers Specifies

DocumentBuilder classes and DocumentBuilderFactory classes

Navigate and manipulate DOM parse tree

Key DOM interfaces (Fig29)Interface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()DocumentFragm

ent createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)Node

List

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Node (root) Interface key methods

+ getNodeName()String + getNodeValue()String + setNodeValue(nodeValueString)void +getNodeType()short +getParentNode()Node +getChildNodes()NodeList +getAttributes()NamedNodeMap

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Element Interface key methods

+getTagName()String +getAttribute(nameString)String +setAttribute(nameStringvalueString)void +hasAttribute(nameString)boolean

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

InterfaceElement

InterfaceAttr

Attribute Interface key methods

+getName()String +getValue()String +setValue(valueString)void

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

DOM has a name-space awareversion

API version of most key interfaces getAttributeNS(String nsURIString localName)

Example ldquohttpskatestowncomnsinvoicerdquo (ns URI) ldquoitemrdquo ldquotaxrdquo etc (local name wo prefix)

Requires the parser become name space aware

After

DocumentBuilderFactory factory=

DocumentBuilderFactorynewInstance()

insert

factorySetNamespaceAware(true)

Todays DOM exercise

Use DOM for invoice checker repeat last weeks exercise using a DOM parser instead

( Down load files InvoiceCheckerjava InvoiceCheckerDOMjava with ftpevarosenet)

Transform InvoiceCheckerDOMjava to read an invoice xml document which uses name spaces (Download skatextownInvoiceNSxml with ftpevarosenet)

Java API Specifications

To help you in developing Java programs Go to

httpjavasuncomj2se

Then click on

API Specifications

Then click on

J2SE

DOM-based Invoice Checkerimports

package comskatestowninvoice

import javaioInputStream

import orgw3cdomNode

import orgw3cdomNodeList

import orgw3cdomElement

import orgw3cdomCharacterData

import javaxxmlparsersDocumentBuilder

importjavaxxmlparsersDocumentBuilderFactory

SOAP

The Simple Access Object Protocol

Service requester Service provider

soapmessages

application object(client)

SOAP-basedmiddleware

application object(service provider)

SOAP-basedmiddleware

stub skeleton

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 7: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

DOM parsing

Building a DOM parse tree Navigating and manipulating the DOM tree

Two important packages orgw3cdom javaxxmlparsers

httpjavasuncomwebservices Java API for XML Web Services (JAX-WS) Java Architecture for XML Binding (JAXB) Java API for XML Messaging (JAXM) gtgtgt Java API for XML Processing (JAXP) Java API for XML Registries (JAXR) Java API for XML-based RPC (JAX-RPC) SOAP with attachments API for Java (SAAJ) Java API for XML WS addressing (JAX-WSA) XML Web Services Security (XWSS)

Building the DOM parse tree

The DOM parsing architecture

ob

ob ob

ob ob

W3CDOMDocument

BuilderInstance

XML Data

DocumentBuilderFactory

get

build

read

Package to build DOM tree

javaxxmlparsers Specifies

DocumentBuilder classes and DocumentBuilderFactory classes

Navigate and manipulate DOM parse tree

Key DOM interfaces (Fig29)Interface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()DocumentFragm

ent createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)Node

List

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Node (root) Interface key methods

+ getNodeName()String + getNodeValue()String + setNodeValue(nodeValueString)void +getNodeType()short +getParentNode()Node +getChildNodes()NodeList +getAttributes()NamedNodeMap

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Element Interface key methods

+getTagName()String +getAttribute(nameString)String +setAttribute(nameStringvalueString)void +hasAttribute(nameString)boolean

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

InterfaceElement

InterfaceAttr

Attribute Interface key methods

+getName()String +getValue()String +setValue(valueString)void

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

DOM has a name-space awareversion

API version of most key interfaces getAttributeNS(String nsURIString localName)

Example ldquohttpskatestowncomnsinvoicerdquo (ns URI) ldquoitemrdquo ldquotaxrdquo etc (local name wo prefix)

Requires the parser become name space aware

After

DocumentBuilderFactory factory=

DocumentBuilderFactorynewInstance()

insert

factorySetNamespaceAware(true)

Todays DOM exercise

Use DOM for invoice checker repeat last weeks exercise using a DOM parser instead

( Down load files InvoiceCheckerjava InvoiceCheckerDOMjava with ftpevarosenet)

Transform InvoiceCheckerDOMjava to read an invoice xml document which uses name spaces (Download skatextownInvoiceNSxml with ftpevarosenet)

Java API Specifications

To help you in developing Java programs Go to

httpjavasuncomj2se

Then click on

API Specifications

Then click on

J2SE

DOM-based Invoice Checkerimports

package comskatestowninvoice

import javaioInputStream

import orgw3cdomNode

import orgw3cdomNodeList

import orgw3cdomElement

import orgw3cdomCharacterData

import javaxxmlparsersDocumentBuilder

importjavaxxmlparsersDocumentBuilderFactory

SOAP

The Simple Access Object Protocol

Service requester Service provider

soapmessages

application object(client)

SOAP-basedmiddleware

application object(service provider)

SOAP-basedmiddleware

stub skeleton

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 8: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

httpjavasuncomwebservices Java API for XML Web Services (JAX-WS) Java Architecture for XML Binding (JAXB) Java API for XML Messaging (JAXM) gtgtgt Java API for XML Processing (JAXP) Java API for XML Registries (JAXR) Java API for XML-based RPC (JAX-RPC) SOAP with attachments API for Java (SAAJ) Java API for XML WS addressing (JAX-WSA) XML Web Services Security (XWSS)

Building the DOM parse tree

The DOM parsing architecture

ob

ob ob

ob ob

W3CDOMDocument

BuilderInstance

XML Data

DocumentBuilderFactory

get

build

read

Package to build DOM tree

javaxxmlparsers Specifies

DocumentBuilder classes and DocumentBuilderFactory classes

Navigate and manipulate DOM parse tree

Key DOM interfaces (Fig29)Interface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()DocumentFragm

ent createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)Node

List

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Node (root) Interface key methods

+ getNodeName()String + getNodeValue()String + setNodeValue(nodeValueString)void +getNodeType()short +getParentNode()Node +getChildNodes()NodeList +getAttributes()NamedNodeMap

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Element Interface key methods

+getTagName()String +getAttribute(nameString)String +setAttribute(nameStringvalueString)void +hasAttribute(nameString)boolean

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

InterfaceElement

InterfaceAttr

Attribute Interface key methods

+getName()String +getValue()String +setValue(valueString)void

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

DOM has a name-space awareversion

API version of most key interfaces getAttributeNS(String nsURIString localName)

Example ldquohttpskatestowncomnsinvoicerdquo (ns URI) ldquoitemrdquo ldquotaxrdquo etc (local name wo prefix)

Requires the parser become name space aware

After

DocumentBuilderFactory factory=

DocumentBuilderFactorynewInstance()

insert

factorySetNamespaceAware(true)

Todays DOM exercise

Use DOM for invoice checker repeat last weeks exercise using a DOM parser instead

( Down load files InvoiceCheckerjava InvoiceCheckerDOMjava with ftpevarosenet)

Transform InvoiceCheckerDOMjava to read an invoice xml document which uses name spaces (Download skatextownInvoiceNSxml with ftpevarosenet)

Java API Specifications

To help you in developing Java programs Go to

httpjavasuncomj2se

Then click on

API Specifications

Then click on

J2SE

DOM-based Invoice Checkerimports

package comskatestowninvoice

import javaioInputStream

import orgw3cdomNode

import orgw3cdomNodeList

import orgw3cdomElement

import orgw3cdomCharacterData

import javaxxmlparsersDocumentBuilder

importjavaxxmlparsersDocumentBuilderFactory

SOAP

The Simple Access Object Protocol

Service requester Service provider

soapmessages

application object(client)

SOAP-basedmiddleware

application object(service provider)

SOAP-basedmiddleware

stub skeleton

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 9: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

Building the DOM parse tree

The DOM parsing architecture

ob

ob ob

ob ob

W3CDOMDocument

BuilderInstance

XML Data

DocumentBuilderFactory

get

build

read

Package to build DOM tree

javaxxmlparsers Specifies

DocumentBuilder classes and DocumentBuilderFactory classes

Navigate and manipulate DOM parse tree

Key DOM interfaces (Fig29)Interface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()DocumentFragm

ent createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)Node

List

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Node (root) Interface key methods

+ getNodeName()String + getNodeValue()String + setNodeValue(nodeValueString)void +getNodeType()short +getParentNode()Node +getChildNodes()NodeList +getAttributes()NamedNodeMap

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Element Interface key methods

+getTagName()String +getAttribute(nameString)String +setAttribute(nameStringvalueString)void +hasAttribute(nameString)boolean

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

InterfaceElement

InterfaceAttr

Attribute Interface key methods

+getName()String +getValue()String +setValue(valueString)void

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

DOM has a name-space awareversion

API version of most key interfaces getAttributeNS(String nsURIString localName)

Example ldquohttpskatestowncomnsinvoicerdquo (ns URI) ldquoitemrdquo ldquotaxrdquo etc (local name wo prefix)

Requires the parser become name space aware

After

DocumentBuilderFactory factory=

DocumentBuilderFactorynewInstance()

insert

factorySetNamespaceAware(true)

Todays DOM exercise

Use DOM for invoice checker repeat last weeks exercise using a DOM parser instead

( Down load files InvoiceCheckerjava InvoiceCheckerDOMjava with ftpevarosenet)

Transform InvoiceCheckerDOMjava to read an invoice xml document which uses name spaces (Download skatextownInvoiceNSxml with ftpevarosenet)

Java API Specifications

To help you in developing Java programs Go to

httpjavasuncomj2se

Then click on

API Specifications

Then click on

J2SE

DOM-based Invoice Checkerimports

package comskatestowninvoice

import javaioInputStream

import orgw3cdomNode

import orgw3cdomNodeList

import orgw3cdomElement

import orgw3cdomCharacterData

import javaxxmlparsersDocumentBuilder

importjavaxxmlparsersDocumentBuilderFactory

SOAP

The Simple Access Object Protocol

Service requester Service provider

soapmessages

application object(client)

SOAP-basedmiddleware

application object(service provider)

SOAP-basedmiddleware

stub skeleton

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 10: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

The DOM parsing architecture

ob

ob ob

ob ob

W3CDOMDocument

BuilderInstance

XML Data

DocumentBuilderFactory

get

build

read

Package to build DOM tree

javaxxmlparsers Specifies

DocumentBuilder classes and DocumentBuilderFactory classes

Navigate and manipulate DOM parse tree

Key DOM interfaces (Fig29)Interface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()DocumentFragm

ent createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)Node

List

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Node (root) Interface key methods

+ getNodeName()String + getNodeValue()String + setNodeValue(nodeValueString)void +getNodeType()short +getParentNode()Node +getChildNodes()NodeList +getAttributes()NamedNodeMap

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Element Interface key methods

+getTagName()String +getAttribute(nameString)String +setAttribute(nameStringvalueString)void +hasAttribute(nameString)boolean

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

InterfaceElement

InterfaceAttr

Attribute Interface key methods

+getName()String +getValue()String +setValue(valueString)void

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

DOM has a name-space awareversion

API version of most key interfaces getAttributeNS(String nsURIString localName)

Example ldquohttpskatestowncomnsinvoicerdquo (ns URI) ldquoitemrdquo ldquotaxrdquo etc (local name wo prefix)

Requires the parser become name space aware

After

DocumentBuilderFactory factory=

DocumentBuilderFactorynewInstance()

insert

factorySetNamespaceAware(true)

Todays DOM exercise

Use DOM for invoice checker repeat last weeks exercise using a DOM parser instead

( Down load files InvoiceCheckerjava InvoiceCheckerDOMjava with ftpevarosenet)

Transform InvoiceCheckerDOMjava to read an invoice xml document which uses name spaces (Download skatextownInvoiceNSxml with ftpevarosenet)

Java API Specifications

To help you in developing Java programs Go to

httpjavasuncomj2se

Then click on

API Specifications

Then click on

J2SE

DOM-based Invoice Checkerimports

package comskatestowninvoice

import javaioInputStream

import orgw3cdomNode

import orgw3cdomNodeList

import orgw3cdomElement

import orgw3cdomCharacterData

import javaxxmlparsersDocumentBuilder

importjavaxxmlparsersDocumentBuilderFactory

SOAP

The Simple Access Object Protocol

Service requester Service provider

soapmessages

application object(client)

SOAP-basedmiddleware

application object(service provider)

SOAP-basedmiddleware

stub skeleton

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 11: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

Package to build DOM tree

javaxxmlparsers Specifies

DocumentBuilder classes and DocumentBuilderFactory classes

Navigate and manipulate DOM parse tree

Key DOM interfaces (Fig29)Interface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()DocumentFragm

ent createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)Node

List

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Node (root) Interface key methods

+ getNodeName()String + getNodeValue()String + setNodeValue(nodeValueString)void +getNodeType()short +getParentNode()Node +getChildNodes()NodeList +getAttributes()NamedNodeMap

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Element Interface key methods

+getTagName()String +getAttribute(nameString)String +setAttribute(nameStringvalueString)void +hasAttribute(nameString)boolean

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

InterfaceElement

InterfaceAttr

Attribute Interface key methods

+getName()String +getValue()String +setValue(valueString)void

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

DOM has a name-space awareversion

API version of most key interfaces getAttributeNS(String nsURIString localName)

Example ldquohttpskatestowncomnsinvoicerdquo (ns URI) ldquoitemrdquo ldquotaxrdquo etc (local name wo prefix)

Requires the parser become name space aware

After

DocumentBuilderFactory factory=

DocumentBuilderFactorynewInstance()

insert

factorySetNamespaceAware(true)

Todays DOM exercise

Use DOM for invoice checker repeat last weeks exercise using a DOM parser instead

( Down load files InvoiceCheckerjava InvoiceCheckerDOMjava with ftpevarosenet)

Transform InvoiceCheckerDOMjava to read an invoice xml document which uses name spaces (Download skatextownInvoiceNSxml with ftpevarosenet)

Java API Specifications

To help you in developing Java programs Go to

httpjavasuncomj2se

Then click on

API Specifications

Then click on

J2SE

DOM-based Invoice Checkerimports

package comskatestowninvoice

import javaioInputStream

import orgw3cdomNode

import orgw3cdomNodeList

import orgw3cdomElement

import orgw3cdomCharacterData

import javaxxmlparsersDocumentBuilder

importjavaxxmlparsersDocumentBuilderFactory

SOAP

The Simple Access Object Protocol

Service requester Service provider

soapmessages

application object(client)

SOAP-basedmiddleware

application object(service provider)

SOAP-basedmiddleware

stub skeleton

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 12: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

Navigate and manipulate DOM parse tree

Key DOM interfaces (Fig29)Interface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()DocumentFragm

ent createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)Node

List

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Node (root) Interface key methods

+ getNodeName()String + getNodeValue()String + setNodeValue(nodeValueString)void +getNodeType()short +getParentNode()Node +getChildNodes()NodeList +getAttributes()NamedNodeMap

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Element Interface key methods

+getTagName()String +getAttribute(nameString)String +setAttribute(nameStringvalueString)void +hasAttribute(nameString)boolean

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

InterfaceElement

InterfaceAttr

Attribute Interface key methods

+getName()String +getValue()String +setValue(valueString)void

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

DOM has a name-space awareversion

API version of most key interfaces getAttributeNS(String nsURIString localName)

Example ldquohttpskatestowncomnsinvoicerdquo (ns URI) ldquoitemrdquo ldquotaxrdquo etc (local name wo prefix)

Requires the parser become name space aware

After

DocumentBuilderFactory factory=

DocumentBuilderFactorynewInstance()

insert

factorySetNamespaceAware(true)

Todays DOM exercise

Use DOM for invoice checker repeat last weeks exercise using a DOM parser instead

( Down load files InvoiceCheckerjava InvoiceCheckerDOMjava with ftpevarosenet)

Transform InvoiceCheckerDOMjava to read an invoice xml document which uses name spaces (Download skatextownInvoiceNSxml with ftpevarosenet)

Java API Specifications

To help you in developing Java programs Go to

httpjavasuncomj2se

Then click on

API Specifications

Then click on

J2SE

DOM-based Invoice Checkerimports

package comskatestowninvoice

import javaioInputStream

import orgw3cdomNode

import orgw3cdomNodeList

import orgw3cdomElement

import orgw3cdomCharacterData

import javaxxmlparsersDocumentBuilder

importjavaxxmlparsersDocumentBuilderFactory

SOAP

The Simple Access Object Protocol

Service requester Service provider

soapmessages

application object(client)

SOAP-basedmiddleware

application object(service provider)

SOAP-basedmiddleware

stub skeleton

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 13: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

Key DOM interfaces (Fig29)Interface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()DocumentFragm

ent createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)Node

List

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Node (root) Interface key methods

+ getNodeName()String + getNodeValue()String + setNodeValue(nodeValueString)void +getNodeType()short +getParentNode()Node +getChildNodes()NodeList +getAttributes()NamedNodeMap

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Element Interface key methods

+getTagName()String +getAttribute(nameString)String +setAttribute(nameStringvalueString)void +hasAttribute(nameString)boolean

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

InterfaceElement

InterfaceAttr

Attribute Interface key methods

+getName()String +getValue()String +setValue(valueString)void

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

DOM has a name-space awareversion

API version of most key interfaces getAttributeNS(String nsURIString localName)

Example ldquohttpskatestowncomnsinvoicerdquo (ns URI) ldquoitemrdquo ldquotaxrdquo etc (local name wo prefix)

Requires the parser become name space aware

After

DocumentBuilderFactory factory=

DocumentBuilderFactorynewInstance()

insert

factorySetNamespaceAware(true)

Todays DOM exercise

Use DOM for invoice checker repeat last weeks exercise using a DOM parser instead

( Down load files InvoiceCheckerjava InvoiceCheckerDOMjava with ftpevarosenet)

Transform InvoiceCheckerDOMjava to read an invoice xml document which uses name spaces (Download skatextownInvoiceNSxml with ftpevarosenet)

Java API Specifications

To help you in developing Java programs Go to

httpjavasuncomj2se

Then click on

API Specifications

Then click on

J2SE

DOM-based Invoice Checkerimports

package comskatestowninvoice

import javaioInputStream

import orgw3cdomNode

import orgw3cdomNodeList

import orgw3cdomElement

import orgw3cdomCharacterData

import javaxxmlparsersDocumentBuilder

importjavaxxmlparsersDocumentBuilderFactory

SOAP

The Simple Access Object Protocol

Service requester Service provider

soapmessages

application object(client)

SOAP-basedmiddleware

application object(service provider)

SOAP-basedmiddleware

stub skeleton

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 14: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()DocumentFragm

ent createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)Node

List

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Node (root) Interface key methods

+ getNodeName()String + getNodeValue()String + setNodeValue(nodeValueString)void +getNodeType()short +getParentNode()Node +getChildNodes()NodeList +getAttributes()NamedNodeMap

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Element Interface key methods

+getTagName()String +getAttribute(nameString)String +setAttribute(nameStringvalueString)void +hasAttribute(nameString)boolean

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

InterfaceElement

InterfaceAttr

Attribute Interface key methods

+getName()String +getValue()String +setValue(valueString)void

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

DOM has a name-space awareversion

API version of most key interfaces getAttributeNS(String nsURIString localName)

Example ldquohttpskatestowncomnsinvoicerdquo (ns URI) ldquoitemrdquo ldquotaxrdquo etc (local name wo prefix)

Requires the parser become name space aware

After

DocumentBuilderFactory factory=

DocumentBuilderFactorynewInstance()

insert

factorySetNamespaceAware(true)

Todays DOM exercise

Use DOM for invoice checker repeat last weeks exercise using a DOM parser instead

( Down load files InvoiceCheckerjava InvoiceCheckerDOMjava with ftpevarosenet)

Transform InvoiceCheckerDOMjava to read an invoice xml document which uses name spaces (Download skatextownInvoiceNSxml with ftpevarosenet)

Java API Specifications

To help you in developing Java programs Go to

httpjavasuncomj2se

Then click on

API Specifications

Then click on

J2SE

DOM-based Invoice Checkerimports

package comskatestowninvoice

import javaioInputStream

import orgw3cdomNode

import orgw3cdomNodeList

import orgw3cdomElement

import orgw3cdomCharacterData

import javaxxmlparsersDocumentBuilder

importjavaxxmlparsersDocumentBuilderFactory

SOAP

The Simple Access Object Protocol

Service requester Service provider

soapmessages

application object(client)

SOAP-basedmiddleware

application object(service provider)

SOAP-basedmiddleware

stub skeleton

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 15: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Node (root) Interface key methods

+ getNodeName()String + getNodeValue()String + setNodeValue(nodeValueString)void +getNodeType()short +getParentNode()Node +getChildNodes()NodeList +getAttributes()NamedNodeMap

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Element Interface key methods

+getTagName()String +getAttribute(nameString)String +setAttribute(nameStringvalueString)void +hasAttribute(nameString)boolean

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

InterfaceElement

InterfaceAttr

Attribute Interface key methods

+getName()String +getValue()String +setValue(valueString)void

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

DOM has a name-space awareversion

API version of most key interfaces getAttributeNS(String nsURIString localName)

Example ldquohttpskatestowncomnsinvoicerdquo (ns URI) ldquoitemrdquo ldquotaxrdquo etc (local name wo prefix)

Requires the parser become name space aware

After

DocumentBuilderFactory factory=

DocumentBuilderFactorynewInstance()

insert

factorySetNamespaceAware(true)

Todays DOM exercise

Use DOM for invoice checker repeat last weeks exercise using a DOM parser instead

( Down load files InvoiceCheckerjava InvoiceCheckerDOMjava with ftpevarosenet)

Transform InvoiceCheckerDOMjava to read an invoice xml document which uses name spaces (Download skatextownInvoiceNSxml with ftpevarosenet)

Java API Specifications

To help you in developing Java programs Go to

httpjavasuncomj2se

Then click on

API Specifications

Then click on

J2SE

DOM-based Invoice Checkerimports

package comskatestowninvoice

import javaioInputStream

import orgw3cdomNode

import orgw3cdomNodeList

import orgw3cdomElement

import orgw3cdomCharacterData

import javaxxmlparsersDocumentBuilder

importjavaxxmlparsersDocumentBuilderFactory

SOAP

The Simple Access Object Protocol

Service requester Service provider

soapmessages

application object(client)

SOAP-basedmiddleware

application object(service provider)

SOAP-basedmiddleware

stub skeleton

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 16: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

Document Interface key methods

createElement(tagNameString)Element createDocumentFragment()Fragment createTextNode(dataString)Text createAttribute(nameString)Attr getElementsByTagname(tagnameString)No

deList

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Node (root) Interface key methods

+ getNodeName()String + getNodeValue()String + setNodeValue(nodeValueString)void +getNodeType()short +getParentNode()Node +getChildNodes()NodeList +getAttributes()NamedNodeMap

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Element Interface key methods

+getTagName()String +getAttribute(nameString)String +setAttribute(nameStringvalueString)void +hasAttribute(nameString)boolean

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

InterfaceElement

InterfaceAttr

Attribute Interface key methods

+getName()String +getValue()String +setValue(valueString)void

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

DOM has a name-space awareversion

API version of most key interfaces getAttributeNS(String nsURIString localName)

Example ldquohttpskatestowncomnsinvoicerdquo (ns URI) ldquoitemrdquo ldquotaxrdquo etc (local name wo prefix)

Requires the parser become name space aware

After

DocumentBuilderFactory factory=

DocumentBuilderFactorynewInstance()

insert

factorySetNamespaceAware(true)

Todays DOM exercise

Use DOM for invoice checker repeat last weeks exercise using a DOM parser instead

( Down load files InvoiceCheckerjava InvoiceCheckerDOMjava with ftpevarosenet)

Transform InvoiceCheckerDOMjava to read an invoice xml document which uses name spaces (Download skatextownInvoiceNSxml with ftpevarosenet)

Java API Specifications

To help you in developing Java programs Go to

httpjavasuncomj2se

Then click on

API Specifications

Then click on

J2SE

DOM-based Invoice Checkerimports

package comskatestowninvoice

import javaioInputStream

import orgw3cdomNode

import orgw3cdomNodeList

import orgw3cdomElement

import orgw3cdomCharacterData

import javaxxmlparsersDocumentBuilder

importjavaxxmlparsersDocumentBuilderFactory

SOAP

The Simple Access Object Protocol

Service requester Service provider

soapmessages

application object(client)

SOAP-basedmiddleware

application object(service provider)

SOAP-basedmiddleware

stub skeleton

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 17: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Node (root) Interface key methods

+ getNodeName()String + getNodeValue()String + setNodeValue(nodeValueString)void +getNodeType()short +getParentNode()Node +getChildNodes()NodeList +getAttributes()NamedNodeMap

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Element Interface key methods

+getTagName()String +getAttribute(nameString)String +setAttribute(nameStringvalueString)void +hasAttribute(nameString)boolean

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

InterfaceElement

InterfaceAttr

Attribute Interface key methods

+getName()String +getValue()String +setValue(valueString)void

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

DOM has a name-space awareversion

API version of most key interfaces getAttributeNS(String nsURIString localName)

Example ldquohttpskatestowncomnsinvoicerdquo (ns URI) ldquoitemrdquo ldquotaxrdquo etc (local name wo prefix)

Requires the parser become name space aware

After

DocumentBuilderFactory factory=

DocumentBuilderFactorynewInstance()

insert

factorySetNamespaceAware(true)

Todays DOM exercise

Use DOM for invoice checker repeat last weeks exercise using a DOM parser instead

( Down load files InvoiceCheckerjava InvoiceCheckerDOMjava with ftpevarosenet)

Transform InvoiceCheckerDOMjava to read an invoice xml document which uses name spaces (Download skatextownInvoiceNSxml with ftpevarosenet)

Java API Specifications

To help you in developing Java programs Go to

httpjavasuncomj2se

Then click on

API Specifications

Then click on

J2SE

DOM-based Invoice Checkerimports

package comskatestowninvoice

import javaioInputStream

import orgw3cdomNode

import orgw3cdomNodeList

import orgw3cdomElement

import orgw3cdomCharacterData

import javaxxmlparsersDocumentBuilder

importjavaxxmlparsersDocumentBuilderFactory

SOAP

The Simple Access Object Protocol

Service requester Service provider

soapmessages

application object(client)

SOAP-basedmiddleware

application object(service provider)

SOAP-basedmiddleware

stub skeleton

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 18: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

Node (root) Interface key methods

+ getNodeName()String + getNodeValue()String + setNodeValue(nodeValueString)void +getNodeType()short +getParentNode()Node +getChildNodes()NodeList +getAttributes()NamedNodeMap

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Element Interface key methods

+getTagName()String +getAttribute(nameString)String +setAttribute(nameStringvalueString)void +hasAttribute(nameString)boolean

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

InterfaceElement

InterfaceAttr

Attribute Interface key methods

+getName()String +getValue()String +setValue(valueString)void

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

DOM has a name-space awareversion

API version of most key interfaces getAttributeNS(String nsURIString localName)

Example ldquohttpskatestowncomnsinvoicerdquo (ns URI) ldquoitemrdquo ldquotaxrdquo etc (local name wo prefix)

Requires the parser become name space aware

After

DocumentBuilderFactory factory=

DocumentBuilderFactorynewInstance()

insert

factorySetNamespaceAware(true)

Todays DOM exercise

Use DOM for invoice checker repeat last weeks exercise using a DOM parser instead

( Down load files InvoiceCheckerjava InvoiceCheckerDOMjava with ftpevarosenet)

Transform InvoiceCheckerDOMjava to read an invoice xml document which uses name spaces (Download skatextownInvoiceNSxml with ftpevarosenet)

Java API Specifications

To help you in developing Java programs Go to

httpjavasuncomj2se

Then click on

API Specifications

Then click on

J2SE

DOM-based Invoice Checkerimports

package comskatestowninvoice

import javaioInputStream

import orgw3cdomNode

import orgw3cdomNodeList

import orgw3cdomElement

import orgw3cdomCharacterData

import javaxxmlparsersDocumentBuilder

importjavaxxmlparsersDocumentBuilderFactory

SOAP

The Simple Access Object Protocol

Service requester Service provider

soapmessages

application object(client)

SOAP-basedmiddleware

application object(service provider)

SOAP-basedmiddleware

stub skeleton

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 19: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

Element Interface key methods

+getTagName()String +getAttribute(nameString)String +setAttribute(nameStringvalueString)void +hasAttribute(nameString)boolean

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

InterfaceElement

InterfaceAttr

Attribute Interface key methods

+getName()String +getValue()String +setValue(valueString)void

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

DOM has a name-space awareversion

API version of most key interfaces getAttributeNS(String nsURIString localName)

Example ldquohttpskatestowncomnsinvoicerdquo (ns URI) ldquoitemrdquo ldquotaxrdquo etc (local name wo prefix)

Requires the parser become name space aware

After

DocumentBuilderFactory factory=

DocumentBuilderFactorynewInstance()

insert

factorySetNamespaceAware(true)

Todays DOM exercise

Use DOM for invoice checker repeat last weeks exercise using a DOM parser instead

( Down load files InvoiceCheckerjava InvoiceCheckerDOMjava with ftpevarosenet)

Transform InvoiceCheckerDOMjava to read an invoice xml document which uses name spaces (Download skatextownInvoiceNSxml with ftpevarosenet)

Java API Specifications

To help you in developing Java programs Go to

httpjavasuncomj2se

Then click on

API Specifications

Then click on

J2SE

DOM-based Invoice Checkerimports

package comskatestowninvoice

import javaioInputStream

import orgw3cdomNode

import orgw3cdomNodeList

import orgw3cdomElement

import orgw3cdomCharacterData

import javaxxmlparsersDocumentBuilder

importjavaxxmlparsersDocumentBuilderFactory

SOAP

The Simple Access Object Protocol

Service requester Service provider

soapmessages

application object(client)

SOAP-basedmiddleware

application object(service provider)

SOAP-basedmiddleware

stub skeleton

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 20: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

Element Interface key methods

+getTagName()String +getAttribute(nameString)String +setAttribute(nameStringvalueString)void +hasAttribute(nameString)boolean

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

InterfaceElement

InterfaceAttr

Attribute Interface key methods

+getName()String +getValue()String +setValue(valueString)void

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

DOM has a name-space awareversion

API version of most key interfaces getAttributeNS(String nsURIString localName)

Example ldquohttpskatestowncomnsinvoicerdquo (ns URI) ldquoitemrdquo ldquotaxrdquo etc (local name wo prefix)

Requires the parser become name space aware

After

DocumentBuilderFactory factory=

DocumentBuilderFactorynewInstance()

insert

factorySetNamespaceAware(true)

Todays DOM exercise

Use DOM for invoice checker repeat last weeks exercise using a DOM parser instead

( Down load files InvoiceCheckerjava InvoiceCheckerDOMjava with ftpevarosenet)

Transform InvoiceCheckerDOMjava to read an invoice xml document which uses name spaces (Download skatextownInvoiceNSxml with ftpevarosenet)

Java API Specifications

To help you in developing Java programs Go to

httpjavasuncomj2se

Then click on

API Specifications

Then click on

J2SE

DOM-based Invoice Checkerimports

package comskatestowninvoice

import javaioInputStream

import orgw3cdomNode

import orgw3cdomNodeList

import orgw3cdomElement

import orgw3cdomCharacterData

import javaxxmlparsersDocumentBuilder

importjavaxxmlparsersDocumentBuilderFactory

SOAP

The Simple Access Object Protocol

Service requester Service provider

soapmessages

application object(client)

SOAP-basedmiddleware

application object(service provider)

SOAP-basedmiddleware

stub skeleton

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 21: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

InterfaceElement

InterfaceAttr

Attribute Interface key methods

+getName()String +getValue()String +setValue(valueString)void

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

DOM has a name-space awareversion

API version of most key interfaces getAttributeNS(String nsURIString localName)

Example ldquohttpskatestowncomnsinvoicerdquo (ns URI) ldquoitemrdquo ldquotaxrdquo etc (local name wo prefix)

Requires the parser become name space aware

After

DocumentBuilderFactory factory=

DocumentBuilderFactorynewInstance()

insert

factorySetNamespaceAware(true)

Todays DOM exercise

Use DOM for invoice checker repeat last weeks exercise using a DOM parser instead

( Down load files InvoiceCheckerjava InvoiceCheckerDOMjava with ftpevarosenet)

Transform InvoiceCheckerDOMjava to read an invoice xml document which uses name spaces (Download skatextownInvoiceNSxml with ftpevarosenet)

Java API Specifications

To help you in developing Java programs Go to

httpjavasuncomj2se

Then click on

API Specifications

Then click on

J2SE

DOM-based Invoice Checkerimports

package comskatestowninvoice

import javaioInputStream

import orgw3cdomNode

import orgw3cdomNodeList

import orgw3cdomElement

import orgw3cdomCharacterData

import javaxxmlparsersDocumentBuilder

importjavaxxmlparsersDocumentBuilderFactory

SOAP

The Simple Access Object Protocol

Service requester Service provider

soapmessages

application object(client)

SOAP-basedmiddleware

application object(service provider)

SOAP-basedmiddleware

stub skeleton

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 22: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

Attribute Interface key methods

+getName()String +getValue()String +setValue(valueString)void

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

DOM has a name-space awareversion

API version of most key interfaces getAttributeNS(String nsURIString localName)

Example ldquohttpskatestowncomnsinvoicerdquo (ns URI) ldquoitemrdquo ldquotaxrdquo etc (local name wo prefix)

Requires the parser become name space aware

After

DocumentBuilderFactory factory=

DocumentBuilderFactorynewInstance()

insert

factorySetNamespaceAware(true)

Todays DOM exercise

Use DOM for invoice checker repeat last weeks exercise using a DOM parser instead

( Down load files InvoiceCheckerjava InvoiceCheckerDOMjava with ftpevarosenet)

Transform InvoiceCheckerDOMjava to read an invoice xml document which uses name spaces (Download skatextownInvoiceNSxml with ftpevarosenet)

Java API Specifications

To help you in developing Java programs Go to

httpjavasuncomj2se

Then click on

API Specifications

Then click on

J2SE

DOM-based Invoice Checkerimports

package comskatestowninvoice

import javaioInputStream

import orgw3cdomNode

import orgw3cdomNodeList

import orgw3cdomElement

import orgw3cdomCharacterData

import javaxxmlparsersDocumentBuilder

importjavaxxmlparsersDocumentBuilderFactory

SOAP

The Simple Access Object Protocol

Service requester Service provider

soapmessages

application object(client)

SOAP-basedmiddleware

application object(service provider)

SOAP-basedmiddleware

stub skeleton

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 23: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

Key DOM interfacesInterface

NodeList

Interface

CharacterData

Interface

Text

Interface

Node

Interface

Document

Interface

NamedNodeMap

Interface

Element

Interface

Attr

DOM has a name-space awareversion

API version of most key interfaces getAttributeNS(String nsURIString localName)

Example ldquohttpskatestowncomnsinvoicerdquo (ns URI) ldquoitemrdquo ldquotaxrdquo etc (local name wo prefix)

Requires the parser become name space aware

After

DocumentBuilderFactory factory=

DocumentBuilderFactorynewInstance()

insert

factorySetNamespaceAware(true)

Todays DOM exercise

Use DOM for invoice checker repeat last weeks exercise using a DOM parser instead

( Down load files InvoiceCheckerjava InvoiceCheckerDOMjava with ftpevarosenet)

Transform InvoiceCheckerDOMjava to read an invoice xml document which uses name spaces (Download skatextownInvoiceNSxml with ftpevarosenet)

Java API Specifications

To help you in developing Java programs Go to

httpjavasuncomj2se

Then click on

API Specifications

Then click on

J2SE

DOM-based Invoice Checkerimports

package comskatestowninvoice

import javaioInputStream

import orgw3cdomNode

import orgw3cdomNodeList

import orgw3cdomElement

import orgw3cdomCharacterData

import javaxxmlparsersDocumentBuilder

importjavaxxmlparsersDocumentBuilderFactory

SOAP

The Simple Access Object Protocol

Service requester Service provider

soapmessages

application object(client)

SOAP-basedmiddleware

application object(service provider)

SOAP-basedmiddleware

stub skeleton

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 24: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

DOM has a name-space awareversion

API version of most key interfaces getAttributeNS(String nsURIString localName)

Example ldquohttpskatestowncomnsinvoicerdquo (ns URI) ldquoitemrdquo ldquotaxrdquo etc (local name wo prefix)

Requires the parser become name space aware

After

DocumentBuilderFactory factory=

DocumentBuilderFactorynewInstance()

insert

factorySetNamespaceAware(true)

Todays DOM exercise

Use DOM for invoice checker repeat last weeks exercise using a DOM parser instead

( Down load files InvoiceCheckerjava InvoiceCheckerDOMjava with ftpevarosenet)

Transform InvoiceCheckerDOMjava to read an invoice xml document which uses name spaces (Download skatextownInvoiceNSxml with ftpevarosenet)

Java API Specifications

To help you in developing Java programs Go to

httpjavasuncomj2se

Then click on

API Specifications

Then click on

J2SE

DOM-based Invoice Checkerimports

package comskatestowninvoice

import javaioInputStream

import orgw3cdomNode

import orgw3cdomNodeList

import orgw3cdomElement

import orgw3cdomCharacterData

import javaxxmlparsersDocumentBuilder

importjavaxxmlparsersDocumentBuilderFactory

SOAP

The Simple Access Object Protocol

Service requester Service provider

soapmessages

application object(client)

SOAP-basedmiddleware

application object(service provider)

SOAP-basedmiddleware

stub skeleton

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 25: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

Requires the parser become name space aware

After

DocumentBuilderFactory factory=

DocumentBuilderFactorynewInstance()

insert

factorySetNamespaceAware(true)

Todays DOM exercise

Use DOM for invoice checker repeat last weeks exercise using a DOM parser instead

( Down load files InvoiceCheckerjava InvoiceCheckerDOMjava with ftpevarosenet)

Transform InvoiceCheckerDOMjava to read an invoice xml document which uses name spaces (Download skatextownInvoiceNSxml with ftpevarosenet)

Java API Specifications

To help you in developing Java programs Go to

httpjavasuncomj2se

Then click on

API Specifications

Then click on

J2SE

DOM-based Invoice Checkerimports

package comskatestowninvoice

import javaioInputStream

import orgw3cdomNode

import orgw3cdomNodeList

import orgw3cdomElement

import orgw3cdomCharacterData

import javaxxmlparsersDocumentBuilder

importjavaxxmlparsersDocumentBuilderFactory

SOAP

The Simple Access Object Protocol

Service requester Service provider

soapmessages

application object(client)

SOAP-basedmiddleware

application object(service provider)

SOAP-basedmiddleware

stub skeleton

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 26: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

Todays DOM exercise

Use DOM for invoice checker repeat last weeks exercise using a DOM parser instead

( Down load files InvoiceCheckerjava InvoiceCheckerDOMjava with ftpevarosenet)

Transform InvoiceCheckerDOMjava to read an invoice xml document which uses name spaces (Download skatextownInvoiceNSxml with ftpevarosenet)

Java API Specifications

To help you in developing Java programs Go to

httpjavasuncomj2se

Then click on

API Specifications

Then click on

J2SE

DOM-based Invoice Checkerimports

package comskatestowninvoice

import javaioInputStream

import orgw3cdomNode

import orgw3cdomNodeList

import orgw3cdomElement

import orgw3cdomCharacterData

import javaxxmlparsersDocumentBuilder

importjavaxxmlparsersDocumentBuilderFactory

SOAP

The Simple Access Object Protocol

Service requester Service provider

soapmessages

application object(client)

SOAP-basedmiddleware

application object(service provider)

SOAP-basedmiddleware

stub skeleton

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 27: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

Java API Specifications

To help you in developing Java programs Go to

httpjavasuncomj2se

Then click on

API Specifications

Then click on

J2SE

DOM-based Invoice Checkerimports

package comskatestowninvoice

import javaioInputStream

import orgw3cdomNode

import orgw3cdomNodeList

import orgw3cdomElement

import orgw3cdomCharacterData

import javaxxmlparsersDocumentBuilder

importjavaxxmlparsersDocumentBuilderFactory

SOAP

The Simple Access Object Protocol

Service requester Service provider

soapmessages

application object(client)

SOAP-basedmiddleware

application object(service provider)

SOAP-basedmiddleware

stub skeleton

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 28: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

DOM-based Invoice Checkerimports

package comskatestowninvoice

import javaioInputStream

import orgw3cdomNode

import orgw3cdomNodeList

import orgw3cdomElement

import orgw3cdomCharacterData

import javaxxmlparsersDocumentBuilder

importjavaxxmlparsersDocumentBuilderFactory

SOAP

The Simple Access Object Protocol

Service requester Service provider

soapmessages

application object(client)

SOAP-basedmiddleware

application object(service provider)

SOAP-basedmiddleware

stub skeleton

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 29: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

SOAP

The Simple Access Object Protocol

Service requester Service provider

soapmessages

application object(client)

SOAP-basedmiddleware

application object(service provider)

SOAP-basedmiddleware

stub skeleton

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 30: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

Service requester Service provider

soapmessages

application object(client)

SOAP-basedmiddleware

application object(service provider)

SOAP-basedmiddleware

stub skeleton

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 31: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

Structure and content of a SOAP message

All SOAP messages are XML documentscontaining the elements

1 Required envelope element 2 Optional header element

3 Required body element 4 Optional fault element

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 32: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

SOAP namespaces

The 4 principal elements are declared in the default namespace for the SOAP envelope httpwwww3org200112soap-envelope

The default namespace for SOAP encoding and data types httpwwww3org200112soap-encoding

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 33: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

Important syntax rules

Soap messages must be encoded using XML

Soap messages must use the SOAP envelope namespace

SOAP messages must use the SOAP encoding namespace

SOAP messages must not contain XML processing instructions

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 34: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

SOAP envelope

SOAP header

SOAP body

SOAP MESSAGE

header block

header block

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 35: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

SOAP request

ltxml version=10gtltsoapEnvelope xmlnssoap=httpwwww3org200112soap-envelope soapencodingStyle= httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPricegt ltmStockNamegtIBMltmStockNamegt ltmGetStockPricegt ltsoapBodygt ltsoapEnvelopegt

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 36: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

SOAP response

ltxml version=10gtltsoapEnvelopexmlnssoap=httpwwww3org200112soap-envelopesoapencodingStyle=httpwwww3org200112soap-encodinggt

ltsoapBody xmlnsm=httpwwwexampleorgstockgt ltmGetStockPriceResponsegt ltmPricegt345ltmPricegt ltmGetStockPriceResponsegt ltsoapBodygt

ltsoapEnvelopegt

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 37: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

Calling the googleSearch web service

download axis 2 (soap library) either from

ftpevarosenet or httpwsapacheorg unpack the axis 2 zip-archive current directory must be samples

googleSearch run the Runbat script enter 1) axis 2) marist what is the effect

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38
Page 38: Web services. DOM parsing and SOAP.. Summary. ● Exercise: SAX-Based checkInvoice(), ● push parsing, ● event-based parsing, ● traversal order is depth-first

See you next week for

The Web Service Description Language (WSDL)

Assignment 1

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 37
  • Slide 38