PSG COLLEGE OF TECHNOLOGY, COIMBATORE - 641 004

balecomputerSecurity

Nov 3, 2013 (4 years and 9 days ago)

367 views

08220812


No of Pages
:

6



Course Code :
06XWAA


Page No:
1


Roll No:

(To be filled in by the candidate)


PSG COLLEGE OF TECHNOLOGY, COIMBATORE
-

641 004


SEMESTER EXAMINATIONS,



APRIL 2009


M.Sc (Software Engineering)

Semester:

VI


06XWAA WEB SERVICE
S

Time : 3 Hours

Maximum Marks :
60


INSTRUCTIO
NS:

1.

Group I and Group II questions should be answered in the Main Answer Book.

2.

Answer any
FIVE

questions in Group II.

3.

Answer
ALL

questions in Group I and Group III.

4.

Group III

=
Multiple Choice questions

-

(which will be given to the candidates half an
ho
ur before the scheduled close of the examination)
should be answered only
in the
space provided
in the Main Answer Book.


GROUP
-

I


Marks :
10 x 2 = 20


1.

Create XML Schema document with

complex contents about students (Sample data
given below). Use sid as an attribute.

sid

fname

lname

Y_of_B

50

David

Dave

1984

23

John

Jones

1983

53

John

Smith

1983


2.

How are namespaces declared and used in
XML?

3.

What is understood

by "validating" and "static typechecking" in XML processing?
Give an example for each technique

4.

A travel agency offers the following flights:

<?xml version="1.1"?>

<flights>

<flight from="Frankfurt" to="Rom" start="2004
-
09
-
07 09:30"

arrival="2004
-
09
-
07

10:30" price="70"/>

<flight from="Frankfurt" to="Rom" start="2004
-
09
-
07 09:00"

arrival="2004
-
09
-
07 10:05" price="70"/>

<flight from="Frankfurt" to="Helsinki" start="2004
-
09
-
07 09:50"

arrival="2004
-
09
-
07 11:45" price="90"/>

<flight from="Basel" to="Prag" s
tart="2004
-
09
-
07 10:15"

arrival="2004
-
09
-
07 11:30" price="60"/>

<flight from="Baden
-
Baden" to="Frankfurt" start="2004
-
09
-
07 08:30"

arrival="2004
-
09
-
07 09:05" price="55"/>

</flights>

Write an X
SLT

that lists all flights to Rom.

08220812


No of Pages
:

6



Course Code :
06XWAA


Page No:
2


5.

What is the power of Web S
ervices being exposed through technologies like SOAP
and REST?


6.

What is the difference between a URI, a URL and a URN? Give an example for each.


7.

Write the purpose of Header element in SOAP document. Also write the use of
mustUnderstand and actor att
ributes used in Header element,


8
.

Consider the following WSDL fragment



<message name=”GetLastStockPriceInput”>




<part name=”parameters” element=”m:GetLastStockPrice” />



</message>


Assume that the element GetLastStockPrice contains the following ch
ild elements.



StockNo

-


Integer type (Max & Min occurrence is 1)



StockPrice

-


Decimal type (Max occurrence is 1)




StockDesc

-

String type (Max occurrence is 1)



Write the corresponding types section of WSDL document.


9
.

How a binding template se
rves as “technical finger print” in discovering a web
services in a UDDI registry?


1
0
.

Consider the following UDDI entry segment.


<? xml version=”1.0” ?>


<businessentity businesskey = “” xmlns = “urn:uddi
-
or:api_v2”>


<name> company </name>


<categoryba
g>



<keyedreference tmodelkey = “uuid:cob9fe13
-
179f
-
413d
-
8a5fb”



keyname = “NAICS “ Software Publisher” keyvalue = “51121” />



</categorybag>


</businessentity>



Identify the role played by the element “category bag” in the above segment.





GROUP
-

II


Marks :
5 x 6 = 30


11.

Explain how
Web Services differ from the following Distributed Computing
Technologies.



i)

CORBO



ii)

RMI



iii)

DCOM


12.

Write an XML schema document for the g
iven XML documents, such that it satisfies
the following constraints:



Use
http://www.w3.org/2001/XMLSchema
as default namespace.



Set elementFormDefault and attributeFormDefault to unqualified.



Element books has the type t1



Element comments is of type strin
g



Type t1 consists of an element book of type t2



Type t1 also has the elements comments.



Type t2 consists of an element title of type string

08220812


No of Pages
:

6



Course Code :
06XWAA


Page No:
3


XML document:

<?xml version="1.0"?>

<bk:books xmlns:bk="http://abc.com/">

<book>

<title>XML for dummies</title>

</b
ook>

<bk:comments>Books on the topic XML</bk:comments>

</bk:books>


13.

Explain the SOAP message structure. Also explain the rules associated with the
SOAP message structure.


14.

The following XML statements are found in the message and portType sections
of the
WSDL document of the service provided by Company ABC. The method that is
exposed to the client in this service is Record showRecord(Record r);


<wsdl:message name="showRecordRequest">

<wsdl:part name="in0" type="tns1:Record" />

</wsdl:message>

<wsdl
:message name="showRecordResponse">

<wsdl:part name="showRecordReturn" type="tns1:Record" />

</wsdl:message>

<wsdl:portType name="RecordService">

<wsdl:operation name="showRecord" parameterOrder="in0">

<wsdl:input message="impl:showRecordRequest"

name="sh
owRecordRequest" />

<wsdl:output message="impl:showRecordResponse"


name="showRecordResponse" />

</wsdl:operation>

</wsdl:portType>

(i)

If the method showRecord() is now modified as follows:

String showRecord(Record r, int i, String d);

show the changes i
n the WSDL document above when the service is deployed.
You may assume that the QName for String and int is xsd:string and xsd:int,
respectively, in this document.

(ii)

The service is further modified so that two methods showRecord() and
writeRecord() are

exposed to the client. The function prototypes of these
methods are as follows:

String showRecord(Record r, int i, String d);

Record writeRecord(Record r);

Deduce the changes in the WSDL document as compared with that in (i) when
the modified service is
deployed.


15.

Explain why UDDI can be described as being both a name service and a directory
service, mentioning the types of enquiries that can be made.
Also e
xplain how web
services are discovered.


16.

Explain the three UDDI query patterns with example
s.


/END/

08220812


No of Pages
:

6



Course Code :
06XWAA


Page No:
4


Roll No:



Write the Alphabet of your choice answer for each question in the space provided in
the Main Answer Book

(Do not attach this question paper along with the Main Answer Book)


06XWAA WEB SERVICE
S




GROUP III


Marks : 10

x 1 = 10

1
.

A manufacturing company is using a legacy application that imports and exports data
in comma
-
delimited flat files. XML will be used as the data exchange format between
the manufacturing com
pany and its suppliers and customers. Which of the following
is MOST likely to be required by this architecture?

A.



The element types and attribute names in the XML documents sent by
suppliers and customers must match the names of data fields in the
ma
nufacturing company's legacy system.

B.



Before sending documents to suppliers, the comma
-
delimited flat files must be
transformed into HTML

C.



The XML documents received from suppliers and customers must be validated
and transformed into comma
-
delimi
ted flat files by writing an XSLT
transformation.

D.



An XSLT processor will be used to transform comma
-
delimited flat files data
into XML before sending documents to suppliers and customers.


2.

A DTD in a catalog.dtd file contains the following declar
ation:

<!ENTITY % regular “<!ELEMENT Item (Description?, PartNumber,

DiscountedPrice, Manufacturer+)>” >


%regular;


Consider the following document type declaration in an XML document:

<!DOCTYP
E Catalog SYSTEM "catalog.dtd" >


Which of the following is

TRUE about the structure of an <Item> element in the
XML document?


A.



Inside an <Item> element, the <Manufacturer> element must occur before the
<DiscountedPrice> element.

B.



An <Item> element
can
contain

only
<
Discounted
Price> child element.

C.



The first child element of an <Item> element must be a <Description>
element.

D.



An <Item> element must contain at least one <Manufacturer> child element.


3.

What is the objective of defining namespaces in an XML document?

A.

To give the meaning of

a name in an XML document.

B.

To ensure the uniqueness of a name in an XML document.

C.

To define the memory space for storing a name in an XML document.

D.

To show the location where the meaning of a name can be found.

08220812


No of Pages
:

6



Course Code :
06XWAA


Page No:
5


4
.

Which of the following is NOT

the purpose of the binding section of a WSDL
document?

A.

To indicate the transport protocol of a portType operation.

B.

To indicate how the body of a SOAP message is constructed.

C.

To indicate how the header of a SOAP message is constructed.

D.

To i
ndicate the message transmission sequence of a portType operation.


5
.

In WSDL a <portType> refers to

A.

TCP/IP or UDP port on the server

B.

the operations that can be performed, and the messages that are involved

C.

the actual protocol used in the Web Se
rvice

D.

only the operations that can be performed


6
.

The soap:binding element has two attributes, they are

A.

style attribute and transport attribute

B.

actor and name

C.

encoding and soapAction

D.

message and parts


7
.

Select which of the following is a

correct element type declaration for the occurrence
of the “FirstName” element and the “LastName” element in that order as the child
element of “Name” Element.

A.

<!ELEMENT Name (FirstName) >




<!ELEMENT Name (LastName) >

B.

<!ELEMENT Name (
FirstName, LastName ) >

C.

<!ELEMENT Name ( FirstName | LastName ) >

D.

<!ELEMENT Name ( FirstName / LastName ) >


8
.

Select which of the following correctly explains the value that can be described in the
“ItemPrice” element content..

<xs:element name="
ItemPrice" type="itemPriceType" />

<xs:simpleType name="itemPriceType">


<xs:restriction base="xs:int">


<xs:minInclusive value="500" />


<xs:maxInclusive value="2000000" />


</xs:restriction>

</xs:simpleType>


A.

The value ”2000000” can be describ
ed, but the value “2000001” cannot be
described

B.

The value ”1999999” can be described, but the value “2000000” cannot be
described

C
.

The value ”501” can be described, but the value “500” cannot be described

D
.

The value ”500” can be described, but the

value “2000000” cannot be
described




08220812


No of Pages
:

6



Course Code :
06XWAA


Page No:
6


9
.

In WSDL a <port> refers to

A.

TCP/IP or UDP port on the server

B.

Represents the actual service used

C.


Exposes a <service> using a specific protocol binding


D.

Defines the operation


10
.

Select which of the f
ollowing is a correct XML declaration description.

A
.

<?xml version="1.0" encoding="">

B.

<?xml encoding="UTF
-
8">

C
.

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

D.


<?xml version="1.0"?>


Roll No:

(To be filled in by the candidate)


PSG COLLEGE OF TECHNOLOG
Y, COIMBATORE
-

641 004


SEMESTER EXAMINATIONS,



APRIL 2008


M.Sc (Software Engineering)

Semester :

VIII


03IMEE WEB SERVICE
S


Time : 3 Hours

Maximum Marks :
60


INSTRUCTIONS:

5.

Answer
ALL

questions from PART
-

A and Answer any
FIVE
questions from
PART
-

B.


PART
-

A


Marks :
10 x 2 = 20


1.

Can you give an example of when it would be appropriate to use a web service as
opposed to a non
-
serviced component?


2.

Consid
er the following XML document

<root>

<foo:A xmlns:foo="http://www.foo.org/">


<B>


<bar:C xmlns:bar="http://www.bar.org/" value = “0”/>


</B>


</foo:A>

<D> abcd </D>

</root>

i)

What is the scope of the XML namespace declarations?

ii)

Is i
t possible to use the prefixed name either foo:D or bar:D for the element D?
Give reason.

08220812


No of Pages
:

6



Course Code :
06XWAA


Page No:
7



3.

Write the valid XML document for the following XML Schema


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

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">


<xs:el
ement name="book">


<xs:complexType>


<xs:sequence>


<xs:element name="title" type="xs:string"/>


<xs:element name="author" type="xs:string"/>


<xs:element name="character" minOccurs="0" maxOccurs="unbounded">


<xs:com
plexType>


<xs:sequence>


<xs:element name="name" type="xs:string"/>


<xs:element name="friend
-
of" type="xs:string" minOccurs="0"





maxOccurs="unbounded"/>


<xs:element name="since" type="xs:date"/>


<xs:element name="qualification" type="xs:string"/>


</xs:sequence>


</xs:complexType>


</xs:element>


</xs:sequence>


<xs:attribute name="isbn" type="xs:string"/>


</xs:complexType>


</xs:element>

</
xs:schema>


4.

Write the DTD definition that best fulfills the following conditions.

Information for a multiple number of products coded within in one XML document.
Character data can be coded for product names (element name: product). The product
number m
ust have a single, unique name (attribute name: partsno), and is verified as
singular and unique by the XML parser. Characters such as # and @ must not be used
in price information (attribute name: price) The default value for price (attribute
name: price)

is “open”. The “product” element must have a defined “partsno”
attribute.


5.

Write the situation where XML Schema is better than DTD for validating a XML
document.


6.

Consider the following definitions element of WSDL document and Write the
purpose of
the namespaces used.

<definitions name="HelloService"


targetNamespace="http://www.ecerami.com/wsdl/HelloService.wsdl"


xmlns="http://schemas.xmlsoap.org/wsdl/"


xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"


xmlns:tns="http://www.ecerami.com/w
sdl/HelloService.wsdl"


xmlns:xsd="http://www.w3.org/2001/XMLSchema">


08220812


No of Pages
:

6



Course Code :
06XWAA


Page No:
8


7.

Consider the following SOAP message and answer the following questions.


<soap:Envelope xmlns:soap = “http://schemas.xmlsoap.org/soap/envelope”



xmlns:xsd = “http://www.w3.org/199
9/XMLSchema”>


<soap:Header>

</soap:Header>


<soap:Body>



<ns1:sayHelloTo xmlns:ns1 = “Hello”




soap:encodingStyle = “http://
schemas.xmlsoap.org/soap/encoding”>




<name type = “xsd:string”> John </name>



</ns1:sayHelloTo>


</soap:Body>



</soap:Envelop
e>

Modify the Header Entry by specifying mustUnderstand and actor attribute. Also
specify the purpose of these attributes.

8.

Consider the following fragment of WSDL document


<portType name = “SendSMSSoap”>



<operation name = “SendSMSToIndia”>




<input
message =”s0:SendSMSToIndiaSoapIn”/>




<output message = ”s0:SendSMSToIndiaSoapOut”/>



</operation>


</portType>


Write the corresponding Binding element. Assume that the value of SOAPAction
header for the above mentioned operation is
www.sendSMSNow.org/
SendSMSToIndia.


9.

Write a UDDI API query to retrieve full businessEntity information of a specific
business.


10.

Briefly explain the two models of WSFL.



PART
-

B


Marks :
5 x 8 = 40


1
1.

Some argue that Web services are nothing new; they are simply the latest incarnation
of distributed computing. Are Web Services just reinventing the wheel? Justify your
answer.


12.

Te Human Resources Department for a small but growing company, Zippy De
livery
Service, has decided that in order to make their employee data flexible across all the
applications used by the company, the employee data should be stored in XML. The
following fields are decided for including in the XML structure.




Employee name



P
osition



Age



Sex



Race



Marital Status

08220812


No of Pages
:

6



Course Code :
06XWAA


Page No:
9




Address Line 1



Address Line 2



City



State



Zip Code



Phone Number



Email Address


a.

Design an XML document, considering the above fields.

b.

Write a DTD to do necessary validation.

c.

Modification to the above description
is done as follows :

Personal information is stored as attributes of employee name element rather
than as individual elements. Additionally it has been decided to have an ID
type of attribute for each employee element. Write the modified DTD.

d.

Further
modifications are considered. Add an entity “Delivery Person” for specifying position of an employee. Also a parameter
entity for specifying “#PCDATA type is added. Write the modified DTD.

e.

It is decided to Qualify all the elements with specific namespac
e
www.Zippy.Org. Write the modified XML document and DTD in this case.


13.

How will you declare an element as ComplexType in XML schema in the following
cases? Give one example consisting of elements of all the types.

i)

ComplexType with standard content

ii)

Com
plexType with Mixed content

iii)

ComplexType with Text only

iv)

ComplexType with no content


14.

a)

Write the SOAP request message to call a method “getPhoneNumber” with

parameter “name” taking value “John”. Use SOAP encoding. Also write the
SOAP response message
for the same. Write about the fault elements.


b)

State Business reasons for using SOAP


15.

A web service “StockQuote” contains an operation “GetLastTradePrice” which
contains messages “GetLastTradePriceIuput” and “GetLastTradePriceOutput”. With
suitable

other assumptions write the WSDL document to describe the above service.
Write the SOAP message also.


16.

Explain the UDDI data structure and UDDI query patterns with example



/END/



PSG COLLEGE OF TECHNOLOGY: COIMBATORE


641 004

DEPARTMENT OF MATHEMA
TICS AND COMPUTER APPLICATIONS

TEST
-

I

08220812


No of Pages
:

6



Course Code :
06XWAA


Page No:
10


Class

:

M.Sc (Software Engineering)

Sem

:

8

Course

:

Web Services

Code

:

03IMEE





Roll No. :





GROUP


I

(4 x 2 = 8marks)

Answer ALL questions


1.

i) Write the element definition in XML document that will cause
an application
reading the document to use null values for that named "myElement" ?

ii) Write the equivalent schema definition for the following DTD definition


<!ELEMENT myElement EMPTY>

iii) What is the type of the element with n
ame "myElement" defined as follows using
schema. <element name="myElement" />

2.

Write the different possibilities of writing the XML document validated against the
DTD below.

<!ELEMENT root (root1,root2?,root3*)*>

<!ELEMENT root1 (#PCDATA)>

<!ELEMENT r
oot2 (#PCDATA)>

<!ELEMENT root3 (#PCDATA)>

3.

Write the Document type definitions that will validate the below XML document
successfully? (Write 3 different choices)

<? xml version="1.0" ?>

<root/>

4.

In a B2B organization, it is required to exchange XML m
essages conforming
to a single vocabulary with other companies in real time. The messages arrive via
different media including email. Since the messaging is done over the Internet, it is
important that the messages be validated at both ends when they arriv
e.

What factors are likely to be considered by a developer, when designing such a
system?


GROUP


II

(2x 6 = 12 marks)

Answer any TWO questions


5.

Write the Valid XML document (use XML schema for validation) that satisfies the
following rules.

Rules:




Root element is <quiz>.




<quiz> contains a <title> and an <items> element.



<items> contains one or more <item> element.



<item> contains one <question>, at least 2 <answer>s, and no
more than 6 <answer>s.



One of the answer must have an attribute "
correct=y" which indicates
the correct answer.



<question> might appear before of after all the <answer>s.

08220812


No of Pages
:

6



Course Code :
06XWAA


Page No:
11


6.

Write the DTD definition and sample XML document that best fulfills the following
conditions.

Information for a multiple number of products code
d within in one XML document.
Character data can be coded for product names (element name: product). The product
number must have a single, unique name (attribute name: partsno), and is verified as
singular and unique by the XML parser. Characters such as
# and @ must not be used
in price information (attribute name: price) The default value for price (attribute
name: price) is “open”. The “product” element must have a defined “partsno”
attribute.

7.

Consider the following XML schema and answer the followi
ng questions.


<?xml version =”1.0”?>


<xsd:schema xmlns:xsd=”http://www.w3.org/2001/XMLSchema”

targetNamespace=”http://www.example.org”
xmlns=”http://www.example.org” elementFormDefault=”qualified”>


<xsd:element name=”Camera” type=”CameraType”>



<xsd:co
mplexType>




<xsd:sequence>





<xsd:element name = “Company” type=”xsd:string” />





<xsd:element name = “Model” type=”xsd:string” />





<xsd:element name = “FocalLength” type=”xsd:string” />





<xsd:element name = “OpticalZoom” type=”xsd:string” />




</xsd:sequence>



</xsd:complexType>


</xsd:element>


</xsd:schema>



i)

Identify the error associated in the above Schema. Rectify it and rewrite the
entire schema.

ii)

Based on the schema obtained from (i), rewrite the entire schema again by
interchanging def
ault namespace and specific namespace.

iii)

Suppose the element Camera contains an attribute price. In this case modify
the complexType shown above. (Write modified complex type alone)

iv)

Suppose the element Company contains an attribute BusinessID. In this case
m
odify the type of the element Company and write the modified portion alone.


PSG COLLEGE OF TECHNOLOGY: COIMBATORE


641 004

DEPARTMENT OF MATHEMATICS AND COMPUTER APPLICATIONS

TEST
-

II

Class

:

M.Sc (Software Engineering)

Sem

:

8

Course

:

Web Services

Cod
e

:

03IMEE





Roll No. :




08220812


No of Pages
:

6



Course Code :
06XWAA


Page No:
12



GROUP


I

(4 x 2 = 8marks)

Answer ALL questions


1.

Some argue that Web services are nothing new; they are simply the latest incarnation
of distributed computing. In some sense that may be true, but what is it about Web
servi
ces that is driving the incredible buzz? Why are entrepreneurs, CEOs of
established companies, and industry analysts excited about this technology?
-

Comment

2.

ZwiftBooks.com were doing B2B commerce using EDI. Now they decided to
do the same thing using W
eb Services. What are the probable reasons for taking such
a decision?

3.

A C2C (client

to
-
client) company wants to bring together buyers and sellers to
perform a transaction on its website. Visitors to this auction site who want to sell
something can sea
rch and discover sellers and interact with them. The discovery and
interaction process changes often and is very dynamic in nature. Which of the
following can most logically be assumed to be a part of the application architecture?
Justify your answer.


Cho
ices:

A.

Validation of the XML data

B.

WSDL for the search and discovery

C.

UDDI for the search and discovery

D.

SOAP for communication between buyers and sellers.

4.

Consider the following SOAP message and answer the following questions.


<soap:Envelope xmlns:soap =
“http://schemas.xmlsoap.org/soap/envelope”



xmlns:xsd = “http://www.w3.org/1999/XMLSchema”>


<soap:Header>

</soap:Header>


<soap:Body>



<ns1:sayHelloTo xmlns:ns1 = “Hello”




soap:encodingStyle = “http://
schemas.xmlsoap.org/soap/encoding”>




<name type
= “xsd:string”> John </name>



</ns1:sayHelloTo>


</soap:Body>



</soap:Envelope>


i.

Modify the Header Entry by specifying mustunderstand attribute. Also specify the purpose of this attribute.

ii.

Write a SOAP response with respect to the above message. (Write B
ody portion alone)


08220812


No of Pages
:

6



Course Code :
06XWAA


Page No:
13


GROUP


II

(2x 6 = 12 marks)

Answer any TWO questions


5.

The following scenario describes a B2B transaction between a training company
namely Infocentre and a software development company namely AcmeSoft. The
computer training compan
y maintains a database for the students that have attended
its courses. They also developed an XML application that produces the list of students
for a given class. The management team at AcmeSoft would like to retrieve this list
from the training company’
s XML application. After retrieving they like to display the
data in browser. The XML document structure of Infocentre is described below.

Root element is trainingclass. It contains child elements title, start_date,
end_date, location and student. Again,
student element contains child
elements first_name, last_name and email.

Write an XSLT style sheet to display the XML document. Write the sample XML
document also.

6.

Write the SOAP request message to call a method “getPhoneNumber” with parameter
“name” ta
king value “John”. Use SOAP encoding. Also write the SOAP response
message for the same. Write about the fault elements.

7.

Compare Web Services with CORBA and DCOM on various parameters.



08220812


No of Pages
:

6



Course Code :
06XWAA


Page No:
14


PSG COLLEGE OF TECHNOLOGY: COIMBATORE


641 004

DEPARTMENT OF MAT
HEMATICS AND COMPUTER APPLICATIONS

TEST


II
-

Retest

Class

:

M.Sc (Software Engineering)

Sem

:

8

Course

:

Web Services

Code

:

03IMEE





Roll No. :





GROUP


I

(4 x 2 = 8marks)

Answer ALL questions


1.

Mention the use of SoapMethod attribute in HTTP heade
r. Compare it with
SoapAction attrobute.

2.

How SOAP messages are passed through Post method of HTTP protocol?

3.

What is a SOAP message path?

4.

Consider the following XML document.

<?xml version=”1.0” ?>

<customer name = “John”>


<address>



<street> Main Street

</street>



<city>

Coimbatore </city>



<country> India </country>


</address>

</customer>


write the XSLT to display the customer address.


GROUP


II

(2x 6 = 12 marks)

Answer any TWO questions


5.

Explain the SOAP message structure. Also explain the rules

associated with the SOAP message structure.

6.

Answer the following questions with respect to SOAP protocol.

i)

Identify the purpose of envelope and encoding namespace.

ii)

What is the use of mustUnderstand attribute?

iii)

What is a SOAP intermediary? Which attribute is

used to specify the
SOAP intermediary?

iv)

How will you do single reference and multi reference in SOAP encoding?

7.

i) Discuss various Fault elements associated with SOAP fault.

ii) Comment “SOAP works well in messaging as well as RPC structures"

08220812


No of Pages
:

6



Course Code :
06XWAA


Page No:
15



PSG COLLEGE
OF TECHNOLOGY: COIMBATORE


641 004

DEPARTMENT OF MATHEMATICS AND COMPUTER APPLICATIONS

TEST
-

III

Class

:

M.Sc (Software Engineering)

Sem

:

8

Course

:

Web Services

Code

:

03IMEE





Roll No. :





GROUP


I

(4 x 2 = 8marks)

Answer ALL questions


1.

Consi
der the following WSDL fragment



<message name=”GetLastStockPriceInput”>




<part name=”parameters” element=”m:GetLastStockPrice” />



</message>


Assume that the element GetLastStockPrice contains the following child elements.



StockNo

-


Integer type
(Max & Min occurrence is 1)



StockPrice

-


Decimal type (Max occurrence is 1)




StockDesc

-

String type (Max occurrence is 1)



Write the corresponding types section of WSDL document.

2.

List out and mention the purpose of UDDI data structures.

3.

i)

Wri
te a UDDI API query to retrieve full businessEntity information of a
specific

business.


ii)

Write a UDDI API query to extract tModel details based on the tModelKey.

4.

Briefly explain the two models of WSFL.


GROUP


II

(2x 6 = 12 marks)

Answer any TWO

questions


5.

Write
a

WSDL document using "
rpc/literal
" mode which reflects a Web service with
the following characteristics. The two operations reflecting the following methods
need to be supported.

int add(int x, int y)


String hello(String name)


Use
SOAP and HTTP 1.1 as concrete transport binding protocol

6.

Outline the replication scheme used in UDDI. Supposing that vector timestamps are
used to support this scheme, define a pair of operations for use by registries needing
to exchange data.

08220812


No of Pages
:

6



Course Code :
06XWAA


Page No:
16


7.

Explai
n why UDDI can be described as being both a name service and a directory
service, mentioning the types of enquiries that can be made. The second ‘D’ in the
name UDDI refers to ‘discovery’


is UDDI really a discovery service?


PSG COLLEGE OF TECHNOLOGY, CO
IMBATORE


641 004

DEPARTMENT OF MATHEMATICS AND COMPUTER APPLICATIONS


Tutorial

:

2

Programme

:

M.Sc (Software Engineering)

Sem


:

6

Subject

:

Web Services

Sub Code

:

06XWAA

1.

Which of the following is correct?

A.

SOAP can do RPC while XML
-
RPC cannot.

B.

SOAP is platform and language independent while XML
-
RPC is not.

C.

SOAP specification has a part that particularly defines data types while XML
-
RPC

has not.

D.


SOAP follows XML Schema when defining data types while XML
-
RPC does
not

2.

What is the o
bjective of defining namespaces in an XML document?

A.

To give the meaning of a name in an XML document.

B.

To ensure the uniqueness of a name in an XML document.

C.

To define the memory space for storing a name in an XML document.

D.

To show the locat
ion where the meaning of a name can be found.

3.

Which of the following statements is correct if a SOAP message contains the
following

statement?

SOAP
-
ENV:Envelope xmlns:SOAP
-
ENV = “http://schemas.xmlsoap.org/soap/envelope/”

A.

The SOAP processor will go

to http://schemas.xmlsoap.org/soap/envelope/

to find out the meaning of Envelope.

B.


SOAP
-
ENV is a name in namespace xmlns.

C.

The tag Envelope mentioned above is not the same as the tag Envelope of
the

namespace http://www.w3.org/2001/09/soap
-
envelope

D.


SOAP 1.2 standard is used when constructing this SOAP message.

4.

Which of the following statements is correct for the SOAP message given below?

<SOAP
-
ENV:Body>

<ns1:getPriceResponse xmlns:ns1="urn:examples:priceservice“

SOAP
-
ENV:encodingStyle=
"http
://www.w3.org/2001/09/soap
-
encoding">

<return xsi:type="xsd:double">54.99</return>

</ns1:getPriceResponse>

</SOAP
-
ENV:Body>

A.

The SOAP processor will follow SOAP 1.1 standard to encode the number
54.99.

B.

The requestor tries to send a double number of
value 54.99 as the input
parameter to

08220812


No of Pages
:

6



Course Code :
06XWAA


Page No:
17


the service.

C.

The namespace of double is urn:examples:priceservice

D.

This message is most probably generated by Apache Soap or related engine.

5.

What does SOAP define

A.


The overall structure of the XML message

B.

The conventions representing the remote procedure call in the XML message

C.


A binding to HTTP

D.

The conventions to wrap and send an error back to the sender

E.

All of the above

6.

In WSDL a <port> refers to

A.

TCP/IP or UDP port on the server

B.


Represents the actual service used

C.


Exposes a <service> using a specific protocol binding

7.

Which of the following is NOT the purpose of the binding section of a WSDL
document?

A.

To indicate the transport protocol of a portType operation.

B.

To i
ndicate how the body of a SOAP message is constructed.

C.

To indicate how the header of a SOAP message is constructed.

D.

To indicate the message transmission sequence of a portType operation.

8.

The SOAP _____ attribute may be used to address the Header

element to a particular
endpoint


A.

actor


B.

destination


C.

endpoint


D.

None of these

08220812


No of Pages
:

6



Course Code :
06XWAA


Page No:
18



9.

Which of the following statement(s) is/are true with respect to WSDL?

A.

The <types> element defines the data type that are used by the web
service

B.

The <bind
ing> element defines the message format and protocol details
for each port

C.

The <types> element defines the data elements of an operation

D.

The <binding> element defines only the protocol details for each port

E.

The <message> element defines the data e
lements of an operation

10.

In WSDL a <portType> refers to

A.

TCP/IP or UDP port on the server

B.

the operations that can be performed, and the messages that are involved

C.

the actual protocol used in the Web Service

D.

only the operations that can be pe
rformed

E.

only the messages that are involved including their types and elements to be
used

11.

The soap:binding element has two attributes, they are

A.

style attribute and transport attribute

B.

actor and name

C.

encoding and soapAction

D.

message
and pa
rts

12.

WSDL allows more than one binding element to point to the same port type.

Why?

A.

Because a service may support multiple, alternative protocol bindings

B.

Binding can be repeated

C.

To give different location

D.

It is the specification given by W3C

13.

Consider the following diagram and write the WSDL portType element for the same





PSG COLLEGE OF TECHNOLOGY: COIMBATORE


641 004

08220812


No of Pages
:

6



Course Code :
06XWAA


Page No:
19


DEPARTMENT OF MATHEMATICS AND COMPUTER APPLICATIONS

TUTORIAL
-

II

Class

:

M.Sc (Software Engineering)

Sem

:

8

Course

:

Web Services


Code

:
03IMEE

Roll No. :





Say True or False

1.

Web Services are not RPC based.

2.

WSDL is used to discover Web Services

3.

UDDI is used to publish web services

4.

SOAP is a protocol based on XML

5.

SOAP body element is optional

6.

The SOAP body element can

contain only one fault element

7.

Both parties to Web Services interaction must have access to same WSDL file.

8.

The incoming and outgoing messages are defined in Binding section of WSDL

9.

Aggregation of related ports is called a service in WSDL.

10.

Technical infor
mation is called as Yellow Pages

11.

The element businessService is used to describe White pages data structure

12.

Similar to public UDDI we can also have private UDDI.

13.

An example for categorization of information is ASCII

14.

UDDI can be queried using UDDI APIs

15.

tMod
el structure serves as technical fingerprint to identify a service uniquely.

16.

CategoryBag element can be attached with any of UDDI data models.

17.

Query to UDDI is done using SOAP message format.

18.

There can be many binding templates pointing to same tModel.

19.

An
example for inquiry API is save_business

20.

Both hosting redirector & accesspoint elements are mandatory in Binding template
data model.

Fill in the blanks.


21.

When RPC is not involved, the style attribute of SOAP Binding element takes the
value _______________
___.

22.

The aggregation of related ports is called _____________

08220812


No of Pages
:

6



Course Code :
06XWAA


Page No:
20


23.

When fault arises is due to processing SOAP message and not because of body of
SOAP message, the fault code is ____________

24.

The use attribute of soap:body element has two values namely
_________
____________ and ________________

25.

The attributes of soap:operation element are ___________________ and
_____________

26.

The WSDL binding element contains two attributes namely
_______________________ and __________________

27.

The SOAP binding element style attri
bute can have two values namely
______________ and __________________.

28.

The operations performed by Web Service is defined by the ______________ element
in WSDL.

29.

The communication protocol used by the web service is defined by the
______________ element in

WSDL.

30.

The root element of the WSDL document is ________________