Question 361 – What is a WSDL?
- WSDL is an XML-based language for describing Web services and how to access them.
- WSDL stands for Web Services Description Language
- WSDL is written in XML
- WSDL is an XML document
- WSDL is used to describe Web services
- WSDL is also used to locate Web services
- WSDL is a W3C recommendation
- A .wsdl file is an XML document written in an XML grammar.
- It defines how an XML Web service behaves and instructs clients as to how to interact with service.
Question 362 – What are the elements of WSDL?
Below are the elements that are mainly used in WSDL.
<types> The data types used by the web service
<message> The messages used by the web service
<portType> The operations performed by the web service
<binding> The communication protocols used by the web service
Question 363 – What is a DISCO?
- DISCO is Discovery of Web Services
- It’s a document, which typically resides at the root of the web server.
- Contains references to the location of available web services.
- It allows the discovery of services at a known URL.
- It can define a document format along with an interrogation algorithm, making it possible to discover the Web Services exposed on a given server.
- It is the discovery file which gives path to the Webservices
- It contains WSDL When one searches for Web Services, it will go to the DISCO which gives actual info
Disco.exe – The Web Services Discovery tool discovers URLs of XML Web services located on a Web server and saves documents related to each XML web service on local disk. Syntax – disco [options] URL
Question 364 – What is a VSDISCO?
- VSDISCO files are DISCO files that support dynamic discovery of Web services.
- ASP.NET links the VSDISCO to a HTTP handler that scans the host directory and subdirectories for ASMX and DISCO files and returns a dynamically generated DISCO document.
- A client who requests a VSDISCO file gets back what appears to be a static DISCO document.
- Microsoft is actively discouraging the use of VSDISCO files because they could represent a threat to Web server security.
- VSDISCO files are disabled in the release version of ASP.NET. We can reenable them by uncommenting the line in the <httpHandlers> section of Machine.config
Question 365 – What are the different Protocols in webservice?
- 3 Different protocols can be used such as Http-Get, Http-Post, and SOAP.
- These protocols are included in the WSDL file that is automatically generated in .NET application.
- It is preferable to use Http-Get and Http-Post only when name/value pairs of data is available
Question 366 – What are the component we get while Deploying Webservice?
- Web application directory
- web.config file
- .asmx files
- .disco files
- Bin folder( containing dlls)
- Keep alive ( for load balancing)
Question 367 – What is a Webservice protocol stack?
- It is a set of protocols used to define, discover, and implement WS.
- The protocol stack consists of 4 layers as follows
- Service Transport: This layer is responsible for transferring messages between different applications. It includes HTTP, SMTP, FTP, and newer protocols such as Blocks Extensible Exchange Protocol (BEEP).
- XML Messaging: This layer is responsible for encoding messages in a common XML format so that messages can be understand at either end. It includes XML-RPC and SOAP.
- Service Description: This layer is responsible for describing the public interface to a specific Web service. This service description is handled via the WSDL.
- Service Discovery: This layer is responsible for centralizing services into a common registry, and providing easy functionality. This service discovery is handled via the UDDI.
Question 368 – What is a XML-RPC?
- It is a protocol that uses XML messages to perform Remote Procedure Calls.
- Requests are encoded in XML and sent via HTTP POST;
- XML responses are embedded in the body of the HTTP response.
- XML-RPC = HTTP + XML + Remote Procedure Calls.
- It is platform independent, so diverse applications can communicate with one another.
- For example, a Java client can speak XML-RPC to a Perl server.
Question 369 – What is a Secure Webservices?
- If we 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.
Question 370 – Checklist for Webservice Performance
- Reduce round trips.
- Prefer message-based programming over remote procedure call (RPC) style.
- Use primitive types for Web service parameters.
- Avoid server state between calls.
- Provide input validation for costly Web methods.
- Check the caching options.
- Check for bulk data transfer and attachments.
- Avoid calling local Web Services.
- Use asynchronous Web methods for I/O operations.
- Do not use asynchronous Web methods when you depend on worker threads.
- Consider calling Web services asynchronously when you have additional parallel work.
- Use asynchronous invocation to call multiple unrelated Web services.
- Call Web services asynchronously for UI responsiveness.
- Set your proxy timeout appropriately.
- Set your ASP.NET timeout greater than your Web service timeout.
- Enable session state only for Web methods that need it.
- Reduce serialization with XmlIgnore.
- Reduce round trips.
- Consider XML compression.
Disclaimer – F5debug Interview Questions & Answers Series:
You may recopy extracts from these pages ("the material") to individual third party websites or to any intranet websites, but only if:
You acknowledge www.f5debug.net as the source of the material. Such acknowledgment should include reference to www.f5debug.net in the copy of the material and should also include “© Karthikeyan Anbarasan, www.f5debug.net ". You inform the third party that these conditions apply to him/her and that he/she must comply with them.