Unformatted text preview:

XML and Web Services BA 370XML and Web ServicesLeo Putra MardjukiChristopher William LeeCorey Fung ChanBA 370, Dr. René F. ReitsmaDecember 2, 20050XML and Web Services BA 370AbstractDespite of its recent creation, XML is one of the biggest breakthroughs in the lastdecade. Its main purpose is to describe data. However, it is also being used by severalindustry for structuring, storing, and sending information. It has been amazing to see howquickly the XML standard has been developed, and how quickly a large number ofsoftware vendors have adopted the standard. Furthermore, we strongly believe that XMLwill be as important to the future of the Web as HTML has been to the foundation of theWeb. Nevertheless, upon learning on its benefits towards businesses and personal usage,XML technology is likely to become a standard for all data transmission and datamanipulation over the Web.Web services, on of the most important XML-based technologies, providesimplicity throughout the web because they provide a standard for exchanginginformation. There are three main elements used in Web services; UDDI, SOAP, WSDL.1XML and Web Services BA 370XML BasicsOrigin of XMLXML emerged as a way to overcome the shortcomings of its two predecessors,SGML and HTML which were both very successful markup languages, but were bothflawed in certain ways.SGML is complex, not made for the web, and also expensive. Furthermore, it isnot being supported by commercial browsers.HTML is free, simple, and also widely supported. However, it has no provisionsfor extending itself in a standard way into new tags or data structures, and is too limited.Therefore, in 1996, the World Wide Web Consortium (W3C) decided to sponsor agroup of people from Sun to define a markup language with the power and extensibilityof SGML but with the simplicity of HTML. Jon Bosak led the creation of XML specification of the W3C. He organized theW3C XML activity in 1996 and has chaired the W3C XML Working Group since itsinception. In 1998, the W3C approved Version 1.0 of the XML specification and a newlanguage was born.Uses of XMLXML has many different uses which could benefit us in several ways. It can keep data separated from your HTML, used to store data inside HTML documents, used as a format to exchange information, and also used to store data in files or in databases.What is XMLXML stands for eXtensible Markup Language. It is designed to meet thechallenges of large-scale electronic publishing and data exchange. It plays important rolesin the exchange of a wide variety of data across the web, especially for documents thatare rich in data such as sales and inventory data.XML is a metalanguage -- written in SGML. It allows an individual to definehis/her own language and applications, and establishes rules about formatting andmarking up a document.2XML and Web Services BA 370Simple structure of XMLFigure 1 (below) shows a simple XML example of storing OSU Student data. Figure 1 (XML example)Line 1-- <?xml version="1.0"?> Line 2-- <OSU>Line 3-- <OSU Student>Line 4-- <Student ID>123456789</Student ID>Line 5-- <Major>Business</Major>Line 6-- <FirstName>Don</FirstName>Line 7-- <MiddleName>Won</MiddleName>Line 8-- <LastName>Demarko</LastName>Line 9-- </OSU Student>Line 10-- </OSU>The first line of code defines the XML version and the character encoding used inthe document. In this case the document conforms to the 1.0 specification of XML. Thenext line shows how XML stores the information. XML stores information by using elements, which are containers that containdata and structure data according to the author’s likings. Elements are the tags in XMLsuch as <OSU Students> or <Student ID>. In XML, there must be a hierarchical structure of elements. Line 2 describes theroot element, line 3 the sub element, Line 4 through Line 8 are sub child elements, andfinally, the last lines defines the end of root element. This hierarchical structure of elements is used to describe data. Think of it as theroot element as the main topic and the sub elements within sub elements are the detailedinformation about the main topic. Since the naming and structuring of elements are notpredefined, there must be a conceptual framework that describes the underlying structureof an individual’s collection of elements. There are two types of ways of doing this; through DTDs or Schemas.What is SchemaA schema is a conceptual framework that describes the underlying structure of anindividual’s collection of elements. It defines the “vocabularies” of an element types andattributes for a given class of documents and allows individual to share those documentswith other applications. In addition, a schema also plays a role in information retrieval.Schemas can be formally defined as DTDs.3XML and Web Services BA 370What is DTDDTD stands for Document Type Declaration. Its main functions are to define thelegal building blocks of an XML document and also to define the document structurewith a list of legal elements. There are two types of DTDs; internal DTDs (Figure 3) andexternal DTDs (Figure 2).External DTDIf the DTD is external to your XML source file, it is an external DTD. Thebenefits of using external DTDs is that they can more easily and efficiently be shared bymore than one XML document, you can write a DTD once and have multiple documentsreference it. External DTDs saves time by reducing the typing needed if you made all yourDTDs internal. If changes are made to the central DTD, all documents that rely on theDTD are updated in one fell swoop. Thus, if you’re using a DTD for multiple documents,it makes more sense to have the DTD in a separate "external" file. (DTD changes will notnecessarily be backwards compatible, so watch out!).Figure 2 (Example of External DTD)XML-fragmentLine 1a-- <?xml version=”1.0”?>Line 2a--<!DOCTYPE note SYSTEM “note.dtd”>Line 3a--<note>Line 4a--<to>Tove</to>Line 5a--<from>Jani</from>Line 6a--<heading>Reminder</heading>Line 7a--<body>See you later</body>Line 8a--</note> Note.dtdLine 1b--<!ELEMENT note(to,from,heading,body)>Line 2b--<!ELEMENT to (#PCDATA)>Line 3b--<!ELEMENT from (#PCDATA)>Line 4b--<!ELEMENT heading (#PCDATA)>Line 5b--<!ELEMENT body (#PCDATA)>Figure 2 is an XML source file. The important thing to notice is Line 2a, which iswhere the XML file gives the location of the external DTD file


View Full Document

OSU BA 370 - XML and Web Services

Download XML and Web Services
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view XML and Web Services and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view XML and Web Services 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?