Web Service & Remoting

Web Services are applications delivered as a service on the Web. Web services allow for programmatic access of business logic over the Web. Web services typically rely on XML-based protocols, messages, and interface descriptions for communication and access. Web services are designed to be used by other programs or applications rather than directly by end user. Programs invoking a Web service are called clients. SOAP over HTTP is the most commonly used protocol for invoking Web services.

  1. Are Web Services a replacement for other distributed computing platforms?
    No. Web Services is just a new way of looking at existing implementation platforms.
  2. In a WebService, need to display 10 rows from a table. So DataReader or DataSet is best choice?
    A: WebService will support only DataSet.
  3. How to generate WebService proxy? What is SOAP, WSDL, UDDI and the concept behind Web Services? What are various components of WSDL? What is the use of WSDL.exe utility?
    SOAP is an XML-based messaging framework specifically designed for exchanging formatted data across the Internet, for example using request and reply messages or sending entire documents. SOAP is simple, easy to use, and completely neutral with respect to operating system, programming language, or distributed computing platform.
    After SOAP became available as a mechanism for exchanging XML messages among enterprises (or among disparate applications within the same enterprise), a better way was needed to describe the messages and how they are exchanged. The Web Services Description Language (WSDL) is a particular form of an XML Schema, developed by Microsoft and IBM for the purpose of defining the XML message, operation, and protocol mapping of a web service accessed using SOAP or other XML protocol. WSDL defines web services in terms of "endpoints" that operate on XML messages. The WSDL syntax allows both the messages and the operations on the messages to be defined abstractly, so they can be mapped to multiple physical implementations. The current WSDL spec describes how to map messages and operations to SOAP 1.1, HTTP GET/POST, and MIME. WSDL creates web service definitions by mapping a group of endpoints into a logical sequence of operations on XML messages. The same XML message can be mapped to multiple operations (or services) and bound to one or more communications protocols (using "ports").
    The Universal Description, Discovery, and Integration (UDDI) framework defines a data model (in XML) and SOAP APIs for registration and searches on business information, including the web services a business exposes to the Internet. UDDI is an independent consortium of vendors, founded by Microsoft, IBM, and Ariba, for the purpose of developing an Internet standard for web service description registration and discovery. Microsoft, IBM, and Ariba also are hosting the initial deployment of a UDDI service, which is conceptually patterned after DNS (the Internet service that translates URLs into TCP addresses). UDDI uses a private agreement profile of SOAP (i.e. UDDI doesn't use the SOAP serialization format because it's not well suited to passing complete XML documents (it's aimed at RPC style interactions). The main idea is that businesses use the SOAP APIs to register themselves with UDDI, and other businesses search UDDI when they want to discover a trading partner, for example someone from whom they wish to procure sheet metal, bolts, or transistors. The information in UDDI is categorized according to industry type and geographical location, allowing UDDI consumers to search through lists of potentially matching businesses to find the specific one they want to contact. Once a specific business is chosen, another call to UDDI is made to obtain the specific contact information for that business. The contact information includes a pointer to the target business's WSDL or other XML schema file describing the web service that the target business publishes.
    • How to generate proxy class other than .net app and Wsdl tool?
      To access an XML Web service from a client application, you first add a Web reference, which is a reference to an XML Web service. When you create a Web reference, Visual Studio creates an XML Web service proxy class automatically and adds it to your project. This proxy class exposes the methods of the XML Web service and handles the marshalling of appropriate arguments back and forth between the XML Web service and your application. Visual Studio uses the Web Services Description Language (WSDL) to create the proxy.

  1. What is a proxy in web service? How do I use a proxy server when invoking a Web service?
  2. Asynchronous web service means?
  3. What are the events fired when web service called?
  4. How will do transaction in Web Services?
  5. How does SOAP transport happen and what is the role of HTTP in it? How you can access a web service using soap?
  6. What are the different formatters can be used in both? Why?.. binary/soap
  7. How you will protect / secure a web service?
    For the most part, things that you do to secure a Web site can be used to secure a Web Service. If you need to encrypt the data exchange, you use Secure Sockets Layer (SSL) or a Virtual Private Network to keep the bits secure. For authentication, use HTTP Basic or Digest authentication with Microsoft® Windows® integration to figure out who the caller is.
    these items cannot:
    • Parse a SOAP request for valid values
    • Authenticate access at the Web Method level (they can authenticate at the Web Service level)
    • Stop reading a request as soon as it is recognized as invalid
  8. How will you expose/publish a webservice?
  9. What is disco file?
  10. What’s the attribute for webservice method? What is the namespace for creating webservice?
    [WebMethod]

    using System.Web;
    using System.Web.Services;
  11. What is Remoting?
    The process of communication between different operating system processes, regardless of whether they are on the same computer. The .NET remoting system is an architecture designed to simplify communication between objects living in different application domains, whether on the same computer or not, and between different contexts, whether in the same application domain or not.
  12. Difference between web services & remoting?
  13. Can you pass SOAP messages through remoting?
  14. CAO and SAO.
    Client Activated objects are those remote objects whose Lifetime is directly controlled by the client. This is in direct contrast to SAO. Where the server, not the client has complete control over the lifetime of the objects.
    Client activated objects are instantiated on the server as soon as the client request the object to be created. Unlike as SAO a CAO doesn’t delay the object creation until the first method is called on the object. (In SAO the object is instantiated when the client calls the method on the object)
  15. Singleton and single call.
    Singleton
    types never have more than one instance at any one time. If an instance exists, all client requests are serviced by that instance.
    Single Call types always have one instance per client request. The next method invocation will be serviced by a different server instance, even if the previous instance has not yet been recycled by the system.
  16. What is Asynchronous Web Services?
  17. Web Client class and its methods?
  18. Flow of remoting?

Where on the Internet would you look for Web services?

UDDI.org - Universal Description, Discovery language.

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

HTTP is prefered for Soap while tcp for binary ie.

HTTP is used in web services and tcp works well in remoting.

No comments: