XML Web Services and Remoting Interview Questions

Here is a list of Interview Questions on XML, Web Services, .NET, DOTNET Webservices and Remoting

What is a formatter?
A formatter is an object that is responsible for encoding and serializing data into messages on one end, and deserializing and decoding messages into data on the other end.

What is marshalling and what are different kinds of marshalling ?
Marshalling involves copying and processing data so that a complex type can appear to the receiving component the same as it appeared to the sending component. We can marshal by value and marshal by reference.

What is difference between web serivce and remoting?
ASP.NET based Web services can only be accessed over HTTP. .NET Remoting can be used across any protocol. Web services work in a stateless environment where each request results in a new object created to service the request. .NET Remoting supports state management options and can correlate multiple calls from the same client and support callbacks. Web services serialize objects through XML contained in the SOAP messages and can thus only handle items that can be fully expressed in XML. .NET Remoting relies on the existence of the common language runtime assemblies that contain information about data types. This limits the information that must be passed about an object and allows objects to be passed by value or by reference. Web services support interoperability across platforms and are good for heterogeneous environments. .NET Remoting requires the clients be built using .NET, or another framework that supports .NET Remoting, which means a homogeneous environment

What is WSDL?
Web Service Description Language to display the information of the web service to the consumer.

What is diffgram?
A DiffGram is an XML format that is used to identify current and original versions of data elements. The DataSet uses the DiffGram format to load and persist its contents, and to serialize its contents for transport across a network connection.

What is XML transformation?
It is a language for converting XML documents from one format to another. Although it can be applied in a variety of ways, XSLT enjoys two primary uses: Converting XML documents into HTML documents and Converting XML documents into other XML documents.

What is SOAP?
SOAP is an XML-based protocol for exchanging information between computers. Although SOAP can be used in a variety of messaging systems and can be delivered via a variety of transport protocols, the main focus of SOAP is Remote Procedure Calls (RPC) transported via HTTP. Like XML-RPC, SOAP is platform independent, and therefore enables diverse applications to communicate with one another.

Which class does the remote object has to inherit ?
MarshalByRefObject.

What are two different types of remote object creation mode in .NET ?
SingleCall and SingleTon

What are channels in .NET Remoting?
Channels represent the objects that transfer the other serialized objects from one application domain to another and from one computer to another, as well as one process to another on the same box. A channel must exist before an object can be transferred.

What is the transport protocol you use to call a Web service
HTTP with SOAP

What are the various ways of accessing a web service?
Asynchronous and synchronous call

What is the purpose of schema definition(.xsd) files?
To create the tabular structure to sotre the final data in xml

What is the DOM?
The Document Object Model (DOM) class is an in-memory representation of an XML document. The DOM allows you to programmatically read, manipulate, and modify an XML document.

How many types of parsing mechanisms are avialble for xml?
In which scenerio we should use them? SAX, DTD, DOM

What is xpath and when is it used?
It is is a language for addressing parts of an XML document.

How to secure the web services properly? ??

What is serialization and deserialization? What are various way to do it?
Serialization is the process of converting an object into a stream of bytes. Deserialization is the opposite process of creating an object from a stream of bytes. Types are binary serialization and xml serialization.

What is differendce between DTD and schema? When and why do we need them? DTDs can't define data types of elements that appear in a document whereas the schema allows so. DTDs are written using a syntax that is completely removed from that of XML itself where as you can write an XML schema using the XML syntax you already know.