CSE686 - Internet Programming

Lecture #9 - Web Services

Web Resources:

Color Lab, Color Codes, HTML tags, Everything HTML, XML, HTML, Scripting, webdeveloper.earthweb, devx..., W3Schools, Web Developer's Virtual Library, World-Wide Web Consortium, WebReference

Content:

This lecture is concerned with Silverlight and Web Services as implemented in Windows Communication Foundation (WCF).
  1. Syllabus describes topics to be covered, reading material for you to digest before coming to class, and due dates for the assigned projects.
  2. Final Projects:

  3. Chalk Talk:

    • Static Web Model
    • Traditional SOAP-based Web Service
    • Windows Communication Foundation
    • Web API
    • REST
  4. Traditional Asp.Net Web Services:

  5. Web-Api Services

  6. Note:


    Everything below this line is now superceded by the Asp.Net WebApi and is not compatible with Asp.Net Mvc 5. I left these materials here in case you need to maintain some legacy code. You will need Visual Studio 2012 to build.


  7. Asp.Net Mvc with WCF Service

    MVC with Service - Interactive Demo
    We create a simple MVC application, add a WCF service, and call it from the application controller methods and a seperate desktop application, as well.

    References for the code above:

  8. Windows Communication Foundation (WCF):

    Note: Building WCF Service Projects:

    To run a WCF service from Visual Studio you will need to run VS as administrator. To run an existing client in Visual Studio you may need to refresh the service reference - expand the service references tab, right click on the service reference your client is using, and select refresh. That is necessary because the tiny web server embedded in Visual Studio uses a different port number when restarted.

    WCF Presentation

    File Service - Lab #8, su10
    Uploads and downloads binary files in blocks, using conventional file processing and WCF communication.

    Timed File Streaming
    Uses file streaming directly supported by the WCF infrastructure.

    Other Sample Code you may wish to Look over:

    Hand-Crafted BasicHttpService
    Shows how to define server channels and client proxies using WCF classes in a simple way for BasicHttpBinding.
    Hand-Crafted WsHttpService
    Shows how to define server channels and client proxies using WCF classes in a simple way for WsHttpBinding.
    WCF Self Host Service
    Microsoft's calculator service, used in many of the MS WCF Samples
    WCF Self Hosted Strings Service
    Demonstrate service sending strings by value, reference, and receiving out string.
    WCF Instances
    Show how to use each of the three server activation models using Microsoft Calculator service.
    WCF Message Passing Communication
    Show how to build a simple, effective message-passing system using WCF data contract.
    WCF Wizard-based Service, WCF Wizard-based Service
    This project shows you what the C# WCF wizard generates. It's probably easier to start from one of my projects.
    MSDN Getting Started with WCF Tutorial

  9. Silverlight:

  10. Lab Assignment #9