...

Document 1592741

by user

on
Category: Documents
3

views

Report

Comments

Transcript

Document 1592741
Roll No:
(To be filled in by the candidate)
PSG COLLEGE OF TECHNOLOGY, COIMBATORE - 641 004
SEMESTER EXAMINATIONS,
MCA
APRIL 2011
Semester: IV
08MXOD WEB TECHNOLOGY
Time: 3 Hours
Maximum Marks: 100
INSTRUCTIONS:
1. Answer ALL questions from PART - A and Answer any FIVE questions from
PART - B.
PART - A
Marks : 10 x 3 = 30
1.
What is understood by "validating" and "static typechecking" in XML processing?
Give an example for each technique.
2.
Consider 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 it possible to use the prefixed name either foo:D or bar:D for the element D?
Give reason.
3.
Distinguish Web Application and Web Services?
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 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.
5.
Write the situation where XML Schema is better than DTD for validating a XML
document.
6.
Model a complex data with XML schema for a binary tree which is either empty or
consists of a root element and a left and a right binary sub-tree.
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/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>
Modify the Header Entry by specifying mustUnderstand and actor attribute. Also
specify the purpose of these attributes.
8.
How SOAP messages are passed through Post method of HTTP protocol?
9.
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.
10.
Write a UDDI API query to extract tModel details based on the tModelKey
PART - B
Marks : 5 x 12 = 60
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 given XML document using integrity
constraints such that:

Each child of products must have a number attribute whose value references an
item number.

Each child of items must have a number attribute containing a unique item
number.
<stock xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="abc.xsd">
<products>
<book number="12">
<quantity>90</quantity>
<language value="en"/>
</book>
<book number="12">
<quantity>23</quantity>
<language value="de"/>
</book>
<cd number="89">
<quantity>50</quantity>
<category>pop</category>
</cd>
</products>
<items>
<item number = “12”>
<name>XML Bible (2nd Edition)</name>
<price currency="USD">34,99</price>
</item>
<item number = “89”>
<name>Shania Twain - Greatest Hits</name>
<price currency="USD">20,99</price>
</item>
</items>
</stock>
13.
a)
b)
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.
State Business reasons for using SOAP
14.
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)
Write the Fault elements associated with SOAP fault.
15.
The following is a segment of the WSDL document of a service:
<?xml version="1.0" encoding="UTF-8" ?>
<wsdl:definitions targetNamespace="http://localhost:8080/axis/services/HelloName"
xmlns=http://schemas.xmlsoap.org/wsdl/
xmlns:apachesoap=http://xml.apache.org/xml-soap
xmlns:impl="http://localhost:8080/axis/services/HelloName"
xmlns:intf="http://localhost:8080/axis/services/HelloName"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:message name="sayResponse">
<wsdl:part name="sayReturn" type="xsd:string" />
</wsdl:message>
<wsdl:message name="sayRequest">
<wsdl:part name="in0" type="xsd:string" />
<wsdl:part name="in1" type="xsd:int" />
</wsdl:message>
<wsdl:portType name="HelloService">
<wsdl:operation name="say" parameterOrder="in1 in0">
<wsdl:input message="impl:sayRequest" name="sayRequest" />
<wsdl:output message="impl:sayResponse" name="sayResponse" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="HelloNameSoapBinding" type="impl:HelloService">
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="say">
<wsdlsoap:operation soapAction="" />
<wsdl:input name="sayRequest">
<wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://Hello" use="encoded" />
</wsdl:input>
<wsdl:output name="sayResponse">
<wsdlsoap:body
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="http://localhost:8080/axis/services/HelloName"use="encoded" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="HelloServiceService">
<wsdl:port binding="impl:HelloNameSoapBinding" name="HelloName">
<wsdlsoap:address location="http://localhost:8080/axis/services/HelloName" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Based on the information given in the above WSDL document, answer the following
questions:
i)
What is the name of the service?
ii)
What is the name of the messages used in this service? What are the types of
the data involved in each of the message?
iii)
What is the name of the remote method exposed to the client? What kind of
operation is carried out in this service?
iv)
Which version of SOAP should be used to encode the data?
v)
Give the URL of the service.
vi)
If now one more method namely “listen” is added to the service. The method
requires a String as the input parameter and returns also a String. Give the
additional XML statements that will be found in the WSDL document.
16.
Explain the UDDI data structures and UDDI query patterns with example.
Fly UP