Presentation 11: SOAP on small devices. Ingeniørhøjskolen i Århus Slide 2 af 14 Outline Which...

14
Presentation 11: SOAP on small devices

Transcript of Presentation 11: SOAP on small devices. Ingeniørhøjskolen i Århus Slide 2 af 14 Outline Which...

Page 1: Presentation 11: SOAP on small devices. Ingeniørhøjskolen i Århus Slide 2 af 14 Outline Which small devices? What are the limitations and what kind of.

Presentation 11:

SOAP on small devices

Page 2: Presentation 11: SOAP on small devices. Ingeniørhøjskolen i Århus Slide 2 af 14 Outline Which small devices? What are the limitations and what kind of.

Ingeniørhøjskolen i ÅrhusSlide 2 af 14

Outline

• Which small devices?• What are the limitations and what kind of support

do they offer for SOAP• SDK’s available

Page 3: Presentation 11: SOAP on small devices. Ingeniørhøjskolen i Århus Slide 2 af 14 Outline Which small devices? What are the limitations and what kind of.

Ingeniørhøjskolen i ÅrhusSlide 3 af 14

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)

Page 4: Presentation 11: SOAP on small devices. Ingeniørhøjskolen i Århus Slide 2 af 14 Outline Which small devices? What are the limitations and what kind of.

Ingeniørhøjskolen i ÅrhusSlide 4 af 14

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

Page 5: Presentation 11: SOAP on small devices. Ingeniørhøjskolen i Århus Slide 2 af 14 Outline Which small devices? What are the limitations and what kind of.

Ingeniørhøjskolen i ÅrhusSlide 5 af 14

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

Page 6: Presentation 11: SOAP on small devices. Ingeniørhøjskolen i Århus Slide 2 af 14 Outline Which small devices? What are the limitations and what kind of.

Ingeniørhøjskolen i ÅrhusSlide 6 af 14

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– Need to install the SmartPhone API

Page 7: Presentation 11: SOAP on small devices. Ingeniørhøjskolen i Århus Slide 2 af 14 Outline Which small devices? What are the limitations and what kind of.

Ingeniørhøjskolen i ÅrhusSlide 7 af 14

Pocket TV Viewer - .NET CFExample: this is an example app of AXIS server + .NET CF interopExample: this is an example app of AXIS server + .NET CF interop

Page 8: Presentation 11: SOAP on small devices. Ingeniørhøjskolen i Århus Slide 2 af 14 Outline Which small devices? What are the limitations and what kind of.

Ingeniørhøjskolen i ÅrhusSlide 8 af 14

Pocket PC Project

Step 1 – New Project: Choose “Smart Device Application”. Wizard and choose Pocket PCStep 1 – New Project: Choose “Smart Device Application”. Wizard and choose Pocket PC

Page 9: Presentation 11: SOAP on small devices. Ingeniørhøjskolen i Århus Slide 2 af 14 Outline Which small devices? What are the limitations and what kind of.

Ingeniørhøjskolen i ÅrhusSlide 9 af 14

Client code implementationStep 2 - Add Web Reference: as with “regular” Windows application developmentStep 2 - Add Web Reference: as with “regular” Windows application development

Step 3 – build a GUI: add a button and a text box and codeStep 3 – build a GUI: add a button and a text box and code

Step 4 – run emulatorStep 4 – run emulator

Page 10: Presentation 11: SOAP on small devices. Ingeniørhøjskolen i Århus Slide 2 af 14 Outline Which small devices? What are the limitations and what kind of.

Ingeniørhøjskolen i ÅrhusSlide 10 af 14

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)

Page 11: Presentation 11: SOAP on small devices. Ingeniørhøjskolen i Århus Slide 2 af 14 Outline Which small devices? What are the limitations and what kind of.

Ingeniørhøjskolen i ÅrhusSlide 11 af 14

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

Page 12: Presentation 11: SOAP on small devices. Ingeniørhøjskolen i Århus Slide 2 af 14 Outline Which small devices? What are the limitations and what kind of.

Ingeniørhøjskolen i ÅrhusSlide 12 af 14

JBuilder & MobileSet with kSOAP

JBuilder not needed of course: only need J2ME Mobile Toolkit from SUNJBuilder not needed of course: only need J2ME Mobile Toolkit from SUN

Page 13: Presentation 11: SOAP on small devices. Ingeniørhøjskolen i Århus Slide 2 af 14 Outline Which small devices? What are the limitations and what kind of.

Ingeniørhøjskolen i ÅrhusSlide 13 af 14

SOAP elements of codeSOAP elements: We will be looking at the SOAP elements only (commandAction is the event handler function of the application)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 ServiceNamespace initialiazed earlier: http://localhost:8080/axis/HelloWorld.jws

Add the parameter “name”Add the parameter “name”

Make the call – and typecast to stringMake the call – and typecast to stringDisplay handlingDisplay handling

Page 14: Presentation 11: SOAP on small devices. Ingeniørhøjskolen i Århus Slide 2 af 14 Outline Which small devices? What are the limitations and what kind of.

Ingeniørhøjskolen i ÅrhusSlide 14 af 14

J2ME in action (JBuilder & MobileSet)

11 22 33