Revision for Principles and Applications of Web Services

I’ve neglected to blog for a while and figure that since repetition is the best way to learn I should kill two birds with one stone and share a little of what I’ve been going through today.. So read on if you’re trying to sleep – it’ll help cure insomnia – trust me.

Web services:

The main difference between a web site and a web service is:

  • A web service is designed to work with any type of client or device using XML messaging
  • A web site is designed to work using a web browser client using html, xhtml and css

A web service consumer is a program which uses information provided by other applications in a network environment.

A web service provider is a software agent that will undertake work on behalf of a client application.

A service request is a message sent from one application to another for data to meet the applications needs.

A function oriented service is where an application performs a function and returns a result based on the inputs supplied.

The main reason security is such a difficult issue for web services is that unknown people and applications should be able to access the service – this means they need to be very open which leaves them vulnerable.

The role of WSDL in web service architecture is to describe the interface to the server; it describes what the web service can do, where it can be found and how it can be invoked.


The two main benefits that come from using xml to create documents are that it:

  • Separates the content from it’s structure
  • Allows the use of more meaningful tag names

The main advantages of using an xml schema instead of a DTD are that an xml schema allows you to define both data types and namespaces which a DTD doesn’t.

An xml document can be well formed without an associated DTD (Document Type Definition) or Schema – so long as it adheres to the syntax rules laid out in the xml 1.0 recommendation:

  • There can be only one root element.
  • Every start tag must have a matching closing tag.
  • Empty elements can omit the closing tag, but, if they do so, must have a forward slash before the closing angle bracket (/>).
  • Elements must be properly nested.
  • Attribute values must be in quotes.
  • In the content of an element or attribute value, < and &; must be replaced by &lt; and &amp;┬árespectively.

In order to be validated an xml document must have an associated schema or DTD to be validated against.

So to reiterate; The difference between an xml document being valid or well formed is:

  • Well-formed: The XML code must be syntactically correct.
  • Valid: If the XML file has an associated XML Schema/ DTD, the elements must appear in the defined structure and the content of the individual elements must conform to the declared data types specified in the schema.

The root node of an xml document tree is the first element at the top of the document.


The namespace is defined by the xmlns attribute in the start tag of an element.

The namespace declaration has the following syntax: xmlns:prefix=”URI”.


Two benefits that come from using XML Schema Definitions (XSDs) in specifying document formats, that do not apply to DTDs are:

  • An XSD enables you to specify the format of character data within an element
  • An XSD enables you to give an allowed maximum for an attribute value

To show that an element is optional at a particular point in an XML schema you should include minOccurs=”0″ in the elements definition.


There are three types of DTD:

  • Strict; free of all deprecated tags and framesets
  • Transitional; includes deprecated tags
  • Frameset; framesets (with or without deprecated tags)

To show that an element is optional in a DTD you should follow the elements name with a question mark.


A parser is a program that performs parsing; parsing is a method of stripping away xml markup tags leaving only the data which can then be processed further.

Before parsing a DTD or Schema must be referenced to identify the validated markup tags and their structure definition.

You do not need a parser to read an xml document.


Extensible Stylesheet Language Transformations (XSLT) is most accurately described as a means to transform XML markup into another markup format for use by other applications.

..and there I must leave you – t’other half is kicking me off the pc to get some kip so I’m fresh in the morning to carry on revising this stuff – you envy me don’t you – go on.. admit it, you so wish you were me right now..

2 thoughts on “Revision for Principles and Applications of Web Services

  1. Vics

    ahahahaaa! glad somebody did..

    actually I think I passed this exam – will know for sure around the end of July when we get our results.

Comments are closed.