ws-wsif-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ow...@apache.org
Subject cvs commit: xml-axis-wsif/java/src/org/apache/wsif/schema Parser.java
Date Sun, 09 Feb 2003 16:10:24 GMT
owenb       2003/02/09 08:10:24

  Modified:    java/src/org/apache/wsif/schema Parser.java
  Log:
  Update to work with the latest version of the javax.wsdl.xml.WSDLLocator interface
  
  Revision  Changes    Path
  1.7       +7 -4      xml-axis-wsif/java/src/org/apache/wsif/schema/Parser.java
  
  Index: Parser.java
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/schema/Parser.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Parser.java	7 Dec 2002 12:33:47 -0000	1.6
  +++ Parser.java	9 Feb 2003 16:10:24 -0000	1.7
  @@ -576,11 +576,10 @@
        */
       private static void getImportedSchemas(String base, String rel, WSDLLocator loc, List
schemaList) throws WSIFException  {
           try {
  -            Reader reader = loc.getImportReader(base, rel);
  -            if (reader == null) {
  +            InputSource inputSource = loc.getImportInputSource(base, rel);
  +            if (inputSource == null) {
               	throw new WSIFException("Unable to read schema file "+rel+" relative to "+base);
               }
  -            InputSource inputSource = new InputSource(reader);
               DocumentBuilderFactory factory =
                   DocumentBuilderFactory.newInstance();
   
  @@ -589,7 +588,11 @@
   
               DocumentBuilder builder = factory.newDocumentBuilder();
               Document doc = builder.parse(inputSource);
  -			reader.close();
  +            if (inputSource.getCharacterStream() != null) {
  +            	inputSource.getCharacterStream().close();
  +            } else if (inputSource.getByteStream() != null) {
  +            	inputSource.getByteStream().close();
  +            }			
   
               Element el = doc.getDocumentElement();
               if (el != null) {
  
  
  

Mime
View raw message