What should you do?

You work as the Microsoft.NET developer at Domain.com. The Domain.com network consists of a single Active Directory domain named Domain.com. All servers in the domain run Windows Server 2003.
The Extensible Markup Language (XML) Web service development forms part of your responsibilities at Domain.com. You are currently developing an Extensible Markup Language (XML) Web Service that contains four Web methods. Each of these four methods accepts a different number of parameters and each method is configured to make use of remote procedure call (RPC) SOAP formatting. You must ensure that each of these four Web methods is capable of being exposed as a Web method by the Web service.

What should you do?

You work as the Microsoft.NET developer at Domain.com. The Domain.com network consists of a single Active Directory domain named Domain.com. All servers in the domain run Windows Server 2003.
The Extensible Markup Language (XML) Web service development forms part of your responsibilities at Domain.com. You are currently developing an Extensible Markup Language (XML) Web Service that contains four Web methods. Each of these four methods accepts a different number of parameters and each method is configured to make use of remote procedure call (RPC) SOAP formatting. You must ensure that each of these four Web methods is capable of being exposed as a Web method by the Web service.

What should you do?

A.
The SoapDocumentMethod attribute should be applied to each of the four methods.
Then set the RequestNamespace property of each attribute to a different value.

B.
The WebService attribute should be applied to the Web service’s class.
Then set the Namespace property of the attribute to “RPC”.

C.
The WebMethod attribute should be applied to each of the four web methods.
Then set the MessageName property of each attribute to a different value.

D.
The SoapRpcService attribute should be applied to the Web service’s class.
Then set the RoutingStyle property of the attribute to SoapServiceRoutingStyleRequestElement.

Explanation:
When you overload Web methods, you need to specify a distinct message name for each web method because Web Services Description Language (WSDL) does not support overloaded operations. You thus need to apply the WebMethod attribute to each of the four methods and set the MessageName property of each of these attributes to a different value.
Incorrect answers:
A: Because the Web methods must make use of RPC formatting, you should apply the SoapRpcMethod attribute to each of the four methods, you cannot apply both a SoapDocumentMethod attribute and a SoapRpcMethods attribute to the same method.
B: The Namespace attribute of the WebService attribute allows you to designate an XML namespace for the operations that are supported by the Web Service, not to ensure exposure.
D: Though it is possible to apply the SoapRpcService attribute to the class OR the SoapRpcMethod attribute to each method to support RPC formatting, it does not allow for overloaded methods to be exposed as Web methods. In this case the methods are already configured to make use of RPC formatting which actually indicates that one of the two attributes is already applied.



Leave a Reply 0

Your email address will not be published. Required fields are marked *