Author: thomas.diesler(a)jboss.com
Date: 2007-03-04 09:46:36 -0500 (Sun, 04 Mar 2007)
New Revision: 2516
Modified:
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/VirtualFileAdaptor.java
trunk/jbossws-core/src/java/org/jboss/ws/core/UnifiedVirtualFile.java
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/UnifiedWebServiceRefHandler.java
Log:
servlet vehicle cannot load handler chain
Modified:
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/VirtualFileAdaptor.java
===================================================================
---
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/VirtualFileAdaptor.java 2007-03-03
17:11:21 UTC (rev 2515)
+++
trunk/integration-jboss50/src/java/org/jboss/ws/integration/jboss50/VirtualFileAdaptor.java 2007-03-04
14:46:36 UTC (rev 2516)
@@ -46,6 +46,11 @@
this.root = root;
}
+ public String getName()
+ {
+ return root.getName();
+ }
+
public UnifiedVirtualFile findChild(String child) throws IOException
{
VirtualFile vf = root.findChild(child);
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/UnifiedVirtualFile.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/UnifiedVirtualFile.java 2007-03-03
17:11:21 UTC (rev 2515)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/UnifiedVirtualFile.java 2007-03-04
14:46:36 UTC (rev 2516)
@@ -36,6 +36,8 @@
*/
public interface UnifiedVirtualFile extends Serializable
{
+ String getName();
+
UnifiedVirtualFile findChild(String child) throws IOException;
URL toURL();
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/UnifiedWebServiceRefHandler.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/UnifiedWebServiceRefHandler.java 2007-03-03
17:11:21 UTC (rev 2515)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/UnifiedWebServiceRefHandler.java 2007-03-04
14:46:36 UTC (rev 2516)
@@ -23,6 +23,7 @@
// $Id$
+import java.io.IOException;
import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;
import java.lang.reflect.Field;
@@ -163,9 +164,17 @@
declaringClass = (Class)anElement;
handlerChain = declaringClass.getPackage().getName().replace('.',
'/') + "/" + handlerChain;
- UnifiedVirtualFile vfHandlerChain = vfsRoot.findChild(handlerChain);
- if (vfHandlerChain == null)
- throw new IllegalStateException("Cannot find handler chain: "
+ handlerChain);
+ if (vfsRoot.getName().endsWith(".war"))
+ handlerChain = "WEB-INF/classes/" + handlerChain;
+
+ try
+ {
+ vfsRoot.findChild(handlerChain);
+ }
+ catch (IOException ioex)
+ {
+ throw new IllegalStateException("Cannot find handler chain: "
+ handlerChain, ioex);
+ }
}
usRef.setHandlerChain(handlerChain);
}