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 developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

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 3: Secure Web services API stub classes

Building a stub enhancer tool

Bilal Siddiqui, Freelance consultant
Bilal Siddiqui photo
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 designing 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:  Learn how to build a secure Web services client based on Java™ 2, Micro Edition (J2ME) in this three-part tutorial series. This final installment covers important security algorithms for J2ME. It puts together the pieces developed in the previous two installments and presents a mechanism for testing your secure Web services clients. You also build a stub enhancer tool that can considerably reduce the manual programming effort required to build secure Web services clients.

View more content in this series

Date:  19 Jan 2007
Level:  Intermediate PDF:  A4 and Letter (289 KB | 64 pages)Get Adobe® Reader®

Activity:  5899 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 ervices APIs (WSA) for J2ME
  2. Cryptography
  3. XML Digital Signature (XMLDS)
  4. Java Card

In Part 1 of this series, you looked at how Web Services API (WSA) stub classes work. Part 2 demonstrated how to enhance WSA stub classes and integrate other technology components such as cryptography and XML signatures into WSA stub classes.

Part 3 starts by implementing Base64 encoding and signature calculation algorithms. Part 3 also demonstrates a comprehensive testing arrangement that you can use to test the secure J2ME-based Web services client. We'll conclude by putting together all the concepts into a "stub enhancer tool." This tool enhances the functionality of WSA stub classes by incorporating security features.


About this tutorial

In Part 2 of this tutorial series, you enhanced WSA stub classes. Part 2 also presented four helper classes named CanonicalAuthor, SHA1DigestCalculator, Base64Encoder, and SignatureCalculator. In Part 2 you also implemented two of the helper classes: CanonicalAuthor and SHA1DigestCalculator.

In Part 3 we implement the rest of the helper classes: Base64Encoder and SignatureCalculator. Part 3 then puts all the stub and helper classes into a test arrangement. This will let you test your J2ME-based secure Web services clients easily.

This tutorial series concludes by developing a stub enhancer tool. The tool is designed to bear most of the manual programming burden of enhancing stub classes and generating helper classes. You can use the stub enhancer tool to save most of your effort in building J2ME-based secure Web services clients.


Prerequisites

  • Read Part 1 and Part 2 of this series.
  • You need a basic understanding of the various technology components this series discusses. Specifically, the following background is assumed:
    • You should be familiar with Java programming and have a basic understanding of J2ME MIDlets.
    • 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.
  • Some background in XML signatures will be useful.

See Resources for several excellent developerWorks articles and tutorials on these topics.


Should I take this tutorial?

The primary purpose of this series of tutorials is to help you develop wireless access to your Web services. The main focus is security, but you can use the WSA concepts presented here to develop any type of wireless clients for your Web services.

This third part of the series demonstrates how to implement a Base64 encoding algorithm in a memory-constrained wireless device. So, this tutorial can also help you implement similar algorithms in wireless devices.

This part also demonstrates building test mechanisms that you can use while trying wireless access to your Web services. You can use this tutorial's test mechanism or develop similar testing arrangements for your Web services.

The stub enhancer tool discussed at the end of this tutorial demonstrates how to build automated solutions for WSA stub enhancement. You can use the stub enhancer tool to save development time in building J2ME-based secure Web services applications.


Tutorial topics

Part 3 is organized in the following seven sections:

  1. Tutorial introduction
  2. Demonstration of implementing a Base64-encoded algorithm in J2ME
  3. Explanation of how to communicate with Java Card applications for J2ME MIDlets
  4. Demonstration of how to install Java Card applications
  5. Demonstration of building a Java Card application capable of computing cryptographic signature values
  6. Discussion of how to build a stub enhancer tool that can perform most of the programming hard work required to enhance WSA stub classes
  7. Wrap-up

System requirements

1 of 10 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=SOA and Web services
ArticleID=189040
TutorialTitle=Building a secure SOAP client for J2ME, Part 3: Secure Web services API stub classes
publish-date=01192007
author1-email=xml4java@yahoo.co.uk
author1-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.