axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sc...@apache.org
Subject svn commit: r583478 - in /webservices/axis2/trunk/java/modules: jaxws/src/org/apache/axis2/jaxws/handler/ jaxws/src/org/apache/axis2/jaxws/message/databinding/ jaxws/src/org/apache/axis2/jaxws/message/util/ jaxws/src/org/apache/axis2/jaxws/runtime/desc...
Date Wed, 10 Oct 2007 14:01:40 GMT
Author: scheu
Date: Wed Oct 10 07:01:39 2007
New Revision: 583478

URL: http://svn.apache.org/viewvc?rev=583478&view=rev
Log:
Fixed unthrown exceptions
Contributor:Rich Scheuerle
Did a quick scrub of the code and found a lot of places that
called ExceptionFactory.make*Exception, but did not throw the exception.
These are now fixed.

Modified:
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/handler/SoapMessageContext.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/JAXBUtils.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/util/XMLFaultUtils.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/ArtifactProcessor.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/MarshalServiceRuntimeDescriptionBuilder.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/MarshalServiceRuntimeDescriptionImpl.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/PackageSetBuilder.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/PropertyDescriptorMapBuilder.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
    webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/util/WSDL4JWrapper.java

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/handler/SoapMessageContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/handler/SoapMessageContext.java?rev=583478&r1=583477&r2=583478&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/handler/SoapMessageContext.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/handler/SoapMessageContext.java
Wed Oct 10 07:01:39 2007
@@ -63,13 +63,13 @@
             if(log.isDebugEnabled()){
                 log.debug("Invalid QName, QName cannot be null");
             }
-            ExceptionFactory.makeWebServiceException(Messages.getMessage(""));
+            throw ExceptionFactory.makeWebServiceException(Messages.getMessage(""));
         }
         if(jaxbcontext == null){
             if(log.isDebugEnabled()){
                 log.debug("Invalid JAXBContext, JAXBContext cannot be null");
             }
-            ExceptionFactory.makeWebServiceException(Messages.getMessage("SOAPMessageContextErr2"));
+            throw ExceptionFactory.makeWebServiceException(Messages.getMessage("SOAPMessageContextErr2"));
         }
 
         if(flag == false){
@@ -97,7 +97,7 @@
                     }
 
                 }catch(XMLStreamException e){
-                    ExceptionFactory.makeWebServiceException(e);
+                    throw ExceptionFactory.makeWebServiceException(e);
                 }
             }
         }

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/JAXBUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/JAXBUtils.java?rev=583478&r1=583477&r2=583478&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/JAXBUtils.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/JAXBUtils.java
Wed Oct 10 07:01:39 2007
@@ -850,7 +850,7 @@
             if (e.getException() instanceof JAXBException) {
                 throw (JAXBException)e.getException();
             } else if (e.getException() instanceof RuntimeException) {
-                ExceptionFactory.makeWebServiceException(e.getException());
+                throw ExceptionFactory.makeWebServiceException(e.getException());
             }
         }
 

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/util/XMLFaultUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/util/XMLFaultUtils.java?rev=583478&r1=583477&r2=583478&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/util/XMLFaultUtils.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/util/XMLFaultUtils.java
Wed Oct 10 07:01:39 2007
@@ -591,7 +591,7 @@
                 try {
                     converter.toSAAJ(blocks[i].getOMElement(), detail);
                 } catch (XMLStreamException xse) {
-                    ExceptionFactory.makeWebServiceException(xse);
+                    throw ExceptionFactory.makeWebServiceException(xse);
                 }
             }
 

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/ArtifactProcessor.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/ArtifactProcessor.java?rev=583478&r1=583477&r2=583478&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/ArtifactProcessor.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/ArtifactProcessor.java
Wed Oct 10 07:01:39 2007
@@ -181,7 +181,7 @@
                         faultBeanLocalName = aDesc.getXmlRootElementName();
                     }
                 } catch (Throwable t) {
-                    ExceptionFactory.makeWebServiceException(t);
+                    throw ExceptionFactory.makeWebServiceException(t);
                 }
             }
         }
@@ -204,7 +204,7 @@
                         faultBeanNamespace = aDesc.getXmlRootElementNamespace();
                     }
                 } catch (Throwable t) {
-                    ExceptionFactory.makeWebServiceException(t);
+                   throw ExceptionFactory.makeWebServiceException(t);
                 }
             }
         }

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/MarshalServiceRuntimeDescriptionBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/MarshalServiceRuntimeDescriptionBuilder.java?rev=583478&r1=583477&r2=583478&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/MarshalServiceRuntimeDescriptionBuilder.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/MarshalServiceRuntimeDescriptionBuilder.java
Wed Oct 10 07:01:39 2007
@@ -68,7 +68,7 @@
         try {
             artifactProcessor.build();
         } catch (Throwable t) {
-            ExceptionFactory.makeWebServiceException(t);
+            throw ExceptionFactory.makeWebServiceException(t);
         }
         marshalDesc.setRequestWrapperMap(artifactProcessor.getRequestWrapperMap());
         marshalDesc.setResponseWrapperMap(artifactProcessor.getResponseWrapperMap());

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/MarshalServiceRuntimeDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/MarshalServiceRuntimeDescriptionImpl.java?rev=583478&r1=583477&r2=583478&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/MarshalServiceRuntimeDescriptionImpl.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/MarshalServiceRuntimeDescriptionImpl.java
Wed Oct 10 07:01:39 2007
@@ -111,7 +111,7 @@
         try {
             pdMap = XMLRootElementUtil.createPropertyDescriptorMap(cls);
         } catch (Throwable t) {
-            ExceptionFactory.makeWebServiceException(t);
+            throw ExceptionFactory.makeWebServiceException(t);
         }
         return pdMap;
     }

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/PackageSetBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/PackageSetBuilder.java?rev=583478&r1=583477&r2=583478&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/PackageSetBuilder.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/PackageSetBuilder.java
Wed Oct 10 07:01:39 2007
@@ -119,7 +119,7 @@
                         Set<String> pkgSet = sr.readPackagesFromSchema(wsdlDefinition);
                         set.addAll(pkgSet);
                     } catch (SchemaReaderException e) {
-                        ExceptionFactory.makeWebServiceException(e);
+                        throw ExceptionFactory.makeWebServiceException(e);
                     }
                 }
             }
@@ -454,7 +454,10 @@
                             }
                         });
             } catch (PrivilegedActionException e) {
-                ExceptionFactory.makeWebServiceException(e.getException());
+                // Swallow and continue
+                if (log.isDebugEnabled()) {
+                    log.debug("Exception getting wsdlLocation: " +e.getException());
+                }
             }
         }
 

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/PropertyDescriptorMapBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/PropertyDescriptorMapBuilder.java?rev=583478&r1=583477&r2=583478&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/PropertyDescriptorMapBuilder.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/PropertyDescriptorMapBuilder.java
Wed Oct 10 07:01:39 2007
@@ -193,7 +193,7 @@
                         XMLRootElementUtil.createPropertyDescriptorMap(cls);
                 map.put(cls, pdMap);
             } catch (Throwable t) {
-                ExceptionFactory.makeWebServiceException(t);
+                throw ExceptionFactory.makeWebServiceException(t);
             }
         }
     }

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java?rev=583478&r1=583477&r2=583478&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java
Wed Oct 10 07:01:39 2007
@@ -446,7 +446,7 @@
                     Message msg = mf.createFrom(xmlreader, protocol);
                     requestMsgContext.setMessage(msg);
                 } catch (Throwable e) {
-                    ExceptionFactory.makeWebServiceException(e);
+                    throw ExceptionFactory.makeWebServiceException(e);
                 }
             }
         }

Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java?rev=583478&r1=583477&r2=583478&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java
(original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/DescriptionUtils.java
Wed Oct 10 07:01:39 2007
@@ -300,7 +300,7 @@
         }
         catch (IOException e) {
             // report this since it was a valid URL but the openStream caused a problem
-            ExceptionFactory.makeWebServiceException(Messages.getMessage("hcConfigLoadFail",
+            throw ExceptionFactory.makeWebServiceException(Messages.getMessage("hcConfigLoadFail",
                                                                          configFile, className,
                                                                          e.toString()));
         }
@@ -324,13 +324,13 @@
                 configStream = classLoader.getResourceAsStream(resolvedPath);
             }
             catch (URISyntaxException e) {
-                ExceptionFactory.makeWebServiceException(Messages.getMessage("hcConfigLoadFail",
+                throw ExceptionFactory.makeWebServiceException(Messages.getMessage("hcConfigLoadFail",
                                                                              configFile,
className,
                                                                              e.toString()));
             }
         }
         if (configStream == null) {
-            ExceptionFactory.makeWebServiceException(Messages.getMessage("handlerChainNS",
+            throw ExceptionFactory.makeWebServiceException(Messages.getMessage("handlerChainNS",
                                                                          configFile, className));
         } else {
             if (log.isDebugEnabled()) {

Modified: webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java?rev=583478&r1=583477&r2=583478&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
(original)
+++ webservices/axis2/trunk/java/modules/metadata/src/org/apache/axis2/jaxws/description/impl/EndpointInterfaceDescriptionImpl.java
Wed Oct 10 07:01:39 2007
@@ -283,7 +283,7 @@
                 if (!Modifier.isPublic(method.getModifiers())) {
                     // JSR-181 says methods must be public (p14)
                     // TODO NLS
-                    ExceptionFactory.makeWebServiceException("SEI methods must be public");
+                    throw ExceptionFactory.makeWebServiceException("SEI methods must be public");
                 }
                 // TODO: other validation per JSR-181
             }

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?rev=583478&r1=583477&r2=583478&view=diff
==============================================================================
--- 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
Wed Oct 10 07:01:39 2007
@@ -206,7 +206,7 @@
     	    if(log.isDebugEnabled()){
     	        log.debug("No URL's found in URL ClassLoader");
     	    }
-    	    ExceptionFactory.makeWebServiceException(Messages.getMessage("WSDL4JWrapperErr1"));
+    	    throw ExceptionFactory.makeWebServiceException(Messages.getMessage("WSDL4JWrapperErr1"));
     	}
 
         for (URL url : urlList) {



---------------------------------------------------------------------
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