This commit is contained in:
Arjen Poutsma
2007-11-21 00:54:26 +00:00
parent ff90f52382
commit fa25ac78a7
2 changed files with 8 additions and 7 deletions

View File

@@ -54,6 +54,10 @@
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
@@ -165,4 +169,4 @@
<scope>test</scope>
</dependency>
</dependencies>
</project>
</project>

View File

@@ -20,6 +20,7 @@ import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import org.springframework.aop.support.AopUtils;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContextException;
import org.springframework.core.JdkVersion;
@@ -136,17 +137,13 @@ public abstract class AbstractMethodEndpointMapping extends AbstractEndpointMapp
/**
* Return the class or interface to use for method reflection.
* <p/>
* Default implementation returns the target class for a CGLIB proxy, and the class of the given bean else (for a
* JDK proxy or a plain bean class).
* Default implementation delegates to {@link AopUtils#getTargetClass(Object)}.
*
* @param endpoint the bean instance (might be an AOP proxy)
* @return the bean class to expose
*/
protected Class getEndpointClass(Object endpoint) {
Class clazz = endpoint.getClass();
// The following is actually in Spring 2 ClassUtils.getUserClass, but since Spring-WS is Spring 1.2.9 upwards,
// we can't use it
return clazz != null && clazz.getName().indexOf("$$") != -1 ? clazz.getSuperclass() : clazz;
return AopUtils.getTargetClass(endpoint);
}
}