axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jongjinc...@apache.org
Subject cvs commit: ws-axis/java/src/org/apache/axis/wsdl/fromJava Emitter.java
Date Fri, 25 Mar 2005 10:02:29 GMT
jongjinchoi    2005/03/25 02:02:28

  Modified:    java/tools/org/apache/axis/tools/ant/wsdl
                        Java2WsdlAntTask.java
               java/src/org/apache/axis/wsdl/fromJava Emitter.java
  Log:
  Ant 1.5 support reverted
  
  Revision  Changes    Path
  1.30      +12 -3     ws-axis/java/tools/org/apache/axis/tools/ant/wsdl/Java2WsdlAntTask.java
  
  Index: Java2WsdlAntTask.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/tools/org/apache/axis/tools/ant/wsdl/Java2WsdlAntTask.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- Java2WsdlAntTask.java	21 Mar 2005 15:00:40 -0000	1.29
  +++ Java2WsdlAntTask.java	25 Mar 2005 10:02:19 -0000	1.30
  @@ -144,7 +144,11 @@
        * @throws BuildException
        */
       public void execute() throws BuildException {
  -        AntClassLoader cl = getProject().createClassLoader(classpath == null ? createClasspath():
classpath);        
  +        AntClassLoader cl = new AntClassLoader(getClass().getClassLoader(),
  +        		getProject(),
  +                classpath == null ? createClasspath() : classpath,
  +                false);
  +        
           ClassUtils.setDefaultClassLoader(cl);
           //add extra classes to the classpath when the classpath attr is not null
           if (extraClasses != null) {
  @@ -564,8 +568,13 @@
   
           // setup namespace-to-package mapping
           String ns = j2w.getIntfNamespace();
  -        String pkg = j2w.getCls().getPackage().getName();
  -        w2j.getNamespaceMap().put(ns, pkg);
  +        String clsName = j2w.getCls().getName();
  +        int idx = clsName.lastIndexOf(".");
  +        String pkg = null;
  +        if (idx > 0) {
  +            pkg = clsName.substring(0, idx);            
  +            w2j.getNamespaceMap().put(ns, pkg);
  +        }
           
           Map nsmap = j2w.getNamespaceMap();
           if (nsmap != null) {
  
  
  
  1.142     +5 -2      ws-axis/java/src/org/apache/axis/wsdl/fromJava/Emitter.java
  
  Index: Emitter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/fromJava/Emitter.java,v
  retrieving revision 1.141
  retrieving revision 1.142
  diff -u -r1.141 -r1.142
  --- Emitter.java	21 Mar 2005 12:37:20 -0000	1.141
  +++ Emitter.java	25 Mar 2005 10:02:19 -0000	1.142
  @@ -697,8 +697,11 @@
               }
   
               if (cls != null) {
  -                if (cls.getPackage() != null) {
  -                    namespaces.put(cls.getPackage().getName(), intfNS, "intf");
  +                String clsName = cls.getName();
  +                int idx = clsName.lastIndexOf(".");
  +                if (idx > 0) {
  +                    String pkgName = clsName.substring(0, idx);
  +                    namespaces.put(pkgName, intfNS, "intf");
                   }
               }
   
  
  
  

Mime
View raw message