Limitations of Web Services

The ASP.NET framework makes it so easy to expose and consume web services that it’s easy to forget about the communication layer between the client and server. Because web services are built on the SOAP protocol, their capabilities are limited to the capabilities of SOAP. The most important points to remember are:

No callback mechanism

For a web service to call back to a client, the client has to handle incoming HTTP requests. Virtually no client systems are configured this way, so callbacks generally are not an option. If a callback system is absolutely required, it could be faked by writing methods in the client and server allowing the client component to periodically poll the server to determine if events have occurred.

No transactions across the Web

The SOAP protocol currently does not provide any transaction support. A web-service method can begin a new transaction, and local resources will enlist on that transaction, but a web service can’t enlist on an existing transaction.

Exceptions are returned as SOAP faults

When there is some error in processing a web-method call, the web service responds with a SOAP fault. If the client of the web service is implemented on the .NET platform, the client receives a SoapException exception (defined in the System.Web.Services.Protocols namespace), even if both the client and server are using .NET. Put another way, even if both client and server are running on .NET, exceptions thrown on the server aren’t raised as ...

Get Programming Visual Basic .NET 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.