Web Services In Native Code Nikola Dudar Program
Web Services In Native Code Nikola Dudar Program Manager Microsoft Corporation Session Code: DTL 311
Session outline Story of native code and web services Introduction to Windows Web Services API Demonstration of WWSAPI Q&A
Story of Native Code and Web Services No simple way for native code connect to WCF and ASP. Net XML web services SOAP Toolkit is not supported ATL SOAP does not work for most scenarios Taking dependency on. Net Framework is not acceptable in many cases Native + managed code mixed solutions demonstrate poor performance
Windows Web Services API Introduction Connecting native code and web services Win 32 API No dependency on. Net Framework Interoperability with WS-* SOAP stacks Windows Communication Foundation (WCF) ASP. Net XML Web Services (ASMX) Non-Microsoft stacks System Component of Windows 7 Available for Windows XP/Vista/2003/2008
demo Web service and client in native code Nikola Dudar Program Manager Microsoft Corporation
Native Code Client to WCF Service Managed code client using WCF Server WCF Service Native code client using WWSAPI Sort DLL
Native Code Service Using WWS API Managed code client using WCF Server Native Code Service Native code client using WWSAPI Sort DLL
Demo Summary Using WWS API, you can build Interoperable web services Clients to web services Fully native code solution No dependency on. Net Framework Expose native code as WWSAPI web service 2 x-4 x improvement in service throughput
Windows Web Services API Layers Async Context Heap Errors Your Application Code Service Model Channel Layer XML Layer Network I/O
Service Model Web services as function calls Automatically manages communication Service Proxy on client Service Host on service Message exchanges as function calls Client calls generated function Server implements callback Driven from Contract Ws. Util. exe generates C code from WSDL/XSD
Channel Layer Full control over communication Message Data sent or received Consists of body and headers Channel Abstraction for message exchange Unified API for all transports HTTP, TCP, UDP Properties to tweak different settings
Security Description Securing message exchange on the channel Transport security HTTP: SSL TCP: Windows SSPI Message plus Transport security (Mixed Mode) Username/Password, Kerberos APREQ, XML Token, Secure Conversation Token Basic support for SAML and federation No support for Full message security mode
XML Layer Full access to content of messages Unified API for all encodings Text, Binary, MTOM SOAP subset of XML 1. 0 (No DTD) Xml. Buffer In-memory store for XML data Xml. Reader and Xml. Writer Forward only access Integrated canonicalization (C 14 n)
Serialization Mapping C data types to/from XML types Simply C and Win 32 types mapped to simple XSD types Complex XSD types mapped to C structures Ws. Util. exe generate C types from XSD struct Purchase. Order { int id; }; <Purchase. Order> <id>123</id> </Purchase. Order>
demo Drilling down into how to use WWSAPI Nikola Dudar Program Manager Microsoft Corporation
Demo Summary Remember ABC A: Opening Service Proxy or Service Host B: Creating Service Proxy or Service Host C: wsutil. exe generates C code from WSDL/XSD Heap Removes need for parameters "Alloc/Free" Error Detailed information about runtime errors
Supported Configurations Transports HTTP, TCP, UDP XML Encodings Text, Binary, and MTOM Envelope SOAP 1. 1 and 1. 2 Addressing WS-Addressing 0. 9 and 1. 0 Metadata WSDL 1. 1, XML Schema 1. 0 WS-Metadata. Exchange 1. 1 WS-Transfer March 2006 Security WS-Security 1. 0 and 1. 1 (partial) WS-Trust February 2005 and 1. 3 (partial) WS-Secure. Conversation 1. 1 and 1. 3 (partial) Policy WS-Policy from March 2006 and v. 1. 2 WS-Policy Attachment from March 2006 and 1. 2 WS-Security. Policy 1. 1
WWSAPI Performance 5000000 4500000 Client side Working Set in Steady State Purchase. Order Scenario 4000000 3500000 WWSAPI 3000000 WCF Kilobytes 2500000 2000000 1500000 1000000 500000 0 TCP/Binary HTTP/UTF 8
WWSAPI Performance Server Side Throughput Purchase. Order Scenario 16000 14000 12000 WWSAPI 10000 Operations per second WCF 8000 6000 4000 2000 0 TCP/Binary HTTP/UTF 8
Summary WWSAPI connects native code and web services Available on Windows 7, XP, Vista, Server 2003 and 2008 WWSAPI does not replace WCF Use WWSAPI to build native code clients Reduces working set of your client applications Use WWSAPI to host native code on service Improve throughput of your service
Questions and Answers MSDN http: //msdn. microsoft. com/network/ Blogs http: //blogs. msdn. com/nikolad http: //blogs. msdn. com/haoxu Reports of issues and suggestions https: //connect. microsoft. com/wndp/ Email nikola. dudar@microsoft. com
Resources www. microsoft. com/teched www. microsoft. com/learning Sessions On-Demand & Community Microsoft Certification & Training Resources http: //microsoft. com/technet http: //microsoft. com/msdn Resources for IT Professionals Resources for Developers www. microsoft. com/learning Microsoft Certification and Training Resources
Related Content Windows 7 Sessions WCL 202 - Developing for Windows 7 WCL 305 - Focus on Fundamentals in Windows Applications (Graphics, Power, Services, Profiling) WCL 311 - Optimizing Your Application for the Windows 7 User Experience WCL 312 - Windows Application Readiness for Developers Sessions for C++ developers DTL 403 - Microsoft Visual C++ Library, Language, and IDE: Now and Next DTL 310 - Parallel Computing with Native C++ in Microsoft Visual Studio 2010
Complete an evaluation on Comm. Net and enter to win!
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U. S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
- Slides: 26