XML Web Services in Visual Studio ®.NET NameTitleCompany.

26
  • date post

    19-Dec-2015
  • Category

    Documents

  • view

    232
  • download

    3

Transcript of XML Web Services in Visual Studio ®.NET NameTitleCompany.

XML Web Services in XML Web Services in Visual StudioVisual Studio®® .NET .NET

NameName

TitleTitle

CompanyCompany

AgendaAgenda Web Service InfrastructureWeb Service Infrastructure Web Services in Visual Studio .NETWeb Services in Visual Studio .NET Hardcore Web ServicesHardcore Web Services

Session PrerequisitesSession Prerequisites

Familiarity with Client/Server or Web Familiarity with Client/Server or Web DevelopmentDevelopment

Level 200Level 200

AgendaAgenda Web Service InfrastructureWeb Service Infrastructure Web Services in Visual Studio .NETWeb Services in Visual Studio .NET Hardcore Web ServicesHardcore Web Services

Web Service (ASMX in ASP .NET)Web Service (ASMX in ASP .NET) Invoke Web Service methodsInvoke Web Service methods

Web Service InfrastructureWeb Service InfrastructureWhat makes a Web Service?What makes a Web Service?

ASMXASMX

ASMXASMX

Web Service (ASMX in ASP+)– Invoke Web Service methods

Web Service Description Language (WSDL)– Describe Web Services– Describes dependencies (e.g., DataSets / XSD)

Web Service InfrastructureWeb Service InfrastructureWhat makes a Web Service?What makes a Web Service?

XSDXSDWSDLWSDL

Web Service (ASMX in ASP+)– Invoke Web Service methods

Web Service Description Language (WSDL)– Describe Web Services– Describes dependencies (e.g., DataSets / XSD)

Discovery Documents (DISCO)– Publish Web Services

Web Service InfrastructureWeb Service InfrastructureWhat makes a Web Service?What makes a Web Service?

ASMXASMX

XSDXSDWSDLWSDL

WSDLWSDLDISCODISCO

Web Service (ASMX in ASP+)– 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

Web Service InfrastructureWeb Service InfrastructureWhat makes a Web Service?What makes a Web Service?

ASMXASMX

XSDXSDWSDLWSDL

WSDLWSDLDISCODISCO

DISCODISCOUDDIUDDI

Web Service InfrastructureWeb Service InfrastructureProtocolsProtocols

Basic: HTTP Get and HTTP PostBasic: HTTP Get and HTTP PostPrimitives (integers, strings, etc)Primitives (integers, strings, etc)Arrays of primitivesArrays of primitives

Default: Simple Object Access Default: Simple Object Access Protocol (SOAP)Protocol (SOAP)StructuresStructuresEnumerationsEnumerationsClassesClassesXML DataSetsXML DataSetsArrays of anythingArrays of anything

AgendaAgenda Web Service InfrastructureWeb Service Infrastructure Web Services in Visual Studio .NETWeb Services in Visual Studio .NET Hardcore Web ServicesHardcore Web Services

Web Services in Visual Studio .NETWeb Services in Visual Studio .NETToolsTools On the Server SideOn the Server Side

Generates WSDLGenerates WSDL Generates .vsdiscoGenerates .vsdisco Generates HTML text pageGenerates HTML text page Supports breakpoints, tracing, etc.Supports breakpoints, tracing, etc.

On the Client SideOn the Client Side Generates proxy class with sync and Generates proxy class with sync and

async callsasync calls Supports “Step-Into” across web service Supports “Step-Into” across web service

callcall

Return Data from a Web Return Data from a Web ServiceServiceDemonstration #1Demonstration #1

AgendaAgenda Web Service InfrastructureWeb Service Infrastructure Web Services in Visual Studio .NETWeb Services in Visual Studio .NET Hardcore Web ServicesHardcore Web Services

Hard Core Web ServicesHard Core Web ServicesASP .NET IntrinsicsASP .NET Intrinsics

RequestRequest Server Variables (Host Address, Host Name)Server Variables (Host Address, Host Name) CookiesCookies Security (Client Certificate, Authentication, Encryption)Security (Client Certificate, Authentication, Encryption)

UserUser IdentityIdentity RoleRole

Session and ApplicationSession and Application StateState

ResponseResponse CookiesCookies

CacheCache

Hard Core Web ServicesHard Core Web ServicesSecuritySecurity Basic, Digest, Passport, Kerberos, and Basic, Digest, Passport, Kerberos, and

Windows authenticationWindows authentication ““Roll your own” authenticationRoll your own” authentication HTTPS / SSL encryptionHTTPS / SSL encryption Supports many business modelsSupports many business models

Secure ecommerce transactionsSecure ecommerce transactionsPay per usePay per useSubscriptionSubscription

Hard Core Web ServicesHard Core Web ServicesAsynchronous CallsAsynchronous Calls Synchronous Programming ModelSynchronous Programming Model

Foo(Param1, Param2) As StringFoo(Param1, Param2) As String

Asynchronous Programming ModelAsynchronous Programming ModelBeginFoo(Param1, Param2, Callback)BeginFoo(Param1, Param2, Callback)Callback(AsyncResult)Callback(AsyncResult)EndFoo(AsyncResult) As StringEndFoo(AsyncResult) As String

Hard Core Web ServicesHard Core Web ServicesSOAP Headers - ServerSOAP Headers - Server Make a Class That Inherits SoapHeaderMake a Class That Inherits SoapHeader Add Custom PropertiesAdd Custom Properties Associate This With Your Web ServiceAssociate This With Your Web Service

Public Class MyHeader : Inherits SoapHeaderPublic Class MyHeader : Inherits SoapHeader

Public Username As StringPublic Username As String

Public Password As StringPublic Password As String

End ClassEnd Class

Hard Core Web ServicesHard Core Web ServicesSOAP Headers - ClientSOAP Headers - Client Create Instance of the Header ClassCreate Instance of the Header Class Populate With ValuesPopulate With Values Attach To Web Service ObjectAttach To Web Service Object Call MethodCall Method

WebServ ws = new WebServ();WebServ ws = new WebServ();

MyHeader a = new MyHeader();MyHeader a = new MyHeader();

a.Username = "admin";a.Username = "admin";

a.Password = "password";a.Password = "password";

ws.MyHeader = a;ws.MyHeader = a;

ws.DoSomething();ws.DoSomething();

Hard Core Web ServicesHard Core Web ServicesSoapExtensionSoapExtension Used for More Advanced FunctionalityUsed for More Advanced Functionality Intercept Calls to a Web ServiceIntercept Calls to a Web Service Pre and Post ProcessingPre and Post Processing

Hardcore Web ServicesHardcore Web ServicesDemonstration #2Demonstration #2

Session SummarySession Summary

Web Services Are The Building Blocks Web Services Are The Building Blocks For The Next Generation Of The InternetFor The Next Generation Of The Internet

Gives Client Access to any kind of DataGives Client Access to any kind of Data Make Business-to-Business EasyMake Business-to-Business Easy Visual Studio .NET Provides Great ToolsVisual Studio .NET Provides Great Tools

For More Information…For More Information… MSDN Web site at MSDN Web site at

msdn.microsoft.commsdn.microsoft.com

MicrosoftMicrosoft®® Official Curricula (MOC) Official Curricula (MOC) MOC 2063MOC 2063

Building ASP .NET ApplicationsBuilding ASP .NET Applications

MOC 2145MOC 2145 Programming the Microsoft .NET Framework Programming the Microsoft .NET Framework

with Visual Basicwith Visual Basic®® .NET .NET

MOC 2349MOC 2349 Programming the Microsoft .NET Framework Programming the Microsoft .NET Framework

with C#with C#

MSDNMSDNEssential Resources for DevelopersEssential Resources for Developers

Training & Training & EventsEvents

MSDN Training, Tech-Ed, PDC, MSDN Training, Tech-Ed, PDC, Developer Days, MSDN/Onsite EventsDeveloper Days, MSDN/Onsite Events

Subscription Subscription ServicesServices

OnlineOnlineInformationInformation

MembershipMembershipProgramsPrograms

Print Print PublicationsPublications

Library, Professional, UniversalLibrary, Professional, UniversalDelivered via CD-ROM, DVD, WebDelivered via CD-ROM, DVD, Web

MSDN Online, MSDN FlashMSDN Online, MSDN Flash

MSDN User GroupsMSDN User Groups

MSDN MagazineMSDN MagazineMSDN NewsMSDN News

Questions And AnswersQuestions And Answers