MCSD.NET - 70-310 Exam Question:
You are creating an XML Web service that processes highly confidential messages. The service
exposed a Web method named RetrieveMessage that takes as input a code name and returns an
encrypted message.
You create a SOAP extension and override the extension?s ProcessMessage method so that you
can encrypt the message before it is sent back to the caller.
You need to encrypt only the data within the RetrieveMessageResult node of the SOAP
response. You create a function named EncryptMessage that encrypts the
RetrieveMessageResult node. You need to ensure that this method gets called before sending
the message back to the caller.
During which SoapMessageStage should you call EncryptMessage?
A. BeforeSerialize
B. AfterSerialize
C. BeforeDeserialize
D. AfterDeserialize
Answer:
B. AfterSerialize