.NET - PowerPoint PPT Presentation

1 / 39
About This Presentation
Title:

.NET

Description:

Visual Studio.NET Peter Ty Developer Evangelist.NET and Developer Group – PowerPoint PPT presentation

Number of Views:42
Avg rating:3.0/5.0
Slides: 40
Provided by: ipf2
Category:
Tags: net | arrays | structures

less

Transcript and Presenter's Notes

Title: .NET


1
XML Web Services in Visual Studio.NET Peter
Ty Developer Evangelist .NET and Developer Group
2
Agenda
  • Web Service Infrastructure
  • Web Services in Visual Studio .NET
  • Hardcore Web Services

3
Agenda
  • Web Service Infrastructure
  • Web Services in Visual Studio .NET
  • Hardcore Web Services

4
Web Service InfrastructureWhat makes a Web
Service?
  • Web Service (ASMX in ASP .NET)
  • Invoke Web Service methods

5
Web Service InfrastructureWhat makes a Web
Service?
  • Web Service (ASMX in ASP.NET)
  • Invoke Web Service methods
  • Web Service Description Language (WSDL)
  • Describe Web Services
  • Describes dependencies (e.g., DataSets / XSD)

XSD
6
Web Service InfrastructureWhat makes a Web
Service?
  • Web Service (ASMX in ASP.NET)
  • Invoke Web Service methods
  • Web Service Description Language (WSDL)
  • Describe Web Services
  • Describes dependencies (e.g., DataSets / XSD)
  • Discovery Documents (DISCO)
  • Publish Web Services

XSD
7
Web Service InfrastructureWhat makes a Web
Service?
  • Web Service (ASMX in ASP.NET)
  • Invoke Web Service methods
  • Web Service Description Language (WSDL)
  • Describe Web Services
  • Describes dependencies (e.g., DataSets / XSD)
  • Discovery Documents (DISCO)
  • Publish Web Services
  • UDDI

XSD
8
Web Service InfrastructureProtocols
  • Basic HTTP Get and HTTP Post
  • Primitives (integers, strings, etc)
  • Arrays of primitives
  • Default Simple Object Access Protocol (SOAP)
  • Structures
  • Enumerations
  • Classes
  • XML DataSets
  • Arrays of anything

9
Agenda
  • Web Service Infrastructure
  • Web Services in Visual Studio .NET
  • Hardcore Web Services

10
Web Services in Visual Studio .NETTools
  • On the Server Side
  • Generates WSDL
  • Generates .vsdisco
  • Generates HTML text page
  • Supports breakpoints, tracing, etc.
  • On the Client Side
  • Generates proxy class with sync and async calls
  • Supports Step-Into across web service call

11
Build Your First Web Service
  • Define a vision
  • Brainstorming ideas
  • Set Deliverables (what to expose)
  • Imagine how much people will love it
  • Lets build it !!

12
Two Quick Steps to your first Web Service
  • Step 1. Create a project
  • Choose your favorite programming language
  • Choose the web service project type
  • Give it a Name

13
(No Transcript)
14
Two Quick Steps to your first Web Service
  • Step 2. Add a Web Service to the Project
  • Name the Web Service
  • Code a Function
  • Add an attribute keyword ltWebMethod()gt to turn
    that function into a Web Service method !!
  • Thats it !!

15
(No Transcript)
16
(No Transcript)
17
(No Transcript)
18
Build Web Services using Visual Studio.NET
  • Expose functionality as service
  • No need to learn XML
  • Interface is automatically generated
  • Seamless deployment
  • Reuse existing Web Services
  • VS.NET generates the plumbing
  • Full IntelliSense support
  • Build and consume with any VS language

19
Build Your Web Service Clients
  • Web based (Browser) or Windows Based
  • Unified programming model
  • Just Drag and Drop and a little code
  • Imagine how you will love it
  • Lets build it !!

20
Three Quick Steps to your first Web Service Client
  • Step 1. Create a project
  • Choose your favorite programming language
  • Choose the correct project type (ASP.NET web
    applications)
  • Give it a Name
  • Step 2. Add a Web Reference to the Project
  • Locating a web service
  • Add the reference for the target web service
  • And

21
(No Transcript)
22
Quick Steps to your first Web Service Client
  • Step 3. Drag and Drop your way to a web form
    client (plus a little coding)
  • Use the tool box and drag and drop elements to
    the form
  • Click on a control (a button usually) to open the
    code behind page
  • Implement any code to take action (call the web
    service!!)
  • Thats it !!

23
(No Transcript)
24
(No Transcript)
25
Test that Web Service Client
  • Run Solution Build
  • Right click the aspx page and choose to view in
    browser
  • Test out the web service through this web client
    you built !!

26
(No Transcript)
27
More Web Services demo!
28
Agenda
  • Web Service Infrastructure
  • Web Services in Visual Studio .NET
  • Hardcore Web Services

29
Hard Core Web ServicesASP .NET Intrinsics
  • Request
  • Server Variables (Host Address, Host Name)
  • Cookies
  • Security (Client Certificate, Authentication,
    Encryption)
  • User
  • Identity
  • Role
  • Session and Application
  • State
  • Response
  • Cookies
  • Cache

30
Hard Core Web ServicesSecurity
  • Basic, Digest, Passport, Kerberos, and Windows
    authentication
  • Roll your own authentication
  • HTTPS / SSL encryption
  • Supports many business models
  • Secure ecommerce transactions
  • Pay per use
  • Subscription

31
Hard Core Web ServicesAsynchronous Calls
  • Synchronous Programming Model
  • Foo(Param1, Param2) As String
  • Asynchronous Programming Model
  • BeginFoo(Param1, Param2, Callback)
  • Callback(AsyncResult)
  • EndFoo(AsyncResult) As String

32
Hard Core Web ServicesSOAP Headers - Server
  • Make a Class That Inherits SoapHeader
  • Add Custom Properties
  • Associate This With Your Web Service
  • Public Class MyHeader Inherits SoapHeader
  • Public Username As String
  • Public Password As String
  • End Class

33
Hard Core Web ServicesSOAP Headers - Client
  • Create Instance of the Header Class
  • Populate With Values
  • Attach To Web Service Object
  • Call Method
  • WebServ ws new WebServ()
  • MyHeader a new MyHeader()
  • a.Username "admin"
  • a.Password "password"
  • ws.MyHeader a
  • ws.DoSomething()

34
Hard Core Web ServicesSoapExtension
  • Used for More Advanced Functionality
  • Intercept Calls to a Web Service
  • Pre and Post Processing

35
Hardcore Web Services
36
Session Summary
  • Web Services Are The Building Blocks For The Next
    Generation Of The Internet
  • Gives Client Access to any kind of Data
  • Make Business-to-Business Easy
  • Visual Studio .NET Provides Great Tools

37
Resources
  • MSDN Web site at
  • msdn.microsoft.com
  • External Sites
  • www.gotdotnet.com
  • Looking for ideas? Web Service Search Engine
  • http//www.salcentral.com/salnet/webserviceswsdl.a
    sp

38
Questions And Answers
39
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com