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. Domain.com operates as a pharmaceutical company with many branch offices that are located worldwide. The development and deployment of Extensible Markup Language (XML) Web Services forms part of your responsibilities at Domain.com. You have just developed and deployed an Extensible Markup Language (XML) Web Service that will allow for the exchange of encrypted SOAP messages between the different Domain.com branch offices. The assembly that contains the Web service also contains a SOAP extension class named EncryptionExtension that encrypts the SOAP messages. Due to the size of some of the messages, you implemented a second SOAP extension class named CompressionExtension that compresses SOAP messages. This class exists in the SoapUtilities namespace in an assembly named SoapUtilities.dll
You must modify the Web.config file for the Web service to ensure that compression occurs after encryption.
What should you do? (Choose the correct configuration from the given options.)
A.
<configuration>
<system.web>
<webServices>
<soapExtensionTypes>
<add type=”SoapUtilities.CompressionExtension,SoapUtilities” Priority=”0″
Group=”0″/>
</soapExtensionTypes>
</webServices>
</system.web>
</configuration>
B.
<configuration>
<system.web>
<webServices>
<soapExtensionTypes>
<add type=”SoapUtilities.CompressionExtension,SoapUtilities” Priority=”1″
Group=”0″/>
</soapExtensionTypes>
</webServices>
</system.web>
</configuration>
C.
<configuration>
<system.web>
<webServices>
<soapExtensionTypes>
<add type=”SoapUtilities.CompressionExtension,SoapUtilities” Priority=”1″
Group=”1″/>
</soapExtensionTypes>
</webServices>
</system.web>
</configuration>
D.
<configuration>
<system.web>
<webServices>
<soapExtensionTypes>
<add type=”SoapUtilities.CompressionExtension,SoapUtilities” Priority=”2″
Group=”0″/>
</soapExtensionTypes>
</webServices>
</system.web>
</configuration>
Explanation:
You can either apply a SoapExtension-derived attribute to a Web method or specify the SOAP extension in the Web.config file when configuring a Web service to use SOAP extensions. When specified in the Web.config file, the extension is executed for all Web methods defined for the Web service. The execution processing order of SOAP extensions are:
1. All SOAP extensions that are members of group 0 are executed.
2. All SOAP extensions that are specified declaratively as attributes are executed.
3. All SOAP extensions that are members of group 1 are executed.
Incorrect answers:
A, B, C: You should not set the group number to 0 as it will result in compression to occur before encryption.