A SOAP message has the following body.
<soap:Body>
<tns:Greeting>
<Person href="#id1" />
</tns:Greeting>
<tns:User id="id1" xsi:type="tns:User">
<GivenName xsi:type="xsd:string">givenname</GivenName>
<SurName xsi:type="xsd:string">surname</SurName>
</tns:User>
</soap:Body>
You need to configure the Greeting method to accept the SOAP message.
Which code segment should you use?
A.
[WebMethod]
[SoapDocumentMethod(Use=SoapBindingUse.Literal)]
public string Greeting([XmlElement("Person")] User user)
{ …}
B.
[WebMethod]
[SoapDocumentMethod(Use=SoapBindingUse.Encoded)]
public string Greeting([XmlElement("Person")] User user)
{ …}
C.
[WebMethod]
[SoapDocumentMethod(Use=SoapBindingUse.Literal)]
public string Greeting([SoapElement("Person")] User user)
{ …}
D.
[WebMethod]
[SoapDocumentMethod(Use=SoapBindingUse.Encoded)]
public string Greeting([SoapElement("Person")] User user)
{ …}