owenb 2002/12/02 06:18:49 Modified: java/src/org/apache/wsif/wsdl Tag: pre1_2_0-patches WSIFWSDLLocatorImpl.java AuthenticatingProxyWSDLLocatorImpl.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 No revision No revision 1.10.2.1 +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.10.2.1 diff -u -r1.10 -r1.10.2.1 --- WSIFWSDLLocatorImpl.java 27 Sep 2002 13:14:10 -0000 1.10 +++ WSIFWSDLLocatorImpl.java 2 Dec 2002 14:18:49 -0000 1.10.2.1 @@ -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(); 1.1.2.1 +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.1.2.1 diff -u -r1.1 -r1.1.2.1 --- AuthenticatingProxyWSDLLocatorImpl.java 27 Sep 2002 12:41:44 -0000 1.1 +++ AuthenticatingProxyWSDLLocatorImpl.java 2 Dec 2002 14:18:49 -0000 1.1.2.1 @@ -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; }