Web Services Quiz: Issue 4
First of all, I want to credit Christian for pointing out this issue, thanks.
But now the question:
Given the following Web Services implementation, how will the generated XML type for AddRequestMsg look like?
As always, answer and explanation will follow…
public class AddRequestMsg
{
[XmlAttribute]
public int a;
[XmlAttribute]
public int b;
}
public class AddResponseMsg
{
public int result;
}
[WebService(Namespace="uri.test.com")]
public class Service1
{
[WebMethod]
[SoapRpcMethod]
public AddResponseMsg Add(AddRequestMsg request)
{
AddResponseMsg response = new AddResponseMsg();
response.result = request.a + request.b;
return response;
}
}
Comments
- Anonymous
March 28, 2008
PingBack from http://countyanimalshelterblog.info/beat-schweglers-2-cents-web-services-quiz-issue-4/