first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

MCAD/MCSD Notes: Chapter 7, Lesson 5; Consuming XML Web Services

Lesson 5: Consuming XML Web Services

This lesson is a very brief overview of Web services support in the .NET Framework. The concept of the "Microsoft WebService Behavior" is introduced here.

The above quote is listed here for 'posterity' as the use of the term "business logic" is by now threadbare!

As of this writing, IBM, Microsoft, NTT Communications, and SAP jointly own the registry. For more information, see:

http://uddi.org/find.html

The opinion here is that this a true Microsoft innovation. Adding a Web Reference in Visual Studio .NET, automatically creates WSDL (Web Services Description Language) for SOAP calls through a proxy class. For a Microsoft-centric understanding of WDSL, see "Understanding WSDL" at:

http://msdn.microsoft.com/library/en-us/dnwebsrv/html/understandWSDL.asp

The following is a SOAP call to Amazon.com:

com.amazon.soap.AmazonSearchService ws =
    new com.amazon.soap.AmazonSearchService();
com.amazon.soap.AsinRequest req =
    new MCSDWebAppsCS.com.amazon.soap.AsinRequest();
com.amazon.soap.ProductInfo info =
    new MCSDWebAppsCS.com.amazon.soap.ProductInfo();

req.asin = "0782113273";
req.devtag = "XXXXXXXXXXXXXX";
req.tag = "thekintespacec00A";
req.type = "lite";

info = ws.AsinSearchRequest(req);
com.amazon.soap.Details product = info.Details[0];
body.InnerHtml = String.Format("Product Name: {0}",product.ProductName);

The Microsoft WebService Behavior is one asynchronous solition to the problem of waiting on Web services. The sample code for this lesson includes a "WebService Behavior" HTC file that has over 2000 lines of code! For more information, see "Using the WebService Behavior" at:

http://msdn.microsoft.com/workshop/author/webservice/using.asp

mod date: 2005-07-29T22:58:46.000Z