Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Building a secure SOAP client for J2ME, Part 1: Exploring Web Services APIs (WSA) for J2ME

Integrating security components into WSA

Bilal Siddiqui, Freelance consultant
Bilal Siddiqui is an electronics engineer, an XML consultant, and the founder of XML4Java.com, a company focused on simplifying e-business. After graduating in 1995 with a degree in electronics engineering from the University of Engineering and Technology, Lahore, he began to design software solutions for industrial control systems. Later, he turned to XML and used his experience of programming in C++ to build Web- and Wap-based XML processing tools, server-side parsing solutions, and service applications. He is a technology evangelist and a frequently published technical author.

Summary:  In this three-part tutorial series you'll learn how to build a secure Web services client based on Java™ 2, Micro edition (J2ME). This first part introduces application scenarios which allow wireless access to your Web services. Part 1 also discusses the architecture of a secure Web service application and explains the way different technology components collaborate with each other in a J2ME application to provide security features. We also explore Web Services APIs (WSA) for J2ME in detail by digging deep inside a couple of WSA applications. Later parts of this tutorial will expand upon these concepts to incorporate security into WSA applications.

View more content in this series

Date:  16 Jun 2006
Level:  Intermediate PDF:  A4 and Letter (733 KB | 49 pages)Get Adobe® Reader®

Activity:  15133 views
Comments:  

Before you start

About this tutorial series

This series demonstrates how to incorporate security in Java™ 2, Micro edition (J2ME)-based wireless access to Web services. We use the following components and technologies together in a J2ME MIDlet:

  1. Web Services APIs (WSA) for J2ME
  2. Cryptography
  3. XML Digital Signature
  4. Java Card

First you'll see several application scenarios where you will need to incorporate security in wireless access for your Web services.

WSA uses the idea of stub classes, so other technology components such as cryptography, XML signatures and Java Card technology have to fit into WSA stub classes. Therefore, we will explore how WSA stub classes work and demonstrate how other technology components cooperate with WSA.

This tutorial series also demonstrates various testing and debugging arrangements that you can use to integrate different technology components. The series concludes by putting together all the concepts into a "stub enhancer tool". This tool will enhance functionality of WSA stub classes by incorporating security features.


About this tutorial

This first part of the series introduces the concept of integrating various Internet technologies to build secure client-side Web service applications in J2ME.

We provide sample application scenarios and a comprehensive architectural discussion on how different technology components work together to build a secure Web service client.

We also present a graphical image of different modules in the security architecture, and identify the role of each module.

The architectural discussion follows an analysis of WSA stub classes. This is incremental; we first explore stub classes for a simple Web service and move to more comprehensive Web services.

This tutorial concludes by introducing the interface of a secure Web service. In forthcoming parts of this series we implement security features.


Prerequisites

As this tutorial is all about integrating various technology components, it's important for you to have a basic understanding of the components. Specifically, it is assumed readers have the following background:

  1. You should be a Java programmer and also have a basic understanding of J2ME MIDlets.
  2. WSA uses Web Services Definition Language (WSDL) and Simple Object Access Protocol (SOAP). Therefore, you need to know how WSDL interfaces are mapped to SOAP method invocation calls.
  3. You also need to know the basics of W3C's XML Schema, especially the use of xsd:element and xsd:complexType.

Moreover, some background on XML signatures will be useful.

IBM developerWorks has many excellent articles and tutorials about these topics. The Resources section lists some for ready reference.


Should I take this tutorial?

This tutorial will guide you in planning to securely enable wireless access to your Web services.

This tutorial also contains value for you if you wish to implement security in non-wireless access to your Web services.


Tutorial topics

Part 1 is organized in the following seven sections:

  1. Tutorial introduction
  2. Sample application scenarios that require wireless access to Web services. This section also introduces WSA architecture and stub classes
  3. Explanation of why you need to secure wireless access to your Web services. This section also includes a demonstration of how different technology components work together to provide security
  4. Detailed analysis of a simple client-side WSA application
  5. More analysis of a simple client-side WSA application
  6. Discussion of a more comprehensive WSA application. This discussion provides all details about the working of WSA stub and other classes, which you need to know in order to start incorporating security into WSA
  7. Wrap-up

Code samples and installation requirements

We used J2ME Wireless Toolkit version 2.2, to generate and try the code for Part 1.

Later sections of this tutorial will also need the following software tools, which are all free downloads (see Resources).

  1. Sun Java Wireless Toolkit version 2.3 Beta. We use version 2.2 in Part 1, primarily because version 2.3 is in beta at the time of writing Part 1. But we will try the code presented in later parts of the tutorial on both versions 2.2 and 2.3.
  2. XML Security Suite for Java (XSS4J) from IBM alphaWorks.
  3. Java Card Development Kit from the Sun Web site.

1 of 10 | Next

Comments



static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=SOA and web services, Java technology
ArticleID=128922
TutorialTitle=Building a secure SOAP client for J2ME, Part 1: Exploring Web Services APIs (WSA) for J2ME
publish-date=06162006
author1-email=bsiddiqui@xml4java.com
author1-email-cc=