owenb 2002/12/02 06:20:32 Modified: java/src/org/apache/wsif/wsdl AuthenticatingProxyWSDLLocatorImpl.java WSIFWSDLLocatorImpl.java Log: Fix to prevent possible infinite loop when reading a wsdl file: - if the import is not found, set the import URI to a value that is unlikely to be the value of the base URI i.e. don't use "" Revision Changes Path 1.2 +3 -2 xml-axis-wsif/java/src/org/apache/wsif/wsdl/AuthenticatingProxyWSDLLocatorImpl.java Index: AuthenticatingProxyWSDLLocatorImpl.java =================================================================== RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/wsdl/AuthenticatingProxyWSDLLocatorImpl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AuthenticatingProxyWSDLLocatorImpl.java 27 Sep 2002 12:41:44 -0000 1.1 +++ AuthenticatingProxyWSDLLocatorImpl.java 2 Dec 2002 14:20:32 -0000 1.2 @@ -168,8 +168,9 @@ } importBase = (url == null) ? relativeLocation : url.toString(); } catch (Exception e2) { - // we can't find the import so set the base as an empty string - importBase = ""; + // we can't find the import so set a temporary value for the import URI. This is + // necessary to avoid a NullPointerException in WSDLReaderImpl + importBase = "unknownImportURI"; } return importReader; } 1.11 +6 -4 xml-axis-wsif/java/src/org/apache/wsif/wsdl/WSIFWSDLLocatorImpl.java Index: WSIFWSDLLocatorImpl.java =================================================================== RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/wsdl/WSIFWSDLLocatorImpl.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- WSIFWSDLLocatorImpl.java 27 Sep 2002 13:14:10 -0000 1.10 +++ WSIFWSDLLocatorImpl.java 2 Dec 2002 14:20:32 -0000 1.11 @@ -242,12 +242,14 @@ importBase = (url == null) ? relativeLocation : url.toString(); } catch (Exception e2) { Trc.exception(e2); - // we can't find the import so set the base as an empty string - importBase = ""; + // we can't find the import so set a temporary value for the import URI. This is + // necessary to avoid a NullPointerException in WSDLReaderImpl + importBase = "unknownImportURI"; } } else { - // we can't find the import so set the base as an empty string - importBase = ""; + // we can't find the import so set a temporary value for the import URI. This is + // necessary to avoid a NullPointerException in WSDLReaderImpl + importBase = "unknownImportURI"; } } Trc.exit();