gpt4 book ai didi

java - Spring WS DefaultWsdl11定义错误

转载 作者:塔克拉玛干 更新时间:2023-11-03 04:04:28 24 4
gpt4 key购买 nike

我正在使用 Spring WS 并声明一个 DefaultWsdl11Definition bean 以动态生成 W​​SDL 文件。

但是,当我启动网络服务器 (tomcat) 时,由于以下原因出现 bean 实例化错误:

    Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: javax/wsdl/extensions/ExtensibilityElement
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:141)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:74)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:958)
... 45 more
Caused by: java.lang.NoClassDefFoundError: javax/wsdl/extensions/ExtensibilityElement
at org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition.<init>(DefaultWsdl11Definition.java:56)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
... 47 more
Caused by: java.lang.ClassNotFoundException: javax.wsdl.extensions.ExtensibilityElement
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1671)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516)
... 53 more

SpringWS-Servlet.xml 中的 Bean

<bean id="beanWS" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition">
<property name="schema">
<bean class="org.springframework.xml.xsd.SimpleXsdSchema">
<property name="xsd" value="/WEB-INF/somexsd.xsd"/>
</bean>
</property>
<property name="portTypeName" value="beanWS"/>
<property name="locationUri"
value="http://localhost:8080/springws"/>
</bean>

任何想法可能是什么问题..

PS:Spring版本为3.0.5,Spring WS版本为2.0.0-M3

谢谢

最佳答案

Spring-WS依赖WSDL4J库,您似乎缺少它。

关于java - Spring WS DefaultWsdl11定义错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4431760/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com