接口中的方法返回类型为List;list里面放着Customer对象,Customer对象的属性只有基本类型;
在服务端有配了aegis.xml文件,服务端运行时也没问题,wsdl文件也能访问到;
而在客户端调用接口,就出错:Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customerDao' defined in file [D:\J2EE lianxi\springxfireclt1\bin\resource\applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/jaxen/BaseXPath
Caused by: java.lang.NoClassDefFoundError: org/jaxen/BaseXPath而且客户端也有配了aegis.xml文件。请问这是什么原因?请高手赐教,小弟不甚感激。
!!!!!!!!!11111111111111
在服务端有配了aegis.xml文件,服务端运行时也没问题,wsdl文件也能访问到;
而在客户端调用接口,就出错:Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'customerDao' defined in file [D:\J2EE lianxi\springxfireclt1\bin\resource\applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/jaxen/BaseXPath
Caused by: java.lang.NoClassDefFoundError: org/jaxen/BaseXPath而且客户端也有配了aegis.xml文件。请问这是什么原因?请高手赐教,小弟不甚感激。
!!!!!!!!!11111111111111
然后你看你的报错信息,
Invocation of init method failed
引用init方法错误。Error creating bean with name 'customerDao' defined in file
错误被定义在Bean文件'customerDao' 中。然后你说服务端没有问题,客户端有问题。那么你客户端是怎么做的?客户端是否可以通过你的xml里面的mapping正确的访问?你的aegis.xml我也没看到,不过名字叫做aegis,是否有些原因?是否阻止客户端访问了一些方法?
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd"> <!-- 导入xfire相关bean的配置
<import
resource="classpath:org/codehaus/xfire/spring/xfire.xml"/>
-->
<!-- 获得Web Service接口实例 -->
<bean id="userInfoService" class="org.codehaus.xfire.spring.remoting.XFireClientFactoryBean">
<property name="wsdlDocumentUrl" value="http://localhost:8088/UserInfo/services/UserInfoService?wsdl"></property>
<property name="serviceClass" value="com.test.service.UserInfoService"></property>
<!--<property name="outHandlers">
<list>
<bean class="com.test.handler.AuthHandler"></bean>
</list>
</property>-->
</bean>
<!-- 注册业务对象 -->
<bean id="testService" class="com.test.service.TestServices">
<property name="us" ref="userInfoService"></property>
</bean> <bean id="customerDao" class="org.codehaus.xfire.spring.remoting.XFireClientFactoryBean">
<property name="wsdlDocumentUrl" value="http://localhost:8088/crm1_child1/services/getCustomerList?wsdl"></property>
<property name="serviceClass" value="com.test.service.ICustomerDao"></property>
</bean>
<bean id="customerTest" class="com.test.service.CustomerTest">
<property name="cd" ref="customerDao"></property>
</bean><!---->
package com.crm.idao;import java.util.List;import javax.jws.WebService;import com.crm.entity.Customer;@WebService
public interface ICustomerDao { public List getCustomers();
public String pring(int id);
}
没有上面这个类的jar包