Summary

 
Chapter 15 - Web Services
bySimon Robinsonet al.
Wrox Press 2002
  

In this chapter we have seen how to create and consume Web Services using C# and the VS .NET development platform. Doing this is perhaps surprisingly simple, but is instantly recognizable as something that could prove to be incredibly useful. Already we are seeing many announcements about new Web Services, and I suspect that they will be everywhere before long.

It has also been pointed out, and I'll reiterate it here to push the point home, that Web Services may be accessed from any platform. This is due to the SOAP protocol, which doesn't limit us to .NET.

The main example developed in this chapter illustrates how we can create .NET distributed applications with ease. We have assumed here that you are using a single server to test things out, but there is no reason why the Web Service shouldn't be completely separate from the client. It may even be on a separate server to the database if an additional data tier is required.

The use of data caching throughout is another important technique to master for use in large-scale applications, which may have thousands of users connecting simultaneously . Of course, in such a situation using Microsoft Access as a data source might not necessarily be the best idea!

Exchanging data via SOAP headers, introduced in the last example, is another useful technique that can be worked into your applications. The example used the exchange of a login token, but there is no reason why more complex data shouldn't be exchanged in this way. Perhaps this could be used for simple 'password protection' of Web Services, without having to resort to imposing more complex security.

Finally, it is worth bearing in mind that Web Service consumers don't necessarily have to be web applications. There is no reason why we can't use Web Services from Windows Form applications - which certainly seems like an attractive option for a corporate intranet.

All in all, the potential of Web Services certainly astounds me, and I hope you're impressed too!

In this chapter we have:

  • Looked at how Web Services implement SOAP and WSDL

  • Seen how to expose and consume Web Services

  • Extended the meeting room booker example from the previous chapter to use Web Services

  • Seen how to exchange data using SOAP Headers

  


Professional C#. 2nd Edition
Performance Consulting: A Practical Guide for HR and Learning Professionals
ISBN: 1576754359
EAN: 2147483647
Year: 2002
Pages: 244

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net