Comments
Richard Davies wrote: The UK has a good crop of technology pioneers in cloud computing - for example ElasticHosts, FlexiScale, Flexiant, OnApp - and also some strong government initiatives such as G-Cloud. We will have to see whether this kind of technical leadership converts into swift mass-market adoption or not.
Cloud Expo on Google News

SYS-CON.TV
Cloud Expo & Virtualization 2009 East
PLATINUM SPONSORS:
IBM
Smarter Business Solutions Through Dynamic Infrastructure
IBM
Smarter Insights: How the CIO Becomes a Hero Again
Microsoft
Windows Azure
GOLD SPONSORS:
Appsense
Why VDI?
CA
Maximizing the Business Value of Virtualization in Enterprise and Cloud Computing Environments
ExactTarget
Messaging in the Cloud - Email, SMS and Voice
Freedom OSS
Stairway to the Cloud
Sun
Sun's Incubation Platform: Helping Startups Serve the Enterprise
POWER PANELS:
Cloud Computing & Enterprise IT: Cost & Operational Benefits
How and Why is a Flexible IT Infrastructure the Key To the Future?
Click For 2008 West
Event Webcasts
WebSphere Portal Mobile Access Portlets for WAP Devices
WebSphere Portal Mobile Access Portlets for WAP Devices

IBM's WebSphere Portal currently supports mobile devices by generating portal pages in three markup languages: HTML for desktop computers and some PDAs, WML for WAP devices, and cHTML for devices in the NTT DoCoMo i-mode network. This article focuses on portlet development for WAP devices, including a brief introduction to WAP and WML, and discusses various WAP emulators for portlet testing. The article's source code is not necessarily driven by best practices or performance considerations.

WAP and WML
WAP (Wireless Application Protocol) is a communication protocol designed for wireless devices just as HTTP is for desktop Web browsers. WML (Wireless Markup Language) is a markup language for wireless device microbrowsers as HTML is for browsers on desktop computers. WML content is read and interpreted by a microbrowser built into the WAP device. WML is similar to HTML, but less forgiving because it was designed using XML as a base.

Decks are WML documents and each deck consists of one or more cards. Decks begin with the <wml> and end with the </wml> tag, and cards begin with the <card> and end with the </card> tag. The WAP device's microbrowser reads the whole deck while accessing it in order to navigate its cards without having to load more data. Once a deck is loaded, the cards inside the deck remain in the WML microbrowser's memory until the browser is asked to reload the whole deck. Listing 1 (Listings for this article can be found at www.sys con.com/websphere/sourcec.cfm) will give you a taste of WML and WAP devices; Figure 1 shows the output on a RIM BlackBerry device.

Mobile Access Portlets for WAP Devices
Now that you have an understanding of WAP and WML, we're ready to develop the following portlets:

  • Personal bookmark-setting
  • WAP URL surfing
  • XML and XSLT
  • User-agent displaying
Personal Bookmark-Setting Portlet
The personal bookmark-setting portlet can configure an unlimited number of bookmarks to be inserted and deleted, for example, to the portlet deployment descriptor (portlet.xml) file. To develop the portlet, you need to understand the WML <anchor> tag. A WML card can be set up to display WML's anchor functions. The <anchor> tag always has a specified task ("go," "prev," or "refresh") that defines what should be done when the user selects the link. In the example shown in Listing 2, when the user selects the "Die Bahn" link, the task goes to http://wap.bahn.de.

Note that I'm using the Bookmark-Portlet_04.java example described in the Portlet Development Guide, Introduction to the Portlet API (see the references section). The portlet deployment descriptor is shown in Listing 3 - I've slightly modified the program for WAP device support application; the modified portion appears in bold type. Listing 4 shows the source portlet WAPBookmarkPort-let_04.java. The output is shown in Figure 2.

WAP Site Surfing on the Internet
The WAP URL surfing portlet provides unrestricted WAP site surfing. The user enters any URL of a WAP site. Once the portlet accesses the first page of an external WAP site, consequent links will work as long as the subsequent WML pages are well formed. You can arrange the predefined site with the bookmark-setting portlet. In addition to the following code, see Listings 5 and 6.

<jsp:useBean id="url"
class="java.lang.String" scope="request"/>
<p>
<anchor><go
href="http://<%=url%>"/>
http://<%=url%></anchor>
<br/>
</p>
The output is shown in Figure 3.

XML Access URL Portlet
The XML access URL portlet can access an external site that produces XML content. Using stylesheets, the same XML content can be displayed in a variety of formats applicable for different browsers and devices. This way, a single content source can be used to create content in different formats, such as WML, cHTML, and HTML (see Listings 7 and 8). In this case, you don't have to keep multiple content sources based on different markup languages. In this example the XML content will be applied by an XSLT stylesheet and converted to WML. Note that although I use the FlightInfo.xml and FlightInfoFor-WML.xsl files (see Listings 9 and 10) as provided by the WebSphere Transcoding Publisher, I developed the other necessary source code using XML and XSL stylesheets. The portlet will use the following XML and XSLT sources:

  • XML URL: http://home.nc.rr.com/sungik/flightinfo.xml

  • XSLT URL : Inside the portlet

    The output displayed by the different devices is shown in Figure 4.

    Portlet Displaying User-Agent Values
    A client device with a specific browser sends the user-agent value to the Web server when requesting a Web page. Since WAP devices vary in capability and features such as image support, deck size, and color support, the Web server can use the user-agent value to decipher the specific browser and device making a request, then adjust the content accordingly. Please refer to www.thewirelessfaq.com/useragents.asp for the user-agent values of different devices. The portlet shown in Listing 11 will display the user-agent value to your specific device. Figure 5 shows the output displayed by Nokia and Openwave devices.

    Mobile Access Portlets by PDA
    To access the WAP portal site using Palm devices, use the Blazer Palm browser, which supports multiple Internet standard protocols including HTML, cHTML, and WML. The AnywhereYouGo.com WAP browser by 4thPass is also good for viewing WAP-enabled sites from any mobile device running the Palm OS. To access the WAP portal site using PocketPC or Win CE devices, use the Klondike WAP Browser. Please refer to the reference section for information on downloading these browsers.

    WAP device emulators are software programs that simulate WAP devices on your desktop computer (see Figure 6). The following work well with the IBM WebSphere Portal portlets developed for WAP devices:

  • Nokia Tool: http://forum.nokia.com/main.html. Select Programs -> Nokia Mobile Internet Toolkit -> Mobile Internet Toolkit.

  • OpenWave SDK WAP Edition 5.0, 22.5 MEG: http://developer.openwave.com.

  • Klondike WAP Browser: www.apachesoftware.com/download_kwpe.html.

  • Yahoo Germany: http://de.mobile.yahoo.com.

    Conclusion
    WAP's popularity arises from the fact that it's been adopted and supported by major computing and communications industry players. IBM WebSphere Portal provides developers with the environment to develop WAP applications and build portal Web sites for wireless use. You can develop simple portlets to handle WAP devices and test their outcomes by using various WAP device emulators.

    References
    IBM products referenced here:

  • WebSphere Portal: www-3.ibm.com/software/webservers/portal.

  • WebSphere Transcoding Publisher: www.ibm.com/software/webservers/transcoding.

    SIDEBAR
    FOR MORE INFORMATION

  • "Portlet Development Guide, Introduction to the Portlet API": www-3.ibm.com/software/webservers/portal/doc/ PortletDevelopmentGuide.doc.

  • Nokia WAP Toolkit: www.nokia.com/corporate/wap/sdk.html.

  • Palm OS 3.1 Emulator: www.palmos.com/dev/tools/emulator.

  • Openwave SDK WAP Edition: (http://updev.phone.com)

  • Klondike WAP Browser: www.apachesoftware.com/download.html.

  • Blazer Palm Browser: www.handspring.com/software/blazer_overview.jhtml.

  • The AnywhereYou Go.com WAP browser, powered by 4thPass: www.anywhereyougo.com/images/palm35.zip.

  • Yahoo Germany: http://de.mobile.yahoo.com.

  • "WebSphere Solutions for XML, XSL Stylesheet, and Transcoding for Web Application Data Accessible by Various Devices": www7b.boulder.ibm.com/wsdd/techjournal/0111_son/son.html.
    About Sung Ik Son
    Sung-Ik Son is a Senior Software Engineer in the Application and Integration Middleware division of the IBM Raleigh Lab. He has been a key developer for more than 12 years in IBM's system and application software development organizations, and has worked for the past three years on the WebSphere Enablement and Consulting team. He holds a B.S. in Computer Science from the University of New Brunswick in Canada and an M.S. in Computer Science from Purdue University. Sung-Ik is a co-author of the IBM Redbook, WebSphere V3.5 Handbook (SG24-6161-00).

  • In order to post a comment you need to be registered and logged in.

    Register | Sign-in

    Reader Feedback: Page 1 of 1

    Latest Cloud Developer Stories
    Can you bring services from the cloud to your customers faster and have them adopt it with ease of use or bring the power of bundled services to the fingertips of your clients without creating new rigid ‘apps stove pipes'? Do you want to prevent your business running away to publ...
    OCZ Technology Group, a provider of high-performance solid-state drives (SSDs) for computing devices and systems, on Tuesday announced the Z-Drive R4 CloudServ PCI Express (PCIe) flash storage solution, designed to accelerate cloud computing applications and reduce operating expe...
    Many organizations have embraced, or are considering, the benefits of cloud computing – speed, flexibility, increased expertise, shared workload, reduced costs, etc. The benefits are many – but so are the risks. What are the threats to cloud security? Which parties assume respons...
    In August 2011, SHI Enterprise Solutions (ESS) division launched the SHI Cloud, offering reliable and cost-effective industrial-grade cloud computing platforms. That same division achieved an 82 percent increase in revenue over 2010.
    SoftLayer Technologies on Tuesday announced the immediate worldwide availability of SoftLayer Object Storage, a redundant and highly scalable cloud storage service that allows users to easily store, search and retrieve data across the Internet, with optional CDN connectivity, or ...
    Subscribe to the World's Most Powerful Newsletters
    Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
    Click to Add our RSS Feeds to the Service of Your Choice:
    Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
    myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
    Publish Your Article! Please send it to editorial(at)sys-con.com!

    Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

    SYS-CON Featured Whitepapers
    ADS BY GOOGLE

    Breaking Cloud Computing News
    A new collaboration between a telecommunications infrastructure firm and a data center services prov...