Online Test Web Services

Online Test Web Services

  1. [XmlElement(Namespace:="http://address")]
  2. [XmlElement(ns="http://address")]
  3. [XmlElement(Namespace="http://address")]
  4. None of the above
Answer: Answer is c

  1. Asynchronous pattern decreases the performance of your application
  2. While using asynchronous pattern, you add two methods: StartYourMethod and EndYourMethod (where YourMethod is the actual name of your method)
  3. The "End" method does not require any special attributes
  4. Unless you have a compelling reason to do otherwise, always use the asynchronous pattern when you consume Web services in your production code
  5. All of the above
Answer: Answer is c, d

Answer: Answer is b

  1. Standard based
  2. Modular
  3. Federated
  4. None of the above
Answer: Answer is c
Further Reading:
Useful resources, Federation is a design methodology for spreading out processes, components, and machines in a way that removes single points of failure. NET Web Services: Architecture and Implementation By Keith Ballinge- Page 12

1. <%@ Service Class="TestClass" Language="C#" %>
2. using System;
3. using System.Web.Service;
4. public class TestClass {
5.   [WebMethod]
6.     public int Add( int a, int b)
7.     {
8.          
return a+b;
9.     }
10. }
  1. line 1
  2. line 3
  3. line 4
  4. line 5
  5. All of the above
Answer: Answer is a, b

Statement 1:.NET Web services use the XmlSerializer as the engine for sending and receiving SOAP messages.
Statement 2:.NET Web services are literal schema-based XML. They are not encoded XML.
  1. Statement 1 is true but statement 2 is false
  2. Statement 1 is false but statement 2 is true
  3. Both the statements are true
  4. Both the statements are false
Answer: Answer is c

  1. RSACryptoServiceProvider
  2. DSACryptoServiceProvider
  3. RijndaelManaged
  4. All of the above
Answer: Answer is c

1. Inquire.Url = "http://uddi.rte.microsoft.com/inquire";
2. FindBusiness findBusiness = new FindBusiness();
3. findBusiness.Names.Add("Royal Airways");
4. BusinessList list = findBusiness.Find();
5. if (list.BusinessInfos.Count > 0)
6. {
7. GetBusinessInfo gb = new GetBusinessInfo();
8. gb.BusinessKeys.Add(bizList.BusinessInfos[0].BusinessKey);
9. BusinessDetail bizDetail = gb.Send();
10. if (bizDetail.BusinessEntities.Count > 0)
11. {
12. ...
13. }
14.}
  1. 2
  2. 4
  3. 5
  4. 7
  5. 10
  6. None of the above
Answer: Answer is b, d

  1. IUserAgent
  2. IHttpFilter
  3. IHttpModule
  4. None of the above
Answer: Answer is d
Further Reading:
Module that will send a SOAP fault for any requests that don't include the right user-agent in the HTTP headers. In this case, the user-agent must be "Cool UserAgent". We will need to import the System and System.Web namespace, and make sure that our class implements the IHttpModule interface.Useful resources, .NET Web Services: Architecture and Implementation By Keith Ballinge- Page 128

Statement 1: A logical name is a URI that necessarily represents the exact location to which a message is sent.
Statement 2: A logical name can have a very different location than the one implied by its logical name, or even multiple physical locations.
  1. Statement 1 is true but statement 2 is false
  2. Statement 1 is false but statement 2 is true
  3. Both the statements are true
  4. Both the statements are false
Answer: Answer is b
Further Reading:
A logical name is a URI that doesn't necessarily represent the exact location to which to send a message. Instead, a logical name can have a very different location than the one implied by its logical name—or even multiple physical locations. Useful resources, .NET Web Services: Architecture and Implementation By Keith Ballinge- Page 236


  1. Inquire.Url = "http://uddi.rte.microsoft.com/inquire";
    FindBusiness fb = new FindBusiness();
    fb.Names.Add("Royal Airways");
    BusinessList list = fb.Send();
  2. Inquire.Url = "http://uddi.rte.microsoft.com/inquire"; 
    FindBusiness fb = new FindBusiness();
    BusinessList list = fb.find("Royal Airways");
  3. Inquire.Url = "http://uddi.rte.microsoft.com/inquire"; 
    FindBusiness fb = new FindBusiness();
    BusinessList list = fb.Send("Royal Airways");
  4. None of the above
Answer: Answer is a

  1. Discovery
  2. Schema
  3. Soap
  4. contractRef
Answer: Answer is b

  1. NetworkStream
  2. FileStream
  3. Stream
  4. All of the above
Answer: Answer is b

  1. The Namespace of the Serialized XML will be http://tempuri.org by default
  2. Properties and Fields will remain in the same Namespace
  3. Properties and Fields will be serialized as Elements
  4. All of the above
Answer: Answer is d

  1. You need to set the SoapOnewayMethod attribute
  2. You need to bind the soap method with the VoidMethod property
  3. You need to set the 'OneWay' property to true of the WebServiceBinding attribute
  4. You need to set the 'OneWay' property to true of the SoapDocumentMethod or SoapRpcMethod attribute
  5. None of the above
Answer: Answer is d

  1. The schema element can contain any number of top-level declarations
  2. The XML schema language is based on the Worldwide Web Consortium (W3C)
  3. The definitions in an XML schema are contained within the top-level schema element
  4. The schema element in an XML schema document cannot use a namespace
Answer: Answer is d
Further Reading:
Useful resources,XML SchemaXDR Schema

  1. WSBusinessEntity
  2. BusinessClass
  3. BusinessEntity
  4. WSBusinessClass
  5. None of the above
Answer: Answer is c
Further Reading:
In the .NET UDDI SDK, the businessEntity structure is contained within the BusinessEntity object.

  1. SoapRpcMethodsAttribute
  2. SoapRpcServiceAttribute
  3. SoapRpcServiceMethodsAttribute
  4. SoapRpcService
  5. None of the above
Answer: Answer is b
Further Reading:
If you put the SoapRpcServiceAttribute attribute on the class, then all methods will be RPC encoded. If instead you want to control each method, you can use the SoapRpcMethodAttribute attribute on each method

  1. HTTP filters
  2. HTTP modules
  3. HTTP formatters
  4. All of the above
Answer: Answer is b
Further Reading:
HTTP modules allow you as a developer to intercept every request that comes into ASP.NET, at several various events, such as when the request begins, or when an error occurs. They are similar to ISAPI filters. If a SOAP extension is the wrong place to do something, then you certainly can do it with a module.

Statement 1: One of the most powerful design decisions with SOAP was to make it transport independent, which means that a message can be sent over any transport that is chosen.
Statement 2: SOAP uses different envelope formats for different transports.
  1. Statement 1 is true but statement 2 is false
  2. Statement 1 is false but statement 2 is true
  3. Both the statements are true
  4. Both the statements are false
Answer: Answer is a
Further Reading:
One of the most powerful design decisions with SOAP was to make it transport independent, which means that you can send a message over any transport you choose. SOAP merely specifies how to wrap the envelope in a standard manner.


  1. [SoapDocumentMethod("http://mySoapAction",SoapBindingUse.Encoded)]
  2. [SoapDocumentMethod("http://mySoapAction",Encoded)]
  3. [SoapDocumentMethod("http://mySoapAction",SoapEncoded)]
  4. [SoapDocumentMethod("http://mySoapAction",SoapBinding.Encoded)]
Answer: Answer is a
Further Reading:
Two things need to build a client that sends the message as encoded SOAP. First, you need to make sure that the types you are using are shaped correctly; using the Soap attributes from System.Xml.Serialization instead of the Xml attributes. Then, you need to set the Use property of the [SoapDocumentMethod] attribute to indicate that this client is encoded, not literal XML.

Statement 1: Any WSDL that is missing a service element and the child port pointing to a specific address is not abstract.
Statement 2: In practice, the UDDI binding is for abstract WSDLs that are describedthrough the binding section.
  1. Statement 1 is true but statement 2 is false
  2. Statement 1 is false but statement 2 is true
  3. Both the statements are true
  4. Both the statements are false
Answer: Answer is b
Further Reading:
Any WSDL that is missing a service element and the child port pointing to a specific address is abstract. In practice, the UDDI binding is for abstract WSDLs that are described down through the binding section.

  1. Windows Services Description Language
  2. Web Servlets Description Language
  3. Web Services Description Language
  4. Web Services Documentation Language
Answer: Answer is c

  1. The value of an XML node
  2. A node (an XML element)
  3. An entire XML document
  4. All of the above
Answer: Answer is d

  1. VersionMismatch
  2. MustUnderstand
  3. InvalidMessage
  4. Server
  5. Client
  6. None of the above
Answer: Answer is c

  1. TCP/IP
  2. UDP
  3. HTTP
  4. SMTP
  5. All of the above
Answer: Answer is e

  1. MustUnderstand
  2. Server
  3. Client
  4. None of the above
Answer: Answer is a
Further Reading:
soap:MustUnderstand is the code that should be sent for headers that are not understood.

  1. Windows form
  2. Web form
  3. Web service
  4. All of the above
Answer: Answer is d
Further Reading:
Client access is accomplished via custom proxy classes that use the WebRequest and HttpWebRequest classes. Any kind of .NET application can use these proxy classes: a Windows form, a Web form, or even other Web service.

<Person>
<Address href="address1" />
</Person>
<Address id="address1" />
Which of the following is the correct way to solve the error in the code given above?
  1. *must be prefixed with href value
  2. * must be prefixed with id value
  3. # must be prefixed with href value
  4. # must be prefixed with id value
Answer: Answer is c
Further Reading:
Object references are expressed via href and id attributes. If you give elements IDs to name them, then you can then refer to those elements in multiple places (multi-ref) using the href syntax, prepending the # symbol.

  1. Symmetric-Security
  2. Symmetric-Algorithm
  3. Symmetric-Encryption
  4. None of the above
Answer: Answer is b


  1. XML Serialization is not designed to serialize any CLR object into XML
  2. XML Serialization is designed to map classes to schemas, and object instances of those classes to XML instances of those schemas
  3. The basis of XML Serialization is not the CLR type system; rather, it is the XSD Schema type system
  4. All of the above
Answer: Answer is d

Statement 1: RPC-encoded clients are very similar to document-encoded ones.
Statement 2: RPC-encoded clients need to set the Use property of the [SoapRpcMethod("http://mySoapAction")] attribute to indicate that this client is encoded, and not literal XML.
  1. Statement 1 is true but statement 2 is false
  2. Statement 1 is false but statement 2 is true
  3. Both the statements are true
  4. Both the statements are false
Answer: Answer is a

<description
Namespace ="http://schemas.xmlsoap.org/wsdl/"
location="http://keithba.com/service.asmx?wsdl" />
<description
Namespace ="http://XHTML/"
location="http://keithba.com/service/Contents.html" />
  1. The "service" element can contain only one description
  2. The "location" attribute can contain only a WSDL link
  3. The "location" attribute can contain only an html link
  4. The attribute "Namespace" is invalid
  5. None of the above
Answer: Answer is d

  1. [RpcSoapMethod("http://mySoapAction")]
  2. [RpcMethod("http://mySoapAction")]
  3. [SoapRpcMethod("http://mySoapAction")]
  4. [SoapRpcAction("http://mySoapAction")]
  5. None of the above
Answer: Answer is c

  1. System.Web.Services.Protocols.SoapExtension
  2. System.Web.Services.Protocols.SoapExtensions
  3. System.Web.Services.SoapExtension
  4. System.Web.Services.SoapExtensions
  5. None of the above
Answer: Answer is a

  1. The first record in the DIME message must be the SOAP message
  2. Except the first record, the rest of the records in the message are the attachments
  3. To refer to any particular attachment within a SOAP message, an src attribute must be used
  4. All of the above
Answer: Answer is a, b
Further Reading:
When using SOAP with DIME, there are only a couple of really important rules to remember: The first record in the DIME message must be the SOAP message, and the rest of the records in the message are the attachments. Each attachment is assigned an ID; therefore, to refer to any particular attachment within a SOAP message, use an href attribute.

...
1. XmlSerializer ser = new XmlSerializer( typeof(ServiceDescription) );
2. FileStream objFile = new FileStream( txtWSDL.Text, FileMode.Open );
3. ServiceDescription objSD = ser.Deserialize( file );
4. file.Close();
The code given above opens a WSDL file in the fileStream object 'objFile' from the location given in txtWSDL.Text. But on opening WSDL in the ServiceDescription object 'objSD', the code generates an error. Identify the line number that contains the error.
  1. 1
  2. 2
  3. 3
  4. None of the above
Answer: Answer is c

  1. BusinessService
  2. BusinessEntity
  3. CorporationEntity
  4. None of the above
Answer: Answer is b

  1. WS-Inspection is a simple XML format for gathering together available services
  2. WS-Inspection describes the service policy
  3. WS-Inspection has the ability to link to UDDI registrations that give more information about a listed service
  4. WS-Inspection documents have a root element with the local name WSInspection
  5. All of the above
Answer: Answer is a, c

  1. Only before the body
  2. Only after the body
  3. Only before the envelope
  4. Anywhere in the message
Answer: Answer is a



  1. The types of information that are being exchanged
  2. The way that information is to be expressed as XML
  3. The way to actually send that information
  4. None of the above
Answer: Answer is b

  1. WSDescription
  2. WebServiceDescription
  3. ServiceDescription
  4. None of the above
Answer: Answer is c

  1. XmlSerializer
  2. xmlSerialization
  3. xmlSerialize
  4. None of the above
Answer: Answer is a

  1. WSDL is used for describing the network services offered by the client
  2. WSDL is used for describing the network services offered by the Server
  3. WSDL is XML based
  4. The WSDL file describes the message format that the client must follow
Answer: Answer is c, d

  1. SoapHttpClientProtocol
  2. SoapClientProtocol
  3. WSDLClientProtocol
  4. SoapHttpClient
  5. None of the above
Answer: Answer is e

When you serialize an array that is a member of a class, the result is a piece of structured XML that contains (a) a top element which is, by default, the name of the class member, and (b) any number of child elements, one for each value in the array.
  1. True
  2. False
Answer: Answer is a

  1. public String[] Street;[XmlArray("StreetName",street)];
  2. [XmlArray("StreetName")]
         public String[] Street;
    
  3. public String[] Street;
            [XmlArrayName("StreetName"),Street];
    
  4. None of the above
Answer: Answer is b

  1. Details
  2. Description
  3. Detail
  4. comment
Answer: Answer is c

<s:Envelope xmlns:s="...">
<s:Body>
<s:Faults>
<faultcode>Client.Authentication</faultcode>
<faultstring>
Invalid credentials
</faultstring>
<faultactor>http://acme.com</faultactor>
<details>
<!-- application specific details -->
</details>
</s:Fault>
</s:Body>
</s:Envelope>
  1. <s:Faults>
  2. <faultcode>
  3. <faultstring>
  4. None of the above
Answer: Answer is a

  1. You will register the extension in the machine.config file
  2. You will register the extension with the application's configuration file
  3. You will pass method-specific information to the extension via the attribute
  4. You will do all of the above
Answer: Answer is d




  1. Only Classes with a Public Default Constructor will be serialized
  2. Only Public Fields and Properties will be serialized
  3. Read-Only Fields and Properties will not be serialized
  4. Methods and Other Type Information will not be serialized
  5. All of the above
Answer: Answer is e

  1. Universal Description, Discovery, and Investigation
  2. Universal Description, Discovery, and Integration
  3. Universal Discovery, Definition , and Integration
  4. None of the above
Answer: Answer is b

  1. WSDLFormatter
  2. WebServiceClientExtension
  3. WSDLExtensionFormatter
  4. ServiceDescriptionFormatter
  5. None of the above
Answer: Answer is d

  1. System.Web.WebService
  2. System.Web.Service
  3. System.Web.Services.Service
  4. System.Web.Services.WebService
  5. None of the above
Answer: Answer is d

  1. Direct Internet Mail Extension
  2. Direct Internet Message Encapsulation
  3. Direct Internet Mail Encapsulation
  4. Direct Internet Message Extension
  5. None of the above
Answer: Answer is b

...
filename = "OrderDetails.xml";
FileStream stream = new FileStream( filename , FileMode.Open);
XmlValidatingReader reader = new XmlValidatingReader(stream);
...
Gavin is trying to open an xml which contains "order details" returned by a Web service, through this code, but an error is being generated in the code. Which of the following might be the cause of error?
  1. XmlValidatingReader is not a valid class
  2. In the constructor of XmlValidatingReader, FileStream object is passed instead of XmlTextReader object
  3. In the constructor of XmlValidatingReader, FileStream object is passed instead of XmlReader object
  4. None of the above
Answer: Answer is b

<s:Envelope xmlns:s="...">
<s:Body>
<s:Fault>
<faultcode>Client.Authentication</faultcode>
<faultstring>
Invalid credentials
</faultstring>
<faultactor>http://acme.com</faultactor>
<detail>
<!-- application specific details -->
</detail>
</s:Fault>
</s:Body>
</s:Envelope>

  1. Faultcode
  2. Faultstring
  3. Detail
  4. None of the above
Answer: Answer is d

  1. WSDL forces a clean separation between data (as found in messages)
  2. WSDL provides the abstract definition of a set of message-sending operations
  3. WSDL provides the particular binding information needed to format and to send a message correctly
  4. All of the above
Answer: Answer is d

  1. find_binding
  2. find_business
  3. find_service
  4. find_Model
  5. All of the above
Answer: Answer is a, b, c

Statement 1: A Web service is not a web site that a user reads.
Statement 2: A Web service is something another process or another machine uses.
  1. Statement 1 is true but statement 2 is false
  2. Statement 1 is false but statement 2 is true
  3. Both the statements are true
  4. Both the statements are false
Answer: Answer is c




  1. WS-Referral describes a schema for describing referrals
  2. One problem with the current draft specification of WS-Referral is that it does not use 'ttl' for the expiration
  3. WS-Referral statements can state a "for" of either an exact or a prefix nature
  4. All of the above
Answer: Answer is a, c

  1. Description Information
  2. Service Location
  3. Service Schema
  4. Service Classification
  5. All of the above
Answer: Answer is a, b

  1. WS-Routing determines the intent of a SOAP message
  2. Messages can be sent to logical locations
  3. The Web Services Enhancements for Microsoft .NET (WSE) do not support WS-Routing
  4. All of the above
Answer: Answer is a, b

  1. XML DOM
  2. XML Streaming
  3. XML Schema
  4. All of the above
Answer: Answer is d

  1. Deserizable
  2. Compatible
  3. Equals
  4. CanDeserialize
  5. None of the above
Answer: Answer is d

  1. Encode the binary data as a string
  2. Package the SOAP message into MIME
  3. Package the SOAP message into DIME
  4. All of the above
Answer: Answer is d

  1. A security token in the most basic sense is a piece of security-related information
  2. A signed security token is a piece of security information such as a Kerberos ticket or an x.509 certificate that is cryptographically signed
  3. An unsigned security token contains a cryptographic signature that can verify its issuer
  4. All of the above
Answer: Answer is a, b

  1. SOAP Faults communicate information about errors that may have occurred during the processing of a SOAP message
  2. SOAP Faults generate a fault during the processing of a SOAP message
  3. SOAP Faults describe those faults which are not covered
  4. None of the above
Answer: Answer is d

  1. public class Order 
    {
         public System.Xml.XmlElement OrderDescription;
         public int Quantity;
         public String Name;
    }
    
    
  2. public class Order 
    {
         [XmlAnyAttribute]
         public System.Xml.XmlAttribute[] anyAttributes;
    
         public System.Xml.XmlElement OrderDescription;
         public int Quantity;
         public String Name;
    }
    
    
  3. public class Order 
    {
         [XmlAnyElement]
         public System.Xml.XmlElement[] extraElements;
    
         public System.Xml.XmlElement OrderDescription;
    
         public int Quantity;
         public String Name;
    }
    
    
  4. All of the above
Answer: Answer is d

  1. Faultcode
  2. Faultstring
  3. Faultactor
  4. faultdescription
Answer: Answer is d






  1. SOAP extensions enable developers to modify the request or response streams of SOAP messages
  2. SOAP extensions are applied to a particular operation with a custom SOAP extension attribute, or registered with the application (or machine) configuration file
  3. Description formatters can be created to add custom WSDL extensions, and then read to add these SOAP extension attributes
  4. HTTP modules and custom Web requests can be used only for a lower level extensibility
  5. The Web Services Management for Microsoft .NET (WSM) can enhance .NET Web Services for various Web service protocols that extend beyond the baseline, such as WS-Attachments and WS-Security
  6. All of the above
Answer: Answer is a, b, c

  1. SOAP
  2. WSDL
  3. UDDI
  4. CORBA
  5. All of the above
Answer: Answer is a, b, c

  1. The hash is a nearly unique digest of the message
  2. The hash is encrypted using the public key of the sender
  3. The encrypted hash serves as a signature of the sender and is sent separately from the decrypted message
  4. The hash is the opposite of the usual process used in encryption, in which the public key is used to encrypt, and the plain text is not sent
Answer: Answer is a, b, d

  1. WS-Routing enables the specification of a message's forward message path
  2. WS-Routing does not support the specification of a reverse message path
  3. WS-Routing provides the capability to give messages unique identifiers, and then specify the other messages to which they relate
  4. All of the above
Answer: Answer is a, c

  1. xmlValidateTextReader
  2. xmlValidtor
  3. XmlTextReader
  4. XmlValidatingReader
  5. None of the above
Answer: Answer is d

  1. The IP address and other endpoint information
  2. The response schema to expect if there is a response
  3. Possible headers that may be expected in the request or response, and the schema for those
  4. All of the above
Answer: Answer is d

1. [WebServiceBinding("MyBinding", "http://MyNS")]
2. public class CustomWebMethods : SoapHttpClientProtocol
3. {
4.      public CustomWebMethods()
5.      {
6.            this.Url = "http://localhost:8080";
7.      }

8.      [DocumentMethod("http://mySoapAction")]
9.      public int Add( int x, int y)
10.     {
11.            Object[] args = {x, y};
12.            Object[] responseMessage = this.Invoke( "Add", args );
13.            return ((int)(responseMessage[0]));
14.      }
15.}
  1. Line 1
  2. Line 2
  3. Line 8
  4. Line 12
  5. Line 3
  6. None of the above
Answer: Answer is c

  1. Coded
  2. Messagetext
  3. Found
  4. retryAfter
  5. All of the above
Answer: Answer is d

  1. XML Schema
  2. SOAP Engine
  3. XML Serialization
  4. None of the above
Answer: Answer is c

  1. RECOVER
  2. ROLLOVER
  3. FEDERATION REPAIR
  4. None of the above
Answer: Answer is b



Share this article :

Post a Comment

 
Copyright © 2014. Mominul's Diary - All Rights Reserved
Developed by Mominul Islam