Dot Net Web Service Upwork Test

0
123

We don’t guarantee that all provided answers are correct.

Which of the following xml tags does not come with a DISCO document automatically generated by .NET?
Answer

  • discovery
  • schema
  • soap
  • contractRef

Which of the following represents an array in a SOAP message?
Answer

  • <person> <firstname>Joe</firstname> <lastname>Smith</lastname> </person>
  • <people> <person name=’joe smith’/> <person name=’john doe’/> </people>
  • <people> <person name=’joe smith’> <designation/> </person> <person name=’john doe’> <designation/> </person> </people>
  • None of the above

Which of the following classes is the base class for Soap Extensions?
Answer

  • System.Web.Services.Protocols.SoapExtension
  • System.Web.Services.Protocols.SoapExtensions
  • System.Web.Services.SoapExtension
  • System.Web.Services.SoapExtensions
  • None of the above

Which of the following rules must be kept in mind while using SOAP with DIME?
Answer

  • The first record in the DIME message must be the SOAP message
  • Except the first record, the rest of the records in the message are the attachments
  • To refer to any particular attachment within a SOAP message, an src attribute must be used
  • All of the above

Which of the following should you know to send a message correctly while using Web service?
Answers

  • The IP address and other endpoint information
  • The response schema to expect if there is a response
  • Possible headers that may be expected in the request or response, and the schema for those
  • All of the above

WS-Routing specifies a series of elements that can send a SOAP Fault message in response to an error. Which of the following elements are relevant to the SOAP Fault message specified by WS-Routing?
Answers

  • coded
  • messagetext
  • found
  • retryAfter
  • All of the above

Which of the following information does a server need to publish in order to meet a client’s needs
Answer

  • Description Information
  • Service Location
  • Service Schema
  • Service Classification
  • All of the above

Which of the following XML related technologies are part of the .NET Framework’s XML technology?
Answer

  • XML DOM
  • XML Streaming
  • XML Schema
  • All of the above

Which of the following is an example of referring an external document through a SOAP envelope?
Answer

  • <person name=’joe smith‘> <address href=’http://acme.com/data.xml#joe_smith’ /> </person> 
  •  <person name=’joe smith’> <address extern=’http://acme.com/data.xml#joe_smith’ /> </person>
  •  <person name=’joe smith’> <address doc=”d:\HR\person\address\joesmith.xml” /> </person>
  •  <person name=’joe smith’> <address extern=”d:\HR\person\address\joesmith.xml” /> </person>

The following code has stored the data using the multiple-referenced accessor:<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?
Answer

  • * must be prefixed with href value
  • * must be prefixed with id value
  • # must be prefixed with href value
  • # must be prefixed with id value

Which of the following is a process of making resources and services available on a new system, when the previous system fails while using a federated Web service design?
Answer

  • RECOVER
  • ROLLOVER
  • FEDERATION REPAIR
  • None of the above

Which Fault type is used when an error occurs that cannot be directly linked to the processing of the message?
Answer

  • MustUnderstand
  • Server
  • Client
  • None of the above

While creating a client application for a Web service called ‘QuestionBank’, which of the following should be extended by the client class ‘Service1’?
Answer

  • SoapHttpClientProtocol
  • SoapClientProtocol
  • WSDLClientProtocol
  • SoapHttpClient
  • None of the above

You have written a method in your Web service which returns a void value. In order to make a one-way communication, which of the following do you need to do?
Answer

  • You need to set the SoapOnewayMethod attribute
  • You need to bind the soap method with the VoidMethod property
  • You need to set the ‘OneWay’ property to true of the WebServiceBinding attribute
  • You need to set the ‘OneWay’ property to true of the SoapDocumentMethod or SoapRpcMethod attribute
  • None of the above

Which of the following code snippets are serializable?
Answer

  • public class Order { public System.Xml.XmlElement OrderDescription; public int Quantity; public String Name; }
  • public class Order { [XmlAnyAttribute] public System.Xml.XmlAttribute[] anyAttributes; public System.Xml.XmlElement OrderDescription; public int Quantity; public String Name; }
  • public class Order { [XmlAnyElement] public System.Xml.XmlElement[] extraElements; public System.Xml.XmlElement OrderDescription; public int Quantity; public String Name; }
  • All of the above

Refer to the code given below and identify the line numbers that contain errors:
..
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.}

Answer

  • 2
  • 4
  • 5
  • 7
  • 10
  • None of the above

In the .NET UDDI SDK, which of the following contains the businessEntity structure?
Answer

  • WSBusinessEntity
  • BusinessClass
  • BusinessEntity
  • WSBusinessClass
  • None of the above

Which of the following are correct with regard to WS-Routing?
Answer

  • WS-Routing determines the intent of a SOAP message
  • Messages can be sent to logical locations
  • The Web Services Enhancements for Microsoft .NET (WSE) do not support WS-Routing
  • All of the above

WS-Routing specifies a series of elements that can send a SOAP Fault message in response to an error. Which of the following elements are relevant to the SOAP Fault message specified by WS-Routing?
Answer

  • coded
  • messagetext
  • found
  • retryAfter
  • All of the above

Which of the following does the acronym DIME stand for?
Answer

  • Direct Internet Mail Extension
  • Direct Internet Message Encapsulation
  • Direct Internet Mail Encapsulation
  • Direct Internet Message Extension
  • None of the above

Which of the following is not a correct statement regarding schema?
Answer

  • The schema element can contain any number of top-level declarations
  • The XML schema language is based on the Worldwide Web Consortium (W3C)
  • The definitions in an XML schema are contained within the top-level schema element
  • The schema element in an XML schema document cannot use a namespace

SOAP defines four standard types of Faults that belong to the http://www.w3.org/2001/06/soap-envelope namespace. Which of the following is the incorrect Fault code?
Answer

  • VersionMismatch
  • MustUnderstand
  • InvalidMessage
  • Server
  • Client
  • None of the above

Refer to the statements given below and identify the incorrect element:

<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>
Answer

  • <s:Faults>
  • <faultcode>
  • <faultstring>
  • None of the above

Mike has built the following document literal web service client class by hand. This code contains an invalid syntax in one line. Identify this line.
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.}
Answer

  • Line 1
  • Line 2
  • Line 8
  • Line 12
  • Line 13
  • None of the above

Which of the following is correct with regard to the statements given below?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.
Answer

  • Statement 1 is true but statement 2 is false
  • Statement 1 is false but statement 2 is true
  • Both the statements are true
  • Both the statements are false

Which of the following protocols form the basis of the Web Service Architecture?
Answer

  • SOAP
  • WSDL
  • UDDI
  • CORBA
  • All of the above

Mike is writing a RPC-encoded client for his Web service. Which attribute will he use for RPC implementation?
Answer

  • [RpcSoapMethod(“http://mySoapAction”)]
  • [RpcMethod(“http://mySoapAction”)]
  • [SoapRpcMethod(“http://mySoapAction”)]
  • [SoapRpcAction(“http://mySoapAction”)]
  • None of the above

You need to send an image from a Web server to an image server in order to customize the image for the Web surfer. Which of the following options will you use to send binary data with a SOAP message?
Answer

  • Encode the binary data as a string
  • Package the SOAP message into MIME
  • Package the SOAP message into DIME
  • All of the above

You use UDDI operations to find something when you do not know specifically what you are looking for. Which of the following UDDI operations fall in this category?
Answer

  • find_binding
  • find_business
  • find_service
  • find_Model
  • All of the above

Which of the following are the limitations of XML serialization?
Answer

  • Only Classes with a Public Default Constructor will be serialized
  • Only Public Fields and Properties will be serialized
  • Read-Only Fields and Properties will not be serialized
  • Methods and Other Type Information will not be serialized
  • All of the above

Which of the following allows you, as a developer, to intercept every request that comes into an ASP.NET Web Service at various events, such as when the request begins, or when an error occurs?
Answer

  • HTTP filters
  • HTTP modules
  • HTTP formatters
  • All of the above

Which of the following are correct with regard to WS-Referral protocol?
Answer

  • WS-Referral describes a schema for describing referrals
  • One problem with the current draft specification of WS-Referral is that it does not use ‘ttl’ for the expiration
  • WS-Referral statements can state a “for” of either an exact or a prefix nature
  • All of the above

XML Serialization uses stream-based parsers in System.Xml. Which of the following types of streams can be used for serialization and deserialization?
Answer

  • NetworkStream
  • FileStream
  • Stream
  • All of the above

Which of the following are correct with regard to XML serialization?
Answer

  • XML Serialization is not designed to serialize any CLR object into XML
  • XML Serialization is designed to map classes to schemas, and object instances of those classes to XML instances of those schemas
  • The basis of XML Serialization is not the CLR type system; rather, it is the XSD Schema type system
  • All of the above

You are developing a Web service in ASP.NET. Which of the following .net classes will be extended by your service?
Answer

  • System.Web.WebService
  • System.Web.Service
  • System.Web.Services.Service
  • System.Web.Services.WebService True
  • None of the above

Which of the following are correct with regard to operations of WS-Routing?
Answer

  • WS-Routing enables the specification of a message’s forward message path
  • WS-Routing does not support the specification of a reverse message path
  • WS-Routing provides the capability to give messages unique identifiers, and then specify the other messages to which they relate
  • All of the above

The System.Xml.Serialization namespace contains classes that are used to serialize objects into XML format documents or streams. Which serialization class provides the serialization and deserialization functionality?
Answer

  • XmlSerializer
  • xmlSerialization
  • xmlSerialize
  • None of the above

Referring to the statements given below, which of the following is correct?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.
Answer

  • Statement 1 is true but statement 2 is false
  • Statement 1 is false but statement 2 is true
  • Both the statements are true
  • Both the statements are false

Refer to the following code snippet:

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.
Answer

  • 1
  • 2
  • 3
  • None of the above

The fundamental idea behind SOAP is that two applications; regardless of the operating system, the programming language, or any other technical implementation detail, may openly share information using nothing more than a simple message encoded in a way that both the applications understand. Which of the following aspects are required to implement this?
Answer

  • The types of information that are being exchanged
  • The way that information is to be expressed as XML
  • The way to actually send that information
  • None of the above
SHARE
Previous articleSQL Upwork Test
Next articleC# Upwork Test

LEAVE A REPLY

Please enter your comment!
Please enter your name here