JAX_RPC - Runtime errors

From: Atif Ahmad <bj93004_at_BINGHAMTON.EDU>
Date: Sun, 20 Apr 2003 11:49:07 -0400

I am trying to create a simple jax-rpc client, to query the amazon web services. I am getting the following runtime errors .... does any body know where the problem could be. I am also pasting the code for my AmazonProxy class. I created the client side files using the wscompile tool.

Exception in thread "main" java.lang.NoClassDefFoundError: javax.activation.Data
        at com.sun.xml.rpc.encoding.soap.StandardSOAPTypeMappings.class$(
        at com.sun.xml.rpc.encoding.soap.StandardSOAPTypeMappings.<init>(
        at com.sun.xml.rpc.encoding.StandardTypeMappings.getSoap(
        at com.sun.xml.rpc.client.BasicService.createSoapMappings(
        at com.sun.xml.rpc.client.BasicService.createStandardTypeMappingRegistry(
        at myAmazonClient.AmazonSearchService_SerializerRegistry.getRegistry(
        at myAmazonClient.AmazonSearchService_Impl.<init>(
        at AmazonProxy.getBookNames(
        at AmazonProxy.main(


import myAmazonClient.*;
import javax.xml.rpc.*;
import java.util.Vector;


public class AmazonProxy{

  private String[] imageURL;
  private String[] bookReviews;
  private String[] books;
  static int detailLength;

  public AmazonProxy() {
  public Vector getBookTypes() {
    Vector v = new Vector();
    v.addElement("Blue Prints");
    v.addElement("Web Services");
    return v;
  public String[] getBookNames(String type) {
// String books[];
      Stub stub = (Stub) (new myAmazonClient.AmazonSearchService_Impl().getAmazonSearchPort());
      myAmazonClient.AmazonSearchPort asp = (myAmazonClient.AmazonSearchPort) stub;
      myAmazonClient.KeywordRequest kwr = new myAmazonClient.KeywordRequest(type,"1","books","D3HW0PG66IPLAM","heavy","D3HW0PG66IPLAM","");
      myAmazonClient.ProductInfo pinfo = asp.keywordSearchRequest(kwr);
      myAmazonClient.Details details[] = pinfo.getDetails();
      String newline = System.getProperty("line.separator");
   detailLength = details.length;
      books = new String[detailLength];
      imageURL = new String[detailLength];
      bookReviews = new String[detailLength];
   for (int i=0;i<detailLength;i++) {
        // extract data from details vector
  books[i] = details[i].getProductName();
    } catch (Exception e) {
  System.out.println("this is an exception test");
      //handle exception
 return books;
  public String[] getImageURL() {
    return imageURL;
  public String[] getBookReviews() {
    return bookReviews;
 public static void main(String args[]) throws Exception {

  String[] bookNames = new String[detailLength];
  AmazonProxy amazon = new AmazonProxy();
  bookNames = amazon.getBookNames("J2EE");
  for (int i=0;i<detailLength;i++) {
        // extract data from details vector
 }catch (Exception e) {
I am doing this as a class project and would appreciate all the help that I can get. I would be looking forward to all replies.