1919import org .springframework .beans .factory .support .BeanDefinitionBuilder ;
2020import org .springframework .beans .factory .xml .AbstractSimpleBeanDefinitionParser ;
2121import org .springframework .beans .factory .xml .ParserContext ;
22- import org .springframework .core .JdkVersion ;
2322import org .springframework .util .ClassUtils ;
2423import org .springframework .util .StringUtils ;
24+
2525import org .w3c .dom .Element ;
2626
2727/**
@@ -35,7 +35,9 @@ class MarshallingEndpointsBeanDefinitionParser extends AbstractSimpleBeanDefinit
3535 private static final String GENERIC_MARSHALLING_METHOD_ENDPOINT_ADAPTER_CLASS_NAME =
3636 "org.springframework.ws.server.endpoint.adapter.GenericMarshallingMethodEndpointAdapter" ;
3737
38- private static final boolean genericAdapterPresent = ClassUtils .isPresent (GENERIC_MARSHALLING_METHOD_ENDPOINT_ADAPTER_CLASS_NAME );
38+ private static final boolean genericAdapterPresent =
39+ ClassUtils .isPresent (GENERIC_MARSHALLING_METHOD_ENDPOINT_ADAPTER_CLASS_NAME ,
40+ MarshallingEndpointsBeanDefinitionParser .class .getClassLoader ());
3941
4042 private static final String MARSHALLING_METHOD_ENDPOINT_ADAPTER_CLASS_NAME =
4143 "org.springframework.ws.server.endpoint.adapter.MarshallingMethodEndpointAdapter" ;
@@ -47,7 +49,7 @@ protected boolean shouldGenerateIdAsFallback() {
4749
4850 @ Override
4951 protected String getBeanClassName (Element element ) {
50- if (JdkVersion . isAtLeastJava15 () && genericAdapterPresent ) {
52+ if (genericAdapterPresent ) {
5153 return GENERIC_MARSHALLING_METHOD_ENDPOINT_ADAPTER_CLASS_NAME ;
5254 }
5355 return MARSHALLING_METHOD_ENDPOINT_ADAPTER_CLASS_NAME ;
0 commit comments