Hi,
This is my 1st forage into Spring-WS, so forgive any immediate oversights.
Basically, I've generated some stub code using XMLBeans 2.0.0 (using an Ant task ran via Eclipse 3.1.2) and I'm now trying to access a webservice, using xmlbeans [request] marshalling, within a Spring-based JUnit test (AbstractDependencyInjectionSpringContextTests subclass). However, when I try to run the test within Eclipse, I get a noclassdeffounderror for javax.xml.SoapException during Spring's attempt to wire-up the WebServiceTemplate.
The missing class appears to be part of the xbean.jar which is included in the project's Java build path (see image attached). The stack trace is:
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'webServiceTemplate' defined in file [C:\java\workspace\<my_project>\applicationContext-service.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate class [org.springframework.ws.client.core.WebServiceTempl ate]; constructor threw exception; nested exception is java.lang.NoClassDefFoundError: javax/xml/soap/SOAPException
org.springframework.beans.FatalBeanException: Could not instantiate class [org.springframework.ws.client.core.WebServiceTempl ate]; constructor threw exception; nested exception is java.lang.NoClassDefFoundError: javax/xml/soap/SOAPException
java.lang.NoClassDefFoundError: javax/xml/soap/SOAPException
.....
My Spring Fragment is:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="webServiceTemplate" class="org.springframework.ws.client.core.WebServi ceTemplate">
<property name="marshaller" ref="xmlBeansMarshaller"/>
<property name="defaultUri" value="http://some/service"/>
</bean>
<bean id="xmlBeansMarshaller" class="org.springframework.oxm.xmlbeans.XmlBeansMa rshaller" />
</beans>
Any ideas as to what might be going greatly appreciated (conflicts, missing dependencies)?
Thanks
Rich


Reply With Quote
