geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r1170411 - /geronimo/server/branches/2.2/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/handler/AnnotationHandlerChainBuilder.java
Date Wed, 14 Sep 2011 01:56:14 GMT
Author: xuhaihong
Date: Wed Sep 14 01:56:13 2011
New Revision: 1170411

URL: http://svn.apache.org/viewvc?rev=1170411&view=rev
Log:
GERONIMO-6104 Support absolute java.net.URL in externalForm in HandlerChain annotation

Modified:
    geronimo/server/branches/2.2/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/handler/AnnotationHandlerChainBuilder.java

Modified: geronimo/server/branches/2.2/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/handler/AnnotationHandlerChainBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/handler/AnnotationHandlerChainBuilder.java?rev=1170411&r1=1170410&r2=1170411&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/handler/AnnotationHandlerChainBuilder.java
(original)
+++ geronimo/server/branches/2.2/plugins/jaxws/geronimo-jaxws/src/main/java/org/apache/geronimo/jaxws/handler/AnnotationHandlerChainBuilder.java
Wed Sep 14 01:56:13 2011
@@ -61,7 +61,15 @@ public class AnnotationHandlerChainBuild
 
             try {
                 URL handlerFileURL = clz.getResource(hcAnn.getFileName());
-                HandlerChainsType handlerChainsType = HandlerChainsDocument.Factory.parse(handlerFileURL).getHandlerChains();
+                if(handlerFileURL == null) {
+                    handlerFileURL = new URL(hcAnn.getFileName());
+                }
+                HandlerChainsType handlerChainsType = null;
+                try {
+                    handlerChainsType = HandlerChainsDocument.Factory.parse(handlerFileURL).getHandlerChains();
+                } catch(Exception e) {
+                    throw new WebServiceException("Could not read the chain info from " +
hcAnn.getFileName(), e);
+                }    
 
                 if (null == handlerChainsType || handlerChainsType.getHandlerChainArray()
== null) {
                     throw new WebServiceException("Chain not specified");
@@ -72,6 +80,8 @@ public class AnnotationHandlerChainBuild
                     chain.addAll(buildHandlerChain(hc, clz.getClassLoader()));
                 }
 
+            } catch (WebServiceException e) {
+                throw e;
             } catch (Exception e) {
                 throw new WebServiceException("Chain not specified", e);
             }



Mime
View raw message