Android Component Development

fansbutterflyΚινητά – Ασύρματες Τεχνολογίες

19 Ιουλ 2012 (πριν από 6 χρόνια και 1 μέρα)

334 εμφανίσεις

Android Component Development
Final Project Report

Project Name:
WSRF-ME on Android
Group Number:

General facts
The purpose of this project is the development of a framework designed to consume grid computing
related web services, specifically those provided by the Globus Toolkit.
The Globus Toolkit is an open source software used for building Grid systems and applications. Grid
systems are of interest because they provide access to large amounts of computing power and
resources. Needless to say, mobile devices could benefit greatly from the use of such resources as their
shortcomings lie specifically in these areas.
The services provided by the Globus Toolkit are both transient and stateful. Globus’ “resource
approach” to statefulness is defined in the Web Service Resource Framework (WSRF), which is a set of
specifications that define the web services as extensions to the SOAP communication protocol in an
effort to achieve true platform-independent grid computing.
The value of this project lies not only in the consumption of this specific type of web services from an
Android mobile device, but the abstraction of SOAP communications and their implementation on an
Android phone, no matter their specifics.
Project facts
The work in this project was centered in the following three areas in order to provide a meaningful
demonstration of the communication between a Globus Grid and an Android device.
Client Framework
The development of a client framework is the main objective of this project. This framework provides
the classes for HTTP and SOAP client-side communication of an Android device with a Globus server and
is described in detail later in this document.
Use case
As a demonstrative use case the invocation of a Directory web service was selected. This web service
was developed for the original Nokia S60 framework and its purpose is to browse files and folders on a
specific location of the Globus server. Its main operations are list (which returns an array listing the
folders and files on a particular location) and open (which opens the specified file). These invocations
are hidden behind the functionality of a typical File Explorer application.
Globus Grid
Although the server-side isn’t the main focus of this project it does play a key role in its development
and testing. In this particular case, the Globus Grid is simulated with a one-node server running the
Globus Toolkit 4.0.2 (Axis server) on a Fedora 9 VM-ware virtual machine. In its zipped version this
Virtual machine is approximately 1G in size.
The group had access to the original WSRF-ME framework developed for the Nokia S60 phone series.
However, this framework was developed based on the JSR-172 specification. The purpose of JSR-172 is
to define an optional package that provides standard access from J2ME to web services. Although
Blackberry already provides such access, Android phones still don’t support it and require a different
One approach to SOAP web services on Android is through the ksoap2 library. This library was tested on
the Globus environment and its shortcomings were identified. In particular, the ksoap2 library does not
support complex types such as the array for file listing suggested by the use case.
On the other hand, the creation and addressing of particular resources (where the state of the web
service call is to be held), was possible through the inherited capabilities of the class’ public
components, but not supported in a clean way.
These issues were addressed in the developed framework. This project’s framework is an extension of
the ksoap2 library but could be easily separated from it with minor changes, if the necessity of a smaller
sized solution is imperative.
Framework Documentation
The framework is divided among several packages. The org.fau package, which describes a new type of
SOAP envelope which already supports the complex types as well as header and body tag insertion. The
classes belonging to this package can be recognized because of their name (freeXXX). These classes
could be used on any type of soap environment (hence their name), and they extend ksoap’s original
Init(init: string) :
Refresh(): String
List() : String[]
Open(open: String): String
requestEnv: globusEnvelope
responseEnv: globusEnvelope
Init(init: string) :
Refresh(): String
List() : String[]
Open(open: String): String

Figure 2. Directory service client implementation

Java Documentation
With the help of “javadoc”, the documentation for the code was generated. A sample screenshot from
the documentation can be viewed below.

In this case a folder was selected, and after it is activated by hand or by pressing the “enter button”, it
moves to that folder to display its content.

As can be seen here, the new folder is being opened and its content revealed. If a file is selected for
displaying then the following screen appears.

Here the file was opened, if the file is big enough to not fit inside the screen, the lateral side bar is
activated so you can scroll down to see the full text. Notice that the name of the file is displayed in the
top bar.
To exit this screen and return to the previous menu, click on the return button in the Android device.

Summary & Future developments
As a future development, the HTTPS connection remains to be completed. Nonetheless, the framework
achieved the server connection and proper message exchange in a meaningful application.
As a particular contribution of this work, a flexible SOAP envelope was developed extending ksoap’s
original functionality, which allows changes in the header as well as the body of the SOAP message. The
support of Complex objects as sent by the Globus server was achieved in a natural, easy way.
This functionality is not limited by a specific Globus related implementation and can be used to achieve
other non-trivial SOAP applications.