1. What are Web Services?
Web services expose functionality over the internet using a protocol such as HTTP. Web services can be accessed by two disparate applications from different platforms as they use SOAP protocol to expose the business functionality. SOAP is a platform-independent protocol, so the consumer of the web services doesn’t have to know any implementation detail of web services based components. This is the reason why web services hosted on windows can even be accessed by LINUX consumers. In another way, Web Server is a program component that allows us to develop loosely coupled and platform-independent applications. It enables distributed applications to exchange messages using a protocol like HTTP, XML, and SOAP. Since it uses XML based messaging, it enables heterogeneous applications to interoperate with each other.
2. Define UDDI, DISCO and WSDL.
UDDI, Universal description, discovery, and integration
It is the directory that is used to publish and discover public web services.
DISCO, Discovery
Commonly known as Discovery. Discovery clubs together common services and exposes the schema document of the web services.
WSDL, Web Service description language.
This is used to describe web services. The description includes
URL of web services
Method and properties supported by web services
Data type it supports.
Protocol detail it supports.
It is the directory that is used to publish and discover public web services.
DISCO, Discovery
Commonly known as Discovery. Discovery clubs together common services and exposes the schema document of the web services.
WSDL, Web Service description language.
This is used to describe web services. The description includes
URL of web services
Method and properties supported by web services
Data type it supports.
Protocol detail it supports.
3. What are the steps to get a proxy object of a web service at the client-side?
The following are the steps to get a proxy object of a web service at the client-side.
Access UDDI node for a list of web services.
Services thus responded by UDDI have URL pointing to DISCO or WSDL document.
Parse DISCO and WSDL document and build a proxy object which can communicate with the web service.
Access UDDI node for a list of web services.
Services thus responded by UDDI have URL pointing to DISCO or WSDL document.
Parse DISCO and WSDL document and build a proxy object which can communicate with the web service.
4. Explain JAXM messaging models.
JAXM messaging models have two types of messaging models, synchronous and asynchronous.
Synchronous messaging model
In this type of model, the client directly interacts with the source. The client sends a request and waits for the response.
Asynchronous messaging model
In this model, the client sends message to the messaging provider and returns back. The messaging provider then performs the routing of the message to the end source
Synchronous messaging model
In this type of model, the client directly interacts with the source. The client sends a request and waits for the response.
Asynchronous messaging model
In this model, the client sends message to the messaging provider and returns back. The messaging provider then performs the routing of the message to the end source
5. Describe the process of communication between Client and Web Service.
To communicate with Web Service, Client application creates an object of Web Service Proxy Class. The proxy object provides access to all methods and properties of Web Service to the client. The client calls a method on the proxy object. The Web Service infrastructure serializes the method call and arguments into the SOAP message and sends it to web service. The web service executes the method and returns the value which gets serialized and send over the network. The message then received by the client infrastructure, deserializes it and sends it to the proxy object. The proxy object returns the value to the client application.
6. What are the components published while deploying Web Service?
Web Application Directory
.asmx file
.disco file
Web.Config file
\Bin directory
Web.Config file
\Bin directory
7. Describe .disco file.
It is a discovery document that contains links to resources that describes web service and its location. It is written in WSDL and describes the capability of web service.
8. Describe the step to be followed to access web service by the client.
Add a web reference to the web service in the client application,
Generate a proxy class,
Create an object of the proxy class,
Access the Web service by using a proxy object.
Generate a proxy class,
Create an object of the proxy class,
Access the Web service by using a proxy object.
9. What are the main advantages of binary serialization?
An object is stored in a file, a database or even in the memory. However, data to be transferred over a network needs to be in a linear form for which serialization and deserialization are used.
The advantage of serialization is the ability of an object to be serialized into a persistent or non-persistent storage media and then reconstructing the same object later by de-serializing the object.
Also Binary Serialization is faster, supports complex objects too with read only properties and even circular references.
The advantage of serialization is the ability of an object to be serialized into a persistent or non-persistent storage media and then reconstructing the same object later by de-serializing the object.
Also Binary Serialization is faster, supports complex objects too with read only properties and even circular references.
10. How do you encapsulate the binary serialization?
public static void SerializeBinary( object o, string file_name)
{
using (FileStream fs = new FileStream(file_name, FileMode.Create)) {
BinaryFormatter fmt = new BinaryFormatter ();
fmt.Serialize(fs, o);
}
}
{
using (FileStream fs = new FileStream(file_name, FileMode.Create)) {
BinaryFormatter fmt = new BinaryFormatter ();
fmt.Serialize(fs, o);
}
}
No comments:
Post a Comment