140 likes | 240 Views
Presentation 11: SOAP on small devices. Outline. Which small devices? What are the limitations and what kind of support do they offer for SOAP SDK’s available. Which small devices?. Embedded computers Windows CE Java KVM’s Others PDA’s Pocket PC’s Windows CE, eC++, eVB
E N D
Outline • Which small devices? • What are the limitations and what kind of support do they offer for SOAP • SDK’s available
Which small devices? • Embedded computers • Windows CE • Java KVM’s • Others • PDA’s • Pocket PC’s • Windows CE, eC++, eVB • .NET Compact Framework & Pocket PC API • Palm • Running J2ME/J2SE or native Palm (C++) • Mobile phones • J2ME CLDC MIDP • Native (Symbian C++, Personal Java) • Smartphone API & .NET CF (Orange SPV, Motorola)
Problems with small computers • Limited memory and processing power • Limited storage facilities (no hard drive) • Limited bandwidth (for mobile phones using GSM/GPRS) • UMTS is in place however (30-50% coverage) and soon to have a break-through (and Edge, and distributed WLAN) • Edge will soon enter as well for GSM networks • Not possible with full .NET Framework or J2SE JDK, big XML parser API’s – big footprints • SOAP and XML is bandwidth + processor demanding! • CONCLUSION: • SOAP CLIENT ONLY – NOT SERVER • Lightweight parser capabilities – not all features
Pocket PC (Windows CE) • Pocket PC and Windows CE based operating systems does not have built in SOAP facilities • But it is possible with eMbedded Visual Tools 3.0 • http://www.microsoft.com/downloads/details.aspx?FamilyID=f663bf48-31ee-4cbe-aac5-0affd5fb27dd&DisplayLang=en • Using Microsofts SOAP implementation for Windows CE • http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppc2k2/html/ppc_reservices.asp • Or using Simon Fells PocketSOAP COM component – which even Microsoft has welcomed • http://www.pocketsoap.com/pocketsoap/ • .NET Compact Framework • SOAP is integrated in the .NET framework. No need to use eMbedded Visual Tools 3.0 • But ONLY managed code works
SmartPhone API • As with the Windows CE – using Embedded Visual Studio 3.0 it is possible to consume Web services for the Smartphone platform (SmartPhone IS Windows CE) • http://msdn.microsoft.com/webservices/building/othertools/default.aspx?pull=/library/en-us/dnsmtphn/html/sphonweb.asp • All links are available at the course website • BUT THIS IS NOT AN EASY TASK • The .NET CF framework also works for this device
Pocket TV Viewer - .NET CF Example: this is an example app of AXIS server + .NET CF interop
Pocket PC Project Step 1 – New Project: Choose “Smart Device Application”. Wizard and choose Pocket PC
Client code implementation Step 2 - Add Web Reference: as with “regular” Windows application development Step 4 – run emulator Step 3 – build a GUI: add a button and a text box and code
J2ME • 2006: Apx. 70% of all new mobile phones support the Java 2 Mobile Edition SDK (Gartner Group) – today over 50% • No build-in support for SOAP (yet) • Does not run the JVM – but KVM (Kilo Virtual Machine) • Therefore you cannot use AXIS and others • At least two open source projects, one of them kSOAP, building on the Enhydra kXML is designed for Mobile Phones and PDA’s (like the Palm) • http://kxml.enhydra.org/ • kSOAP: http://ksoap.org (footprint: 42K) • WingFoot: http://www.wingfoot.com/ (footprint: 35K)
Developing for J2ME • Take a look at http://www.javasoft.com/J2ME • CLCD, MIDP • This example uses kSOAP, but Wingfoot is an alternative • May want to download JBuilder Enterprise Edition Trial Version from http://www.borland.com • Also download MobileSet • Important with Enterprise Edition because of JAD file • Nice when deploying onto a phone • (don’t know in newer versions) • Comes complete with J2ME JDK, Screen designer, Emulator, as well as JAD deployment utillity
JBuilder & MobileSet with kSOAP JBuilder not needed of course: only need J2ME Mobile Toolkit from SUN
SOAP elements of code SOAP elements: We will be looking at the SOAP elements only (commandAction is the event handler function of the application) ServiceNamespace initialiazed earlier: http://localhost:8080/axis/HelloWorld.jws Add the parameter “name” Make the call – and typecast to string Display handling