Skip to content

Commit df1b8ad

Browse files
committed
SWS-238 in 1.0 branch
1 parent 58fceaa commit df1b8ad

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

core/pom.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434
<groupId>org.springframework</groupId>
3535
<artifactId>spring-context</artifactId>
3636
</dependency>
37+
<dependency>
38+
<groupId>org.springframework</groupId>
39+
<artifactId>spring-aop</artifactId>
40+
</dependency>
3741
<dependency>
3842
<groupId>org.springframework</groupId>
3943
<artifactId>spring-web</artifactId>
@@ -163,4 +167,4 @@
163167
<scope>test</scope>
164168
</dependency>
165169
</dependencies>
166-
</project>
170+
</project>

core/src/main/java/org/springframework/ws/server/endpoint/mapping/AbstractMethodEndpointMapping.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import java.util.HashMap;
2121
import java.util.Map;
2222

23+
import org.springframework.aop.support.AopUtils;
2324
import org.springframework.beans.BeansException;
2425
import org.springframework.context.ApplicationContextException;
2526
import org.springframework.core.JdkVersion;
@@ -136,17 +137,13 @@ protected String getLookupKeyForMethod(Method method) {
136137
/**
137138
* Return the class or interface to use for method reflection.
138139
* <p/>
139-
* Default implementation returns the target class for a CGLIB proxy, and the class of the given bean else (for a
140-
* JDK proxy or a plain bean class).
140+
* Default implementation delegates to {@link AopUtils#getTargetClass(Object)}.
141141
*
142142
* @param endpoint the bean instance (might be an AOP proxy)
143143
* @return the bean class to expose
144144
*/
145145
protected Class getEndpointClass(Object endpoint) {
146-
Class clazz = endpoint.getClass();
147-
// The following is actually in Spring 2 ClassUtils.getUserClass, but since Spring-WS is Spring 1.2.9 upwards,
148-
// we can't use it
149-
return clazz != null && clazz.getName().indexOf("$$") != -1 ? clazz.getSuperclass() : clazz;
146+
return AopUtils.getTargetClass(endpoint);
150147
}
151148

152149
}

0 commit comments

Comments
 (0)