250 likes | 334 Vues
Dive into the realm of XML web services for mobile devices and ASP.NET. Explore basics to advanced concepts, SOAP communication, and future technologies. Learn about incorporating XML with real-world services, code demos, and best practices for a seamless user experience.
E N D
Incorporating XML with Mobile Devices and ASP.NET casey chesnut brains-N-brawn.com 4/4/2005 Student Ambassadors
Sample Code • http://www.brains-N-brawn.com/artifacts/saXmlCfAsp.zip
Outline • Basics • Real World Web Services • Advanced • Future
XML Web Services • ASP.NET • NOT Remoting • ASMX Web Services • NOT Web Forms
Core Standards • XML - document model • XSD - data types and structure • SOAP - communication • WSDL - description • UDDI – discovery • …
ASP.NET Web Service • Demo • Code • Autogenerated test page • Autogenerated WSDL
Mobile Devices • .NET Framework • Notebooks • Tablet PCs • .NET Compact Framework (CF) • Pocket PC • Pocket PC Phone Edition • Smartphones • .NET Embedded • SPOT Watches
Compact Framework Client • Demo
Gotchas • Check for connectivity • http://localhost URLs will not work • Use Machine Name or IP Address instead • Install Loopback Adapter • When developing without internet connection
User Experience • Cache data • Display the hourglass • Use asynchronous calls
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>
Serialization Attributes • Used to shape object serialization • [XmlRoot()] • [XmlElement()] • [XmlAttribute()] • [XmlText()]
Soap Headers • Work with SoapHeaders as objects • http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebservicesprotocolssoapheaderclasstopic.asp
Soap Extensions • Work with the request / response Xml
Real World Web Services • Google API • MapPoint Web Service • TerraServer • Microsoft.com • Amazon • eBay / PayPal • FedEx
MapPoint • Demo
Advanced Web Services • WSE • WS-* • Hosting Web Services
WSE • Web Service Enhancements • WS-Addressing • WS-Security • WS-SecureConversation • WS-Attachments • WSE for CF • http://www.OpenNETCF.org • http://www.brains-N-brawn.com/cfWSE2/
WSE for CF • Sample WS-Security requests
Hosting Web Services • Monash University Mobile Web Server • http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/netcfma.asp
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 • …
Future • Compact Framework v2 • Visual Studio 2005 • Indigo • ASMX Replacement • Devices Profile • WS-Discovery • UPnP 2.0 devices
Questions • casey@brains-N-brawn.com