XML Web Services and Data

So far, there is nothing from a technological standpoint in this Web service that isn't like the previous Web service. Therefore, let's add another method to the Web service that will return an amortization table for a loan. An amortization table is a table with one entry for each payment on the loan. Each entry shows the amount of principal and interest in the payment and the remaining balance after the payment. You can return tabular data like this using a Web service in two ways: (1) using an ADO.NET dataset or (2) using a custom class.

Returning Data Using a Custom Class

Let's look first at returning the amortization table using a custom class. Here is a Payment class that you can use to hold each entry in the amortization ...

Get .NET and COM Interoperability Handbook, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.