Which code segment should you use?

You are developing a new version of an existing message contract named
CustomerDetailsVersion1. The new version of the message contract must add a
Department field of type String to the SOAP header. You create a new class named
GustomerDetailsVersion2 that inherits from CustomerDetailsVersion1. You need to ensure
that all client applications can consume the service. Which code segment should you use?

You are developing a new version of an existing message contract named
CustomerDetailsVersion1. The new version of the message contract must add a
Department field of type String to the SOAP header. You create a new class named
GustomerDetailsVersion2 that inherits from CustomerDetailsVersion1. You need to ensure
that all client applications can consume the service. Which code segment should you use?

A.
[MessageContract] public class CustomerDetailsVersion2 : CustomerDetailsVersion1 {
[MessageHeader(MustUnderstand = true)] public string Department; }

B.
[MessageContract] public class CustomerDetailsVersion2 : CustomerDetailsVersion1 {
[MessageHeader(MustUnderstand = false)] public string Department; }

C.
public class CustomerDetailsVersion2 : CustomerDetailsVersion1 {
[MessageHeader(MustUnderstand = true)] public string Department; }

D.
public class CustomerDetailsVersion2 : CustomerDetailsVersion1 { [ MessageHeader(
MustUnderstand = false ) ] public string Department; }

Explanation:



Leave a Reply 0

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