rob hwacinski program manager windows embedded ce microsoft corporation ece205 web services on...

36

Upload: edward-griffith

Post on 24-Dec-2015

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0
Page 2: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

Rob HwacinskiProgram ManagerWindows Embedded CEMicrosoft Corporation

ECE205Web Services on Devices in Windows® Embedded CE 6.0

Page 3: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web 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

Page 4: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

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*

Page 5: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

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*

Page 6: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

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

Page 7: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

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

Page 8: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

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

Page 9: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

Web Services on Devices

Discovery WS-DiscoveryAd hoc discovery and bootstrapping using UDP

• Multicast announcements• Multicast query requests (probe/resolve)• Unicast responses

Page 10: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

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

Page 11: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

<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

Page 12: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

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

Page 13: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

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

Page 14: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

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

Page 15: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

WSD CodeGen Tool

Demo

Page 16: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

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

Page 17: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

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

Page 18: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

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

Page 19: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

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

Page 20: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

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

Page 21: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

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)

Page 22: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

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

Page 23: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

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!

Page 24: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

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

Page 25: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

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/

Page 26: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

Michael MaluegLead Program ManagerWindows Embedded CEMicrosoft Corporation

WSD in Home Control and Energy Monitoring

Page 27: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

Transforming Home Automation

Why is Web Services on Devices important?

Aggregate

Protocols

Systems

Information

Devices

Page 28: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

Transforming Home AutomationAggregate Protocols

Web Services on Devices

Page 29: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

Transforming Home AutomationAggregate Systems

Page 30: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

Transforming Home AutomationAggregate Information

Peak Energy

Cost

Temperature

Settings

Energy Consumption

Security

Page 31: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

Transforming Home AutomationAggregate Devices

Page 32: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

Transforming Home AutomationAggregate Devices

Go on Vacation

Garage Door OpensWatch Movie

Close to Home

How much power have I used so far this

month?

Page 33: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

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

Page 34: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

Summary

Build connected control points

Aggregate using Web Services on Devices

Entertainment / Energy monitoring speeding adoption

Present useful information to consumers

Page 35: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

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

Page 36: Rob Hwacinski Program Manager Windows Embedded CE Microsoft Corporation ECE205 Web Services on Devices in Windows® Embedded CE 6.0

© 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.