第一次整合,配置应该都好了,因为测试了一个简单的值注入的helloworld 的webservice,现在在试图注入dao的时候总抛出异常。。。用的cxf2.1.3+spring 2.5.5+hibernate 3.2
[code="java"]
[/code]
[code="java"] 1. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'UserService': Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException [/code]
google了n小时。。。也没解决。。。不知道哪位朋友有过类似经验的。。。
[b]问题补充:[/b]
第一次整合,配置应该都好了,因为测试了一个简单的值注入的helloworld 的webservice,现在在试图注入dao的时候总抛出异常。。。用的cxf2.1.3+spring 2.5.5+hibernate 3.2
# <bean id="UserServiceImpl" class="com.ramon.hiking.webservice.UserService"> # <property name="um"> # <ref bean="UserManager"/> # </property> # </bean> # <jaxws:endpoint id="UserService" address="/UserService"> # <jaxws:implementor> # <ref bean="UserServiceImpl"/> # </jaxws:implementor> # </jaxws:endpoint>
1. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'UserService': Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException
google了n小时。。。也没解决。。。不知道哪位朋友有过类似经验的。。。
楼下的同学,现在是异常啊。。。感觉不是配置问题呢
[b]问题补充:[/b]
楼下的同学,现在是异常啊。。。感觉不是配置问题呢
[quote]
楼下的同学,现在是异常啊。。。感觉不是配置问题呢
[/quote]
spring配置文件中添加这个了吗?
[code="java"]
[/code]
另外,接口需要这样:
[code="java"]
@WebService
public interface VoteService {
[/code]
实现类需要这样:
[code="java"]
@WebService
public class VoteServiceImpl implements VoteService {
[/code]
实在不行可以站内短信PM我,我把我前几天搞的示例工程给你一个
springside.org.cn中有例子,你可以参考一下。
你应该这样:
[code="java"]
<!-- JAX-WS 2.0 client/server编程模型 -->
<bean id="voteService" class="com.newhero.service.vote.VoteServiceImpl"/>
<jaxws:server id="voteWebService" serviceClass="com.newhero.service.vote.VoteService"
address="/VoteService">
<jaxws:serviceBean>
<ref bean="voteService"/>
</jaxws:serviceBean>
</jaxws:server>
[/code]
直接把一个POJO方法发布为webservice,不使用任何类似@Webservice的JAX-WS2.0中的Annotation可以这样:
[code="java"]
simple:serviceBean
/simple:serviceBean
/simple:server
serviceClass="com.jones.simple.HelloWorld"
address="http://localhost:8080/cxf/services/SimpleHelloWorld">
/simple:client
[/code]