Presentation is loading. Please wait.

Presentation is loading. Please wait.

By HITESHWAR KUMAR AZAD Ph.D Scholar

Similar presentations


Presentation on theme: "By HITESHWAR KUMAR AZAD Ph.D Scholar"— Presentation transcript:

1 By HITESHWAR KUMAR AZAD Ph.D Scholar
XML WEB SERVICES By HITESHWAR KUMAR AZAD Ph.D Scholar

2 Syllabus XML: Introduction to XML, DTD, CSS, Namespace, Schema, XSD, XSL. Introduction to Web Services : The Web Services Type System , DataType Mappings SOAP: Communication on the Web WSDL: Describing Web Services  SOAP Tools : SOAP Toolkit ,components and architecture, exposing and invoke Web services. Developing Web Services : Using ASP.Net application using C# programming environment. Web Services : Working with WSDL, and invoking them using .NET client /Java Client through the code. SOAP Header : Managing the risks of Web Service, Interface-Based Web Service Development of Interface-based Programming: WSDL bindings, Reusable Web Services Infrastructure  UDDI: A Web Service, Framework & sample applications SOAP Toolkit interoperability

3 Course structure & marks distribution
Course name: XML web services Course code: IT 1823 L-T-P: 3-0-3 Credits: 5 Total marks: 100 Theory : 60 marks Lab : 40 marks

4 Marks distribution

5 Marks distribution

6 Books Text Books: 1. XML 1.1 Bible, Edition by Elliotte Rusty Harold (Wiley) 2. XML Web Services & Data Revolution by Coyle (Pearson Education Asia) Reference Books : 1. Beginning XML by David Hunter, Andrew Watt ( Wrox Publication) 2.Professional ASP.NET 2.0 by Thiru Thangarathinam ( Wrox Publication)

7 XML: eXtensive Markup Language
XML is simply a text document that allows users to store data in a structured manner that also encodes information or “ metadata” as to what that data means. XML was designed to store and transport data. XML was design to be both human and machine readable. XML is a software and hardware independent tool for storing and transporting data.

8 XML example <?xml version=“1.0” encoding=“UTF-8”?> <note> <to>Tom</to> <from>Jerry</from> <heading>Reminder</heading> <body>Don’t forget me this weekend</body> </note>

9 XML As a self-Describing language
<?xml version=“1.0”?> <the_following_text_is_my_college>NIT Patna</the_following_text_is_my_college>

10 XML An XML document consists of the following parts: Prolog Body
XML declaration Optional processing instruction Comments Document Type Declaration

11 XML Declaration Comments <?xml version=“1.0” encoding=“UTF-8”?>
It is not mandatory, but w3c recommends it. XML Declaration: <?xml version=“1.0”?> encoding : it specifies the type of encoding scheme used in the document. <?xml version=“1.0” encoding=“UTF-8”?> UTF: (Unicode Transformation Format) Standalone: this optional indicates whether the document can be processed as a standalone document or is dependents on other documents. <?xml version=“1.0” encoding=“UTF-8” standalone=“no”?> Comments Starts with <!--and end with --> <!--comment text -->

12 XML BODY <?xml version="1.0" encoding="UTF-8"?> <bookstore>   <book category="cooking">     <title lang="en">Everyday Italian</title>     <author>Giada De Laurentiis</author>     <year>2005</year>     <price>30.00</price>   </book>   <book category="children">     <title lang="en">Harry Potter</title>     <author>J K. Rowling</author>     <year>2005</year>     <price>29.99</price>   </book>   <book category="web">     <title lang="en">Learning XML</title>     <author>Erik T. Ray</author>     <year>2003</year>     <price>39.95</price>   </book> </bookstore>

13 Rule of XML structure All XML Elements Must Have a Closing Tag
<markup>this is wrong <markup> since there is no closing tag XML Tags are Case Sensitive <Message>This is incorrect</message> <message>This is correct</message> XML Elements Must be Properly Nested <oxygen><nitrogen> These tag are improperly nested</oxygen></nitrogen> XML Attribute Values Must be Quoted <note date=12/11/2007>   <to>Tove</to>   <from>Jani</from> </note>

14 Rule of XML structure XML Documents Must Have a single Root Element
<?xml version=“1.0”?> <father> <son> <daughter> </daughter> </son> </father> <mother> </mother>

15 XML Elements What is an XML Element? text attributes other elements
An XML element is everything from (including) the element's start tag to (Including) the element's end tag. <price>29.99</price> An element can contain: text attributes other elements or a mix of the above <bookstore>   <book category="children">     <title>Harry Potter</title>     <author>J K. Rowling</author>     <year>2005</year>     <price>29.99</price>   </book>   <book category="web">     <title>Learning XML</title>     <author>Erik T. Ray</author>     <year>2003</year>     <price>39.95</price>   </book> </bookstore>

16 <book> has an attribute (category="children").
<bookstore>   <book category="children">     <title>Harry Potter</title>     <author>J K. Rowling</author>     <year>2005</year>     <price>29.99</price>   </book>   <book category="web">     <title>Learning XML</title>     <author>Erik T. Ray</author>     <year>2003</year>     <price>39.95</price>   </book> </bookstore> <title>, <author>, <year>, and <price> have text content because they contain text (like 29.99). <bookstore> and <book> have element contents, because they contain elements. <book> has an attribute (category="children").

17 XML Attributes XML elements can have attributes, just like HTML.
Attributes are designed to contain data related to a specific element. XML Attributes Must be Quoted <person gender="female"> or <person gender='female'> If the attribute value itself contains double quotes you can use single quotes, like in this example: <gangster name='George "Shotgun" Ziegler'>

18 XML Elements vs. Attributes
<person gender="female">   <firstname>Anna</firstname>   <lastname>Smith</lastname> </person> <person>   <gender>female</gender>   <firstname>Anna</firstname>   <lastname>Smith</lastname> </person>

19 A date attribute is used in the first example:
The following three XML documents contain exactly the same information: A date attribute is used in the first example: <note date=" ">   <to>Tove</to>   <from>Jani</from> </note> A <date> element is used in the second example: <note>   <date> </date>   <to>Tove</to>   <from>Jani</from> </note> An expanded <date> element is used in the third example: <note>   <date>     <year>2008</year>     <month>01</month>     <day>10</day>   </date>   <to>Tove</to>   <from>Jani</from> </note>

20 XML Attributes for Metadata
metadata (data about data) should be stored as attributes, and the data itself should be stored as elements. <messages>   <note id="501">     <to>Tove</to>     <from>Jani</from>     <heading>Reminder</heading>     <body>Don't forget me this weekend!</body>   </note>   <note id="502">     <to>Jani</to>     <from>Tove</from>     <heading>Re: Reminder</heading>     <body>I will not</body>   </note> </messages>


Download ppt "By HITESHWAR KUMAR AZAD Ph.D Scholar"

Similar presentations


Ads by Google