1
Incorporating XML with Mobile Devices and ASP.NET
casey chesnutbrains-N-brawn.com4/4/2005
Student Ambassadors
2
Sample Code
http://www.brains-N-brawn.com/artifacts/saXmlCfAsp.zip
3
Outline
BasicsReal World Web ServicesAdvancedFuture
4
XML Web Services
ASP.NETNOT Remoting
ASMX Web ServicesNOT Web Forms
5
Core Standards
XML - document modelXSD - data types and structureSOAP - communicationWSDL - descriptionUDDI – discovery…
6
ASP.NET Web Service
DemoCodeAutogenerated test pageAutogenerated WSDL
7
Mobile Devices
.NET FrameworkNotebooksTablet PCs
.NET Compact Framework (CF)Pocket PCPocket PC Phone EditionSmartphones
.NET EmbeddedSPOT Watches
8
Compact Framework Client
Demo
9
Compact Framework Client
10
Gotchas
Check for connectivityhttp://localhost URLs will not work
Use Machine Name or IP Address insteadInstall Loopback Adapter
When developing without internet connection
11
User Experience
Cache dataDisplay the hourglassUse asynchronous calls
12
Soap Document
<soap:Envelope ...> <soap:Header> <SecurityToken>1234</SecurityToken> </soap:Header> <soap:Body> <StockQuoteRequest ...> <symbols> <Symbol>FABRIKAM</Symbol> <Symbol>CONTOSO</Symbol> </symbols> </StockQuoteRequest> </soap:Body></soap:Envelope>
13
Serialization Attributes
Used to shape object serialization[XmlRoot()][XmlElement()][XmlAttribute()][XmlText()]
14
Soap Headers
Work with SoapHeaders as objectshttp://msdn.microsoft.com/library/default.asp
?url=/library/en-us/cpref/html/frlrfsystemwebservicesprotocolssoapheaderclasstopic.asp
15
Soap Extensions
Work with the request / response Xml
16
Soap Extension
17
Real World Web Services
Google APIMapPoint Web ServiceTerraServerMicrosoft.comAmazoneBay / PayPalFedEx
18
MapPoint
Demo
19
Advanced Web Services
WSEWS-*Hosting Web Services
20
WSE
Web Service EnhancementsWS-AddressingWS-SecurityWS-SecureConversationWS-Attachments
WSE for CFhttp://www.OpenNETCF.orghttp://www.brains-N-brawn.com/cfWSE2/
21
WSE for CF
Sample WS-Security requests
22
Hosting Web Services
Monash University Mobile Web Serverhttp://msdn.microsoft.com/library/
default.asp?url=/library/en-us/dnnetcomp/html/netcfma.asp
23
WS-*
WS-ReliableMessaging http://www.brains-N-brawn.com/cfReliable/
WS-Eventing http://www.brains-N-brawn.com/cfEvent/
WS-AtomicTransaction, WS-Coordination, WS-BusinessActivity
WS-Federation, WS-Privacy, WS-Authorization
BPEL4WS …
24
Future
Compact Framework v2Visual Studio 2005
IndigoASMX Replacement
Devices ProfileWS-DiscoveryUPnP 2.0 devices