axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ngalla...@apache.org
Subject svn commit: r501229 - in /webservices/axis2/trunk/java/modules: jaxws/test/org/apache/axis2/jaxws/polymorphic/shape/tests/ metadata/src/org/apache/axis2/jaxws/description/impl/ metadata/src/org/apache/axis2/jaxws/i18n/ metadata/src/org/apache/axis2/jax...
Date Mon, 29 Jan 2007 23:20:31 GMT
Author: ngallardo
Date: Mon Jan 29 15:20:30 2007
New Revision: 501229

URL: http://svn.apache.org/viewvc?view=rev&rev=501229
Log:
AXIS2-2056
Contributor: Dustin Amrhein

Dustin's patch for cleaning up this bit of error handling.

Modified:
    webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/polymorphic/shape/tests/PolymorphicTests.java
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/util/WSDL4JWrapper.java

Modified: webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/polymorphic/shape/tests/PolymorphicTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/polymorphic/shape/tests/PolymorphicTests.java?view=diff&rev=501229&r1=501228&r2=501229
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/polymorphic/shape/tests/PolymorphicTests.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/test/org/apache/axis2/jaxws/polymorphic/shape/tests/PolymorphicTests.java
Mon Jan 29 15:20:30 2007
@@ -3,6 +3,8 @@
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.net.MalformedURLException;
+import java.net.ConnectException;
+import java.net.UnknownHostException;
 import java.net.URL;
 import java.util.Iterator;
 import java.util.Set;
@@ -84,6 +86,12 @@
 		}catch(FileNotFoundException e) {
 			e.printStackTrace();
 			fail();
+		}catch(UnknownHostException e) {
+			e.printStackTrace();
+			fail();
+		}catch(ConnectException e) {
+			e.printStackTrace();
+			fail();
 		}catch(WSDLException e){
 			e.printStackTrace();
 			fail();
@@ -121,6 +129,12 @@
 			e.printStackTrace();
 			fail();
 		}catch(FileNotFoundException e) {
+			e.printStackTrace();
+			fail();
+		}catch(UnknownHostException e) {
+			e.printStackTrace();
+			fail();
+		}catch(ConnectException e) {
 			e.printStackTrace();
 			fail();
 		}catch(WSDLException e){

Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java?view=diff&rev=501229&r1=501228&r2=501229
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java
(original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/ServiceDescriptionImpl.java
Mon Jan 29 15:20:30 2007
@@ -17,7 +17,9 @@
 package org.apache.axis2.jaxws.description.impl;
 
 import java.io.FileNotFoundException;
+import java.net.ConnectException;
 import java.net.URL;
+import java.net.UnknownHostException;
 import java.util.ArrayList;
 import java.util.Enumeration;
 import java.util.HashMap;
@@ -460,6 +462,12 @@
             }
             catch(FileNotFoundException e) {
             	throw ExceptionFactory.makeWebServiceException(Messages.getMessage("wsdlNotFoundErr",
e.getMessage()), e);
+            }
+            catch(UnknownHostException e) {
+            	throw ExceptionFactory.makeWebServiceException(Messages.getMessage("unknownHost",
e.getMessage()), e);
+            }
+            catch(ConnectException e) {
+            	throw ExceptionFactory.makeWebServiceException(Messages.getMessage("connectionRefused",
e.getMessage()), e);
             }
             catch (WSDLException e) {
                 throw ExceptionFactory.makeWebServiceException(Messages.getMessage("wsdlException",
e.getMessage()), e);

Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties?view=diff&rev=501229&r1=501228&r2=501229
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties
(original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/i18n/resource.properties
Mon Jan 29 15:20:30 2007
@@ -145,3 +145,5 @@
 invalidPropValue=The value of property {0} was invalid.  {1} does not match expected type
{2}.
 RPCLitMethodMarshallerErr1=Input argument for Operation cannot be null for RPC/LIT messages.
 RPCLitMethodMarshallerErr1=Input argument for Operation cannot be null for RPC/LIT messages.
+unknownHost=The host specified by the URL is unknown.
+connectionRefused=An attempt to connect to the URL was refused.

Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/util/WSDL4JWrapper.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/util/WSDL4JWrapper.java?view=diff&rev=501229&r1=501228&r2=501229
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/util/WSDL4JWrapper.java
(original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/util/WSDL4JWrapper.java
Mon Jan 29 15:20:30 2007
@@ -19,8 +19,10 @@
 
 import java.io.FileNotFoundException;
 import java.io.InputStream;
+import java.net.ConnectException;
 import java.net.URL;
 import java.net.URLConnection;
+import java.net.UnknownHostException;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
@@ -43,7 +45,8 @@
 	private Definition wsdlDefinition = null;
 	private URL wsdlURL;
 	
-    public WSDL4JWrapper(URL wsdlURL)throws FileNotFoundException, WSDLException{
+    public WSDL4JWrapper(URL wsdlURL)throws FileNotFoundException, UnknownHostException,

+    	ConnectException, WSDLException{
 		super();
 		this.wsdlURL = wsdlURL;
 		WSDLFactory factory = WSDLFactory.newInstance();
@@ -55,11 +58,15 @@
 			InputStream is = urlCon.getInputStream();
 			is.close();
 			String explicitWsdl = urlCon.getURL().toString();
-			
 			wsdlDefinition = reader.readWSDL(explicitWsdl);
-			
 		}
 		catch(FileNotFoundException ex) {
+			throw ex;
+		}
+		catch(UnknownHostException ex) {
+			throw ex;
+		}
+		catch(ConnectException ex) {
 			throw ex;
 		}
 		catch (Exception ex) {



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message