HEllo,
   
  I'm trying to create WSDL for the simple java program below. 
   
  package myapp;
  import java.util.HashMap;
  public class StockQuoteService {
    private HashMap map = new HashMap();
      public double getPrice(String symbol) {
        Double price = (Double) map.get(symbol);
        if(price != null){
            return price.doubleValue();
        }
        return 42.00;
    }
      public void update(String symbol, double price) {
        map.put(symbol, new Double(price));
    }
}
   
  I compiled it to generate the class file and tried creating the WSDL file. I 
get the errors below. It works if the first line (package myapp) is commented. 
with package, prefixing class name with "myapp" also gives an error. 
   
  E:\Program Files\Apache Software 
Foundation\axis2-1.2\samples\mytest>java2wsdl -
cp . -cn StockQuoteService
Using AXIS2_HOME:   E:\Program Files\Apache Software Foundation\axis2-1.2
Using JAVA_HOME:    E:\Program Files\Java\jdk1.5.0_06
Exception in thread "main" java.lang.NoClassDefFoundError: StockQuoteService (wr
ong name: myapp/StockQuoteService)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
4)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
   
   
  Can some one tell what am I doing wrong? 
   
  Regards
  --Shekhar
    
---------------------------------
  Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search.

       
---------------------------------
Yahoo! oneSearch: Finally,  mobile search that gives answers, not web links. 

Reply via email to