Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on...
-
Upload
edward-griffith -
Category
Documents
-
view
217 -
download
0
Transcript of Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on...
Rob HwacinskiProgram ManagerWindows Embedded CEMicrosoft Corporation
ECE205Web Services on Devices in Windows® Embedded CE 6.0
Web Services on Devices
What is it?How does it all work?
Demo and walkthrough example
Summary of benefitsGetting started with WSDAPITransforming Home Automation
What Are Web Services?
A standard means of interoperating between different software applications and components that run on a variety of platforms.
Definitions
WEB SERVICES
WS*
WS*
WS*
WS*
WS*
WS*
WS*WS*
WS*
WS*
WS*
WS*
WS*
WS* WS*
WS*
WS*
WS*
WS*
WS*
WS*
WS*WS*
What Is the Device Profile?
Devices Profile for Web Services (DPWS) defines the subset of the WS-* specifications required to implement support on
resource constrained devices.
Definitions
WEB SERVICES
WS*
WS*
WS*
WS*
WS*
WS*
WS*
WS*
WS*
WS*
WS*
WS* WS*
WS*
WS*
WS*
WS*
Device Profile
WS*WS*
WS*
WS*
WS*
What Is the Device Profile?
Built on standards and WS specifications
Definitions
WEB SERVICES
WS*
WS*
WS*
WS*
WS*
WS*
WS*
WS*
WS*
WS*
WS*
WS* WS*
WS*
WS*
WS*
WS*
Supported Specifications
Device Profile
WS*WS*
WS*
WS*
WS*WS-Policy AttachmentWS-MetadataExchangeWS-TransferMTOMMIMESOAP over UDPXML Schema Part 1 & Part 2WSDL Binding for SOAP 1.2
HTTP/1.1WSDL 1.1SOAP 1.2WS-DiscoveryWS-AddressingWS-EventingWS-Policy*WS-Security
What Is Web Services on Devices?
Web services
Device Profile
Web Services on Devices
Industry Standards
Microsoft Implementation
Device Profile
WS*
WS*
WS*
WS*
WS*
Definition
Microsoft implementation to enable small, resource constrained devices to interop with Web Services
Windows
Windows Embedded CE
Web Services on Devices
Web Services on Devices can be used toextend/expose device functionality across
networks
Web Services on Devices is designed for: Extensibility
Ease of implementation
Standard protocol
“Global” interaction
Scalability: lower impact on the network
Allowing complex data types to be used directly and easily
Supporting in-band bulk data transfers with MTOM/XOP
Benefits in Windows
Web Services on Devices
Discovery WS-DiscoveryAd hoc discovery and bootstrapping using UDP
• Multicast announcements• Multicast query requests (probe/resolve)• Unicast responses
Web Services on Devices
Discovery WS-DiscoveryAd hoc discovery and bootstrapping using UDP
Description Web Services Description Language (WSDL)Interface definition; XML format for interface methods• WSDL is in XML format• Service Contract between the Control Point and the Device Host• Describes services the device supports and how it can behave
<definitions name="BumperBubbles" ...> <types> <xs:schema ...> <xs:complexType name="BubbleIdType"> <xs:sequence> <xs:element name="BubbleId” type="xs:string"/> </xs:sequence> </xs:complexType>
... </xs:schema> </types> <message name="RegisterBubbleClientInput"> <part name="BubbleId" type="tns:BubbleIdType"/> </message>
... <portType name="BumperBubblesPortType"> <operation name="RegisterBubbleClient"> <input message="tns:RegisterBubbleClientInput"/> <output message="tns:RegisterBubbleClientOutput"/>
</operation>...
</portType></definitions>
DescriptionWSDL Example: Control Point
Web Services on DevicesDiscovery WS-Discovery
Ad hoc discovery and bootstrapping using UDP
Eventing WS-EventingCreating and managing subscriptions for event notification
Description WS Description LanguageInterface definition; XML schema for each message
• Contract defined by WSDL and XML schema• Presents rich eventing model• Supports a Secure Channel
Web Services on DevicesDiscovery WS-Discovery
Ad hoc discovery and bootstrapping using UDP
Eventing WS-EventingCreating and managing subscriptions for event notification
Description WS Description LanguageInterface definition; XML schema for each message
Messaging SOAPOne or two way SOAP messages; bulk data in attachments
• Control and Event messages• Utilizes Message Transmission Optimization Mechanism (MTOM) for attachments• One SOAP envelope with many parts
Web Services on DevicesDiscovery WS-Discovery
Ad hoc discovery and bootstrapping using UDP
Security Secure Channel Security transport for service and client using TLS/SSL
Eventing WS-EventingCreating and managing subscriptions for event notification
Description WS Description LanguageInterface definition; XML schema for each message
Messaging SOAPOne or two way SOAP messages; bulk data in attachments
• Native support for TLS/SSL• Trust established between control point and host via certificates• Unsigned/Unencrypted Messages flow through the protected channel
WSD CodeGen Tool
Demo
Web Services on DevicesCode generation process
Run Code Generation toolTakes in WSDL and XML schema
Generate IDL and proxy/stub codeCompile with app codeProduce executable
WSDL
Code generation
IDL
.cpp
Compileand link
Building WSDAPI Applications
1. Create device WSDL
2. Transform WSDL into a code generation script (WSDCodeGen)
3. Metadata is customized in the code generation script
4. Transform code generation script into sourceServiceName.idl
ServiceNameProxy.h/cpp
ServiceNameTypes.h/cpp
ServiceNameStub.cpp
5. Implement control functions exposed by Device Host
6. Implement event functions exposed by Client Proxy
Overview Steps
How It All Works Client
Ser
vice
DeviceProbe
Resolve
MetadataExchange
MetadataExchange
Resolve: Got an Endpoint?
ProbeMatch: Hey, I’m a projector!
Hello!
ResolveMatch:Sure do!
Hello!
Hello!
Bye!Hello!
Probe: Projector
Device Metadata-Dialect: http://schemas.xmlsoap.org/ws/2006/02/devprof/ThisDevice Device Metadata
-FriendlyName [-----]: WSDAPI Basic Interop Server-FirmwareVersion: alpha-SerialNumber: 1-Any: (absent)
End Device Metadata-Dialect: http://schemas.xmlsoap.org/ws/2006/02/devprof/ThisModel Model Metadata
-Manufacturer [-----]: Microsoft-ManufacturerURL: http://www.microsoft.com/ -ModelName [-----]: WSDAPI Interop device-ModelNumber: 0.1-ModelUrl: http://www.microsoft.com/ -PresentationUrl: http://www.microsoft.com/ -Any: (absent)
End Model Metadata
Device Metadata continued…-Dialect: http://schemas.xmlsoap.org/ws/2006/02/devprof/Relationship Relationship Metadata
-Type: http://schemas.xmlsoap.org/ws/2006/02/devprof/host -Host: -Address: uri:cece -ServiceId: http://testdevice.interop/SimpleDevice -Type: http://schemas.example.org/SimpleService:SimpleDeviceType -Any: (absent)-Hosted[0]: -Address: http://157.56.96.227:5357/cece -Address: http://[3ffe:8311:ffff:f750:208:54ff:fedd:5b99]:5357/cece -Address: http://[2001:4898:75:2:208:54ff:fedd:5b99]:5357/cece -ServiceId: http://testdevice.interop/SimpleService1 -Type: http://schemas.example.org/SimpleService:SimpleService -Any: (absent)-Hosted[1]: -Address: http://157.56.96.227:5357/cece -Address: http://[3ffe:8311:ffff:f750:208:54ff:fedd:5b99]:5357/cece -Address: http://[2001:4898:75:2:208:54ff:fedd:5b99]:5357/cece -ServiceId: http://testdevice.interop/AttachmentService1 -Type: http://schemas.example.org/AttachmentService:AttachmentService -Any: (absent)
End Relationship Metadata
Support in Windows Embedded CE
Same low-level API set as Windows Vista
Unmanaged code
‘C++’ Interfaces
Discovery/Publication
Client/Hosting
Implements DPWS compliant SOAP stack
Implements discovery networking stack
WSDAPI devices and clients run standalone in their own process spaces
Web Services on Devices API (WSDAPI)
Support in Microsoft EcosystemEnd-to-end support for Web Services on
Devices
Windows Vista
WindowsEmbedded CE
Windows Media Center
Windows Server
Windows .NET Micro Framework
PC space Embedded space
Recap
Web Services can extend the capabilities of your devices!
Web Services are easy to implement in Windows Embedded CE!
Windows Embedded CE and Windows Vista have the same code base!
Getting Started with WSDAPI
1. Attend the WSD lab tomorrow (Wed @ 10-11:15am)Utilizing Web Services on Devices on Windows Embedded CE
6.0
Session ILL-320 led by Alexander Bussmann
2. Download the WSD Development Kit in the Windows LHS Beta 3 SDK
3. Start developing in Windows Vista environment
4. Implement on Windows Embedded CE device using the same WSDAPI code
Next steps
ResourcesWindows Web Services
http://msdn.microsoft.com/webservices/default.aspx Specs: http://msdn.microsoft.com/webservices/understanding/specs/ Workshops: http://msdn.microsoft.com/webservices/community/workshops/ Whitepapers: http://msdn.microsoft.com/webservices/ Basics: http://msdn2.microsoft.com/en-us/webservices/aa740691.aspx
Devices Profile for Web Services (February 2006)http://schemas.xmlsoap.org/ws/2006/02/devprof/
Web Services on Deviceshttp://msdn2.microsoft.com/en-us/library/aa826001.aspx
WSD Developer Storyhttp://msdn.microsoft.com/library/en-us/dnlong/html/WebSerDev.asp
Windows Rally Technologies
http://www.microsoft.com/Rally/
Michael MaluegLead Program ManagerWindows Embedded CEMicrosoft Corporation
WSD in Home Control and Energy Monitoring
Transforming Home Automation
Why is Web Services on Devices important?
Aggregate
Protocols
Systems
Information
Devices
Transforming Home AutomationAggregate Protocols
Web Services on Devices
Transforming Home AutomationAggregate Systems
Transforming Home AutomationAggregate Information
Peak Energy
Cost
Temperature
Settings
Energy Consumption
Security
Transforming Home AutomationAggregate Devices
Transforming Home AutomationAggregate Devices
Go on Vacation
Garage Door OpensWatch Movie
Close to Home
How much power have I used so far this
month?
Driving Factors Entertainment
Energy Monitoring
Smart Meters report usage daily
Reduces peak capacity
Enel installed 27m smart meters since
‘01
ItalyPG&E deploying millions SD&E deploying in ‘08
USAFranceEDF targeting 8 of
60m homes starting in ‘08
Summary
Build connected control points
Aggregate using Web Services on Devices
Entertainment / Energy monitoring speeding adoption
Present useful information to consumers
While You're Here
Fill out your session evaluationEnter to win a Windows Mobile® phone or Zune™
The Battle BeginsStay tuned for the Sumo Robotics competition
at the Tao attendee party
Meet the geeksThe Expert Cabana is packed with MEDC speakers and MVPs
© 2007 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.