What should you do?

You work as the Microsoft.NET developer at Domain.com. The Domain.com network consists of a single Active Directory domain named Domain.com. All servers in the domain run Windows Server 2003.
The development of Extensible Markup Language (XML) Web Services forms part of your responsibilities at Domain.com. You are currently developing an Extensible Markup Language (XML) Web Service that will allow Domain.com to locate the delivery trucks that it provides to companies. The Web service clients will send a SOAP similar to the one illustrated below:

<soap:envelope>
<soap:body>
<mobilePhoneNumber xmlns=urn:gov:DOT”>000-000-0000</mobilePhoneNumber> </soap:body>
<soap:envelope>

To this end you create a Web method named GetLocation and apply the appropriate SoapDocumentMethod attribute to this method. Now you need to configure the attribute to enable it to support the SOAP request. What should you do? (Each correct answer presents part of the solution. Choose two.)

You work as the Microsoft.NET developer at Domain.com. The Domain.com network consists of a single Active Directory domain named Domain.com. All servers in the domain run Windows Server 2003.
The development of Extensible Markup Language (XML) Web Services forms part of your responsibilities at Domain.com. You are currently developing an Extensible Markup Language (XML) Web Service that will allow Domain.com to locate the delivery trucks that it provides to companies. The Web service clients will send a SOAP similar to the one illustrated below:

<soap:envelope>
<soap:body>
<mobilePhoneNumber xmlns=urn:gov:DOT”>000-000-0000</mobilePhoneNumber> </soap:body>
<soap:envelope>

To this end you create a Web method named GetLocation and apply the appropriate SoapDocumentMethod attribute to this method. Now you need to configure the attribute to enable it to support the SOAP request. What should you do? (Each correct answer presents part of the solution. Choose two.)

A.
Set the Use property to SoapDocumentUse.Literal.

B.
Set the Use property to SoapDocumentUse.Encoded.

C.
Set the ParameterStyle property to SoapParameterStyle.Bare.

D.
Set the ParameterStyle property to SoapParameterStyle.Wrapped.

Explanation:
SoapDocumentUse.Literal indicates that literal formatting should be used. Thus parameter elements do not have to explicitly specify their types because the elements will then be included in the definitions section of the WSDL document. SoapParameterStyle.Bare as it indicates that parameter may exist as immediate children of the body element in the SOAP request. This can be seen in the illustration that indicates that the mobilePhoneNumber parameter element does not explicitly define its type, and that it exists as a child element of the body element.
Incorrect answers:
B: You should not set the Use property to SoapDocumentUse.Encoded as it indicates that parameter elements must explicitly specify their types.
D: You should not set the ParameterStyle property to SoapParameterStyle.Wrapped indicates that the parameter elements must exist within a single child element of the body element..



Leave a Reply 0

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