What should you do?

You are creating a Web service.
The Web service must be configured to receive the following message.

<soap:Envelope xmlns:soap=”http://schemas.xmlsoap.org/soap/envelope/”>
<soap:Body>
<givenName xmlns=”urn:SampleNS”>given name</givenName>
<surname xmlns=”urn:SampleNS”>surname</surname>
</soap:Body>
</soap:Envelope>

You need to ensure that the Web Services Description Language (WSDL) for the Web service describes the message.

What should you do?

You are creating a Web service.
The Web service must be configured to receive the following message.

<soap:Envelope xmlns:soap=”http://schemas.xmlsoap.org/soap/envelope/”>
<soap:Body>
<givenName xmlns=”urn:SampleNS”>given name</givenName>
<surname xmlns=”urn:SampleNS”>surname</surname>
</soap:Body>
</soap:Envelope>

You need to ensure that the Web Services Description Language (WSDL) for the Web service describes the message.

What should you do?

A.
Write the following code for the Web method.
[WebMethod()]
[SoapDocumentMethod(ParameterStyle=SoapParameterStyle.Bare, Use=SoapBindingUse.Literal)]
public string HelloWorld(string givenName, string surname)
{

}

B.
Write the following code for the Web method.
[WebMethod()]
[SoapDocumentMethod(ParameterStyle=SoapParameterStyle.Wrapped,Use=SoapBindingUse.Encoded)]
public string HelloWorld(string givenName, string surname)
{

}

C.
Write the following code for the Web method.
[WebMethod()]
[SoapDocumentMethod(ParameterStyle=SoapParameterStyle.Wrapped, Use=SoapBindingUse.Literal)]
public string HelloWorld(string givenName, string surname)
{

}

D.
Write the following code for the Web method.
[WebMethod()]
[SoapDocumentMethod(ParameterStyle=SoapParameterStyle.Bare, Use=SoapBindingUse.Encoded)]
public string HelloWorld(string givenName, string surname)
{

}



Leave a Reply 0

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