fb5be6f96482dbfba84d4d25a5383b79.ppt
- Количество слайдов: 28
Best Practices for Building Web Services with Visual Studio®. NET Sanguan Thammarojsakul Microsoft MVP -. NET Department of Computer Science, Faculty of Science and Technology Assumption University of Thailand
What we will cover u u ASP. NET Web Services ACT SOAP Security Global XML Web Services Architecture (GXA) Ø scalability, interoperability, reliability, and security
Session Prerequisites u u u Familiarity with. NET Programming Know Visual Basic®. NET Familiar with ASP. NET Level 300
Agenda u u Architecture of Web Services Testing Web Services Securing SOAP Web Services in the Enterprise
Architecture of Web Services Open Middle Tier Implementation u What is a Web Service? Ø Ø Ø u A website without the user interface A method for defining interfaces above the transport protocol XML Interoperability Web Services support 4 protocols Ø Ø Http Get - Interoperable Http Post - Interoperable Http SOAP - Interoperable Import as a DLL for an object interface -. NET
Architecture of Web Services Implementing XML Services u <Web. Service(Namespace : = "http: //msdn. microsoft. com/Dev. T 1 -46")> Ø u Inherits System. Web. Services. Web. Service Ø u Declares the interface, indicates that the class defined is a web service Parent class for all web services in. NET <Web. Method()> Ø Ø Each method which is exposed as part of the service. Return values can be supported in any request format but Output parameters are only supporte in SOAP
Architecture of Web Services Service Discovery u UDDI: Universal Description, Discovery and Integration Ø Ø Design time specification for the discovery of services and communication of their interface Does not define the service implementation and protocol details. Complemented by WSDL Managed by an industry-wide consortium; for details visit http: //uddi. org
Agenda u u Architecture of Web Services Testing Web Services Securing SOAP Web Services in the Enterprise
Testing Web Services Default ASMX Pages u u Visual Studio creates a default test frame for each web service Accessible from the <service>. asmx page The automated page only supports and test the http Get protocol Can act as the starting point for both functional and performance testing
Testing Web Services Performance Testing u Application Center Test Ø Ø Allows for the automated execution of web based resources using VB Scripts Two versions Ø Ø u Produces XML based results Ø u Full version in Application Center Server Developer Version in Visual Studio. NET Enterprise Architect edition Supports Side by Side Comparison Integrated with Performance Counters for collection of Transaction Cost Analysis data
Testing Web Services Transaction Cost Analysis Equation Cycles = N * S * avg (Pt) / avg(Rps) Where: u N = Number of Processors u S = Speed of Processors u Pt = System: % Total Processor Time u Rps = ACT ASP Requests per second u Cycles = Average CPU cycles
Demonstration 1 Transaction Calculator Service Run the T_Calc Service Create a Simple ACT Test Run a Custom ACT Test
Agenda u u Architecture of Web Services Testing Web Services Securing SOAP Web Services in the Enterprise
Securing SOAP Authentication & SSL u Authentication is supported Ø Ø Ø u u Authentication does not protect data To protect data can use SSL Ø Ø u Selected from Internet Services Manager NTLM and Basic authentication are available Use: New Network. Credential() From Browser preface call with https: // From Code modify <service>. url property to include https: // Https is transport specific
Securing SOAP Encoding & Encryption u UTF-8 Encoding Ø Ø u Can be used for the contents of a SOAP Message Allows for the inclusion of binary data Encryption Ø Ø Ø . NET supports several forms of encryption Can be used to protect data without relying on transport protocol Requires key synchronization
Demonstration 2 Authentication/Security Create a service requiring Authentication Create a Windows Form Client Call a Service that Encodes response Data
Agenda u u Architecture of Web Services Testing Web Services Securing SOAP Web Services in the Enterprise
Web Services in the Enterprise Messaging Infrastructure u u u Global XML Services Architecture (GXA) GXA has four key specifications to date WS-Security Ø u Credential exchange, message integrity, and message confidentiality WS-License Ø Encoding for common license formats
Web Services in the Enterprise Messaging Infrastructure u WS-Referral Ø u WS-Routing Ø u u Partition URL namespaces between nodes Route messages across intermediate SOAP nodes GXA is still under development as an industry wide standard. Other specifications may be added as the standard develops.
Web Services in the Enterprise SOAP Extensions u u SOAP Extensions Added to the SOAP envelope Provide a generic means of implementing additional capabilities. . NET Soap. Extension Ø u System. Web. Services. Protocols. Soap. Extension Will be the core of implementing GXA
Session Summary u u Use Web Services as Middleware Use ACT for lifecycle testing support Use. NET’s built in mechanisms for securing web services SOAP Extensions
For More Information… u MSDN Web site at Ø u Web. Services Specifications Ø u http: //msdn. microsoft. com/library/default. asp? url= /library/en-us/dnsrvspec/html/wsspecsover. asp Reliable XML Web Services Ø u http: //msdn. microsoft. com/webservices http: //msdn. microsoft. com/library/default. asp? url= /library/en-us/dnexxml/html/xml 11192001. asp Using SOAP Extensions for Encryption Ø http: //msdn. microsoft. com/library/default. asp? url= /library/en-us/dnaspnet/html/asp 09272001. asp
For More Information… u Transaction Cost Analysis Ø u Global XML Web Services Architecture Ø u http: //www. microsoft. com/applicationcente r/techinfo/planning/2000/wp_tca. asp http: //www. gotdotnet. com/team/XMLwebse rvices/gxa_overview. aspx Got. Dot. Net. com
MS Press Essential Resources for Developers To find the latest developer related titles visit www. microsoft. com/mspress
Training Resources for Developers u Developing XML Web Services Using Visual C# Ø u Building ASP. NET Applications Ø u Course #2524 Course #2063 Programming with Microsoft® Visual Basic. NET Ø Course #2373 To locate a training provider for this course, please access mcspreferral. microsoft. com/default. asp Microsoft Certified Technical Education Centers (CTECs) are Microsoft’s premier partners for training services
MSDN Essential Resources for Developers Subscription Services Library, OS, Professional, Enterprise, Universal Delivered via CD-ROM, DVD, Web Online Information MSDN Online, MSDN Flash Training & Events MSDN Training, Tech-Ed, PDC, Developer Days, MSDN/Onsite Events Print Publications MSDN Magazine MSDN News Membership Programs MSDN User Groups
MSDN Subscriptions THE way to get Visual Studio. NET MSDN Subscriptions MSDN Universal $2799 new $2299 renewal/upgrade Enterprise Developer • Enterprise lifecycle tools • Team development support • Core. NET Enterprise Servers MSDN Enterprise $2199 new $1599 renewal/upgrade Professional • Tools to build applications and XML Web services for Windows and the Web MSDN Professional $1199 new $899 renewal/upgrade NEW Enterprise Architect • Software and data modeling • Enterprise templates • Architectural guidance
Where Can I Get MSDN? u u u Visit MSDN Online at msdn. microsoft. com Register for the MSDN Flash Email Newsletter at msdn. microsoft. com/flash Become an MSDN CD Subscriber at msdn. microsoft. com/subscriptions MSDN online seminars msdn. mircosoft. com/training/seminars Attend More MSDN Events
fb5be6f96482dbfba84d4d25a5383b79.ppt