Which code segment should you use?

You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5
You need to ensure that data sent in a SOAP header is in the following XML format.

<Data>
<string>String 1</string>
<string>String 2</string>
<string>String 3</string>
</Data>

Which code segment should you use?

You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5
You need to ensure that data sent in a SOAP header is in the following XML format.

<Data>
<string>String 1</string>
<string>String 2</string>
<string>String 3</string>
</Data>

Which code segment should you use?

A.
[MessageContract]
public class MyMessage
{
[MessageHeader]
public string[] Data;
}

B.
[MessageContract]
public class MyMessage
{
[MessageHeaderArray]
public string[] Data;
}

C.
[MessageContract]
public class MyMessage
{
[MessageProperty]
public string[] Data;
}

D.
[MessageContract]
public class MyMessage
{
[MessageBodyMember (Order=0)]
public string[] Data;
}



Leave a Reply 0

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