O'Reilly logo

Real World XML Web Services: For VB and VB .NET Developers by Yasser Shohoud

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

13.5. Usage Accounting

Usage accounting can also be implemented by simply applying the usage accounting SOAP extension built in Chapter 10. You do this by adding the Accounting attribute to each method for which you want to track usage accounting. Assuming you already applied the security extension, you don't need to do anything else to apply usage accounting. Listing 13.6 shows the GetTemperature and GetWeather methods with the Accounting attribute added.

Listing 13.6. Applying the security and SOAP extensions using attributes (VBWSBook\Chapter13\Weather.asmx.vb)
 <WebMethod(), _ SoapDocumentMethod( _ Binding:="WeatherInterface", _ Action:="", _ ParameterStyle:=SoapParameterStyle.Bare), _ SoapSecurity("Temperature"), _ SoapHeader("sessHdr", ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required