CS643 Web Services using XML and SOAP

insidiousbehaviorSecurity

Nov 3, 2013 (3 years and 8 months ago)

98 views


CS643

Web Services using XML and SOAP


Report Submitted to

Dr. Jiangbo Liu


By

Srihari Muthyala

Sridhar Bodapatla

What is XML?


XML is a meta
-
language, that is, a language about
languages



Data Independence


User Defined Tags


<course> CS643 </course>


<instructor> Dr. Liu </instructor>


XML + DTD provides a standard way for anyone to
understand data using the same set of tools


XML is built on a hierarchy or tree structure



XML

Simple example containing a message

<?xml version = “1.0”?>

<!
-

-

Simple xml document
-

-
>

<!DOCTYPE myMessage SYSTEM “intro.dtd”>

<myMessage>


<message>Welcome to Web services World</message>

</myMessage>


intro.dtd

<!ELEMENT myMessage (message)>

<!ELEMENT message (#PCDATA) >


XML


XML also provides the ability to distinguish elements
and attributes from others that have similar names
through the use of namespaces


Namespace

http
:
//www
.
allbooks
.
com



<book>

<title>Deliverance</title>

</book>


Namespace


http
:
//www
.
music
.
com



<recordalbum>

<title>Deliverance</title>

</recordalbum>


SOAP


SOAP is an extensible XML messaging protocol that
forms the foundation for Web Services



The

SOAP

Specification

contains
:


A

syntax

for

defining

messages

as

XML

documents,

which

we

refer

to

as

SOAP

messages


A

model

for

exchanging

SOAP

messages


A

set

of

rules

for

representing

data

within

SOAP

messages,

known

as

SOAP

encoding


A

guideline

for

transporting

SOAP

messages

over

HTTP


SOAP Message Format

SOAP Message

POST /WebService1/HelloWorldService.asmx HTTP/1.1

Host: localhost

Content
-
Type: text/xml; charset=utf
-
8

typeContent
-
Length:
length


SOAPAction:"http://tempuri.org/WhatIsYourName"

<?xml version="1.0" encoding="utf
-
8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema
-
instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">


<soap:Body>


<WhatIsYourName xmlns="http://tempuri.org/">


<name>
string
</name>

</WhatIsYourName>

</soap:Body>

</soap:Envelope>


UDDI


UDDI defines a way to publish and find information
about Web services.




UDDI is a general
-
purpose registry



A UDDI Registry contains information about


Business Entity


Business Service


Binding Templates


Service Types


WSDL


What is WSDL?



Why WSDL?



Distributed Computing Evolution

Web Services

Definition:

According to W3C, Web Services is a Software

Application identified by a URI, whose interfaces and binding

are capable of being defined, described and discovered by

XML artifacts, and supports direct interactions with other

Software applications using XML based messages via

Internet based protocols

Web Services

Web Services Architecture

Service Provider
---

Service Broker
---

Service Requester


Web services protocol stack





Service Discovery Layer




Service Description Layer






XML Messaging Layer






Service Transport Layer




Why Web Services?



Are platform neutral


Are accessible in a standard way


Are accessible in an interoperable way


No human intervention required even for highly
complex transactions


Services on any device, anywhere, anytime


Recycle components, no installation and tight
integration of software



Web Services Tools


IBM Web Sphere Studio



.NET Web Service Studio



GLUE Web Service Platform



Alpha Works
-

Web Service Toolkit



Sun ONE


Security in Web Services

XML
-
based

Web

services

security



XML

digital

signatures




XML

encryption




Security assertion markup language




Mobile Web service


A convergence of PC and mobile applications



Web services can provide the glue to help bring
together the PC and mobile worlds



Integrating applications and data seamlessly across the
enterprise



Eliminating thick
-
client architecture for mobile devices



Preparing and extending enterprise data for mobile
devices




Myths About Web Services


Web services require only SOAP, WSDL, UDDI



Web services must be based on HTTP:


Other transports such as SMTP can be also used



Web Services are something completely new: Not True!



You have to write Web Services from scratch: Not True!



J2EE Platform does not support web services: Not True!



Example

HelloWorld

Demo in .NET Visual Studio