This commit is contained in:
Arjen Poutsma
2008-02-20 01:02:18 +00:00
parent e4ed8ec520
commit 6ad7dd878d
5 changed files with 17 additions and 14 deletions

View File

@@ -35,6 +35,8 @@ class MarshallingEndpointsBeanDefinitionParser extends AbstractSimpleBeanDefinit
private static final String GENERIC_MARSHALLING_METHOD_ENDPOINT_ADAPTER_CLASS_NAME =
"org.springframework.ws.server.endpoint.adapter.GenericMarshallingMethodEndpointAdapter";
private static final boolean genericAdapterPresent = ClassUtils.isPresent(GENERIC_MARSHALLING_METHOD_ENDPOINT_ADAPTER_CLASS_NAME);
private static final String MARSHALLING_METHOD_ENDPOINT_ADAPTER_CLASS_NAME =
"org.springframework.ws.server.endpoint.adapter.MarshallingMethodEndpointAdapter";
@@ -43,14 +45,8 @@ class MarshallingEndpointsBeanDefinitionParser extends AbstractSimpleBeanDefinit
}
protected String getBeanClassName(Element element) {
if (JdkVersion.isAtLeastJava15()) {
try {
ClassUtils.forName(GENERIC_MARSHALLING_METHOD_ENDPOINT_ADAPTER_CLASS_NAME);
if (JdkVersion.isAtLeastJava15() && genericAdapterPresent) {
return GENERIC_MARSHALLING_METHOD_ENDPOINT_ADAPTER_CLASS_NAME;
}
catch (ClassNotFoundException e) {
// ignore, fall through;
}
}
return MARSHALLING_METHOD_ENDPOINT_ADAPTER_CLASS_NAME;
}

View File

@@ -16,7 +16,9 @@ import org.w3c.dom.Element;
*/
class Jaxb1MarshallerBeanDefinitionParser extends AbstractSimpleBeanDefinitionParser {
protected Class getBeanClass(Element element) {
return Jaxb1Marshaller.class;
public static final String JAXB1_MARSHALLER_CLASS_NAME = "org.springframework.oxm.jaxb.Jaxb1Marshaller";
protected String getBeanClassName(Element element) {
return JAXB1_MARSHALLER_CLASS_NAME;
}
}

View File

@@ -35,7 +35,7 @@ import org.w3c.dom.Element;
*/
class Jaxb2MarshallerBeanDefinitionParser extends AbstractSingleBeanDefinitionParser {
public static final String JAXB2_MARSHALLER_CLASS_NAME = "org.springframework.oxm.jaxb.Jaxb2Marshaller";
private static final String JAXB2_MARSHALLER_CLASS_NAME = "org.springframework.oxm.jaxb.Jaxb2Marshaller";
protected String getBeanClassName(Element element) {
return JAXB2_MARSHALLER_CLASS_NAME;

View File

@@ -16,7 +16,10 @@ import org.w3c.dom.Element;
*/
class JibxMarshallerBeanDefinitionParser extends AbstractSimpleBeanDefinitionParser {
protected Class getBeanClass(Element element) {
return JibxMarshaller.class;
private static final String JIBX_MARSHALLER_CLASS_NAME = "org.springframework.oxm.jibx.JibxMarshaller";
protected String getParentName(Element element) {
return JIBX_MARSHALLER_CLASS_NAME;
}
}

View File

@@ -19,8 +19,10 @@ import org.w3c.dom.Element;
*/
class XmlBeansMarshallerBeanDefinitionParser extends AbstractSingleBeanDefinitionParser {
protected Class getBeanClass(Element element) {
return XmlBeansMarshaller.class;
public static final String XML_BEANS_MARSHALLER_CLASS_NAME = "org.springframework.oxm.xmlbeans.XmlBeansMarshaller";
protected String getBeanClassName(Element element) {
return XML_BEANS_MARSHALLER_CLASS_NAME;
}
protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder beanDefinitionBuilder) {