axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bu...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/wsdl/toJava Emitter.java
Date Wed, 23 Jan 2002 15:45:06 GMT
butek       02/01/23 07:45:06

  Modified:    java/src/org/apache/axis/wsdl/toJava Emitter.java
  Log:
  If a wsdl file were a file, imports of relative-path files worked.  But if a wsdl file were
  on the net, then relative-path imports didn't work.  WSDL4J didn't work like I expected
  it to.
  
  Revision  Changes    Path
  1.8       +7 -1      xml-axis/java/src/org/apache/axis/wsdl/toJava/Emitter.java
  
  Index: Emitter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/toJava/Emitter.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Emitter.java	21 Jan 2002 15:31:03 -0000	1.7
  +++ Emitter.java	23 Jan 2002 15:45:06 -0000	1.8
  @@ -132,7 +132,13 @@
           if (bVerbose)
               System.out.println(JavaUtils.getMessage("parsing00", uri));
   
  -        emit((String) null, XMLUtils.newDocument(uri));
  +        // calculate baseURI so that imported relative URI's work
  +        int lastSlash = uri.lastIndexOf('/');
  +        String baseURI = null;
  +        if (lastSlash > 0) {
  +            baseURI = uri.substring(0, lastSlash + 1);
  +        }
  +        emit(baseURI, XMLUtils.newDocument(uri));
       } // emit
   
       /**
  
  
  

Mime
View raw message