LuxDeal FeaturesLuxDeal Features
Login, Logout, User profile and settings Search an offer by :
Category City Country Keywords
Submit, see an offer Propose a deal with another member Multi-languages
SOAPSOAPSimple Object Access ProtocolSimple Object Access Protocol
Based on XML Procedure calls on remote objects Exchange of structured, typed
informations on the Web Support of severals protocols and
internet formats (SMTP, MIME, HTTP…)
SOAPSOAP
Creation of Web-services
Define elements to specify : Method’s name parameters retourned type
SOAPSOAP
SOAP requests: LIEBIG
<soap:Body>
<ns1:login xmlns:ns1="urn:LuxdealService"><username
xsi:type="xsd:string">cedrprus</username><password
xsi:type="xsd:string">newpass</password></ns1:login>
</soap:Body>
JerryMouseJerryMouseTomcatTomcat
Two objects :
An initialization class (servlet) Connection to MYSQL, DB’ managing,
authentification
An implementation class Service’s method
JerryMouseJerryMouseTomcatTomcat
Definition of Web-service:
‘web.xml’ Parameters of service (login root, path…)
‘deploymentDescriptor.xml’ Profils of functions
Smartphone Toolkit
Smartphone 2002 SDK, eMbedded Visual C++ 3.0
Smartphone 2003 SDK
eMbedded Visual C++4.0 SP2
Visual Studio .NET 2003 CF
Developing the application
Two problems to resolve :
Deals with Windows User InterfaceNo MFC
ATL
Win 32 API
Messaging with SOAPMS Soap Toolkit not available for eMbedded Visual C++
HTTP + XML
HTTP
WinInet API
InternetOpen()
ConnMgrEstablishConnectionSync()
InternetConnect()
HttpOpenRequest()
HttpSendRequest()
InternetReadFile()
Designing User Interface
With the IDE resource editorDialog
Control
String table
Multi User Language
Life cycleLife cycle
3 statesCreate the MIDLetStart the MIDLet
Pause the MIDLet
Restart the MIDLet
Destroy the MIDLet
SOAPSOAP
Libraries :
KSOAP 1.2
KSOAP 2.0
or
http://ksoap.enhydra.org/
Doesn’t support «Vector» for mapping
Support «Vector» for mapping, but
Httptransport has to be modified
SDK’sSDK’s
Beta Release of the J2ME Wireless Toolkit 2.1 (WTK21)
Sprint PCS Java Wireless Toolkit 1.0.3_01
Sony Ericsson SDK 1.2
Siemens Mobility Toolkits (SMTK) for Java™
Motorola SDK v4.0 for J2ME
Nokia Developer's Suite for J2ME(TM) 2.0 (2.6.2003)
Impronto Developer Kit for Linux
Application creationApplication creation
1) Compilation
2) Preverification
3) Obfuscation
4) Jarring and JAD updating5) Deployment
CompilationCompilation
Depending on targeted device
Simple javac
Wireless Tool Kit 2.1 example :
javac -g:none -bootclasspath ..\simulators\WTK21\lib\midp20.zip;..\lib\soap -d ..\tmpclasses ..\src\luxdeal\*.java
Motorola example :
javac -target 1.1 -O -bootclasspath ..\simulators\motorolaA760\lib\midp.zip;..\lib\soap -d ..\tmpclasses -classpath ..\tmpclasses ..\src\luxdeal\*.java
PreverificationPreverification
* Needed to check the forbidden dynamic class loading and many other security actions. * Replace byte code of javac compiled classes and reduce a bit their size. * Depending on targeted device.
Wireless Tool Kit 2.1 example :
..\simulators\WTK21\bin\preverify -classpath ..\simulators\WTK21\lib\fulllib.zip -d ..\classes ..\tmpclasses
Motorola example :
..\simulators\motorolaA760\bin\preverify -classpath ..\simulators\motorolaA760\lib\midp.zip;..\tmpclasses;..\lib -d ..\classes ..\tmpclasses
ObfuscationObfuscation
* Reduces final jar size down to 30% to fit to the device space memory
* Prevents the jar to be decompiled
* Do not depend on targeted device.
RetroGuard obfuscator example :
java -classpath ..\obfuscators\retroguard.jar;..\simulators\WTK21\wtklib\emptyapi.zip;..\lib RetroGuard LuxDeal-org.jar LuxDeal-obf.jar script.rgs
Jaring and updating DescriptorJaring and updating Descriptor
* Reduces final jar size down to 30% to fit to the device space memory
* Prevents the jar to be decompiled
* Do not depend on targeted device.
Jarring :
jar cmf MANIFEST.MF LuxDeal.jar -C ..\classes . -C ..\res .
Updating JAD file (jar size attribute) :
java -classpath . JadUpdater LuxDeal.jar LuxDeal.jad
DeploymentDeployment
•Create a WML page
•Upload to web server or localhost
• luxdeal.wml (assuming it’s the name of our created wml file)
•LuxDeal.jad
•LuxDeal.jar
<?xml version="1.0" ?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml" ><wml><template><do type="codev" label="Back">
</do></template><card id="card1" title="LuxDeal download Page" newcontext="true"><p align="center">LuxDeal download Page <br/><a href="http://192.168.200.108:5555/LuxDeal.jad"> LuxDeal J2Me</a><br/></p></card></wml>
AddType text/vnd.sun.j2me.app-descriptor jadAddType application/java-archive jar for Notes add the following to httpd.cnf:## J2ME Stuff#AddType .wml text/vnd.wap.wml 8bit # WMLAddType .jad text/vnd.sun.j2me.app-descriptor for .jad filesAddType .jar application/java-archive for .jar files.
Configure server for JAD filesConfigure server for JAD files
Tested devicesTested devices
SUN devices
Sprint PCS devices
Sony Ericsson : P900
Motorola : A760
Nokia : 60xx