nikola dudar program manager microsoft corporation session code: dtl 311
TRANSCRIPT
Web Services In Native CodeNikola DudarProgram ManagerMicrosoft CorporationSession Code: DTL 311
Session outline
Story of native code and web servicesIntroduction to Windows Web Services APIDemonstration of WWSAPIQ&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 supportedATL SOAP does not work for most scenarios
Taking dependency on .Net Framework is not acceptable in many casesNative + managed code mixed solutions demonstrate poor performance
Windows Web Services APIIntroduction
Connecting native code and web servicesWin32 APINo dependency on .Net Framework
Interoperability with WS-* SOAP stacksWindows Communication Foundation (WCF)ASP .Net XML Web Services (ASMX)Non-Microsoft stacks
System Component of Windows 7Available for Windows XP/Vista/2003/2008
Web service and client in native codeNikola DudarProgram ManagerMicrosoft Corporation
demo
Server
Native Code Client to WCF Service
Managed code client using WCF
WCF Service
Sort DLL
Native code client using WWSAPI
Server
Native Code Service Using WWS API
Managed code client using WCF
Native Code Service
Sort DLL
Native code client using WWSAPI
Demo Summary
Using WWS API, you can buildInteroperable web services Clients to web services
Fully native code solutionNo dependency on .Net Framework
Expose native code as WWSAPI web service2x-4x improvement in service throughput
Windows Web Services API Layers
Your Application Code
Network I/O
Service Model
Channel Layer
XML Layer
Erro
rs
Hea
p
Asyn
c C
onte
xt
Service ModelWeb services as function calls
Automatically manages communicationService Proxy on clientService Host on service
Message exchanges as function callsClient calls generated functionServer implements callback
Driven from ContractWsUtil.exe generates C code from WSDL/XSD
Channel LayerFull control over communication
Message Data sent or receivedConsists of body and headers
ChannelAbstraction for message exchangeUnified API for all transports
HTTP, TCP, UDPProperties to tweak different settings
Security DescriptionSecuring message exchange on the channel
Transport securityHTTP: SSLTCP: Windows SSPI
Message plus Transport security (Mixed Mode)Username/Password, Kerberos APREQ, XML Token, Secure Conversation TokenBasic support for SAML and federation
No support for Full message security mode
XML LayerFull access to content of messages
Unified API for all encodings Text, Binary, MTOM
SOAP subset of XML 1.0 (No DTD)XmlBuffer
In-memory store for XML dataXmlReader and XmlWriter
Forward only accessIntegrated canonicalization (C14n)
SerializationMapping C data types to/from XML types
Simply C and Win32 types mapped to simple XSD typesComplex XSD types mapped to C structuresWsUtil.exe generate C types from XSD
struct PurchaseOrder{ int id;};
<PurchaseOrder> <id>123</id></PurchaseOrder>
Drilling down into how to use WWSAPINikola DudarProgram ManagerMicrosoft Corporation
demo
Demo Summary
Remember ABCA: Opening Service Proxy or Service HostB: Creating Service Proxy or Service HostC: wsutil.exe generates C code from WSDL/XSD
HeapRemoves need for parameters "Alloc/Free"
ErrorDetailed information about runtime errors
Supported ConfigurationsTransports
HTTP, TCP, UDPXML Encodings
Text, Binary, and MTOMEnvelope
SOAP 1.1 and 1.2Addressing
WS-Addressing 0.9 and 1.0Metadata
WSDL 1.1, XML Schema 1.0WS-MetadataExchange 1.1WS-Transfer March 2006
Security
WS-Security 1.0 and 1.1 (partial)WS-Trust February 2005 and 1.3 (partial)WS-SecureConversation 1.1 and 1.3 (partial)
PolicyWS-Policy from March 2006 and v.1.2WS-Policy Attachment from March 2006 and 1.2WS-SecurityPolicy 1.1
WWSAPI Performance
TCP/Binary HTTP/UTF80
500000
1000000
1500000
2000000
2500000
3000000
3500000
4000000
4500000
5000000
Client side Working Set in Steady StatePurchaseOrder Scenario
WWSAPIWCF
Kilo
byte
s
WWSAPI Performance
TCP/Binary HTTP/UTF80
2000
4000
6000
8000
10000
12000
14000
16000
Server Side ThroughputPurchaseOrder Scenario
WWSAPIWCF
Ope
ratio
ns p
er s
econ
d
Summary
WWSAPI connects native code and web services Available on Windows 7, XP, Vista, Server 2003 and 2008 WWSAPI does not replace WCFUse WWSAPI to build native code clients
Reduces working set of your client applicationsUse WWSAPI to host native code on service
Improve throughput of your service
Questions and Answers
MSDNhttp://msdn.microsoft.com/network/
Blogshttp://blogs.msdn.com/nikoladhttp://blogs.msdn.com/haoxu
Reports of issues and suggestionshttps://connect.microsoft.com/wndp/
www.microsoft.com/teched
Sessions On-Demand & Community
http://microsoft.com/technet
Resources for IT Professionals
http://microsoft.com/msdn
Resources for Developers
www.microsoft.com/learningMicrosoft Certification and Training Resources
www.microsoft.com/learning
Microsoft Certification & Training Resources
Resources
Related Content
Windows 7 SessionsWCL202 - Developing for Windows 7 WCL305 - Focus on Fundamentals in Windows Applications (Graphics, Power, Services, Profiling) WCL311 - Optimizing Your Application for the Windows 7 User Experience WCL312 - Windows Application Readiness for Developers
Sessions for C++ developersDTL403 - Microsoft Visual C++ Library, Language, and IDE: Now and NextDTL310 - Parallel Computing with Native C++ in Microsoft Visual Studio 2010
Complete an evaluation on CommNet and enter to win!
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.