Spring ws: No adapter for endpoint

你说的曾经没有我的故事 提交于 2019-12-05 05:12:46
M. Deinum

The tutorial hasn't been updated for a while. The tutorial still references JDOM1 whereas newer versions of Spring Web Services only support JDOM2.

<dependency>
    <groupId>jdom</groupId>
    <artifactId>jdom</artifactId>
    <version>1.0</version>
</dependency>

Change to

<dependency>
    <groupId>org.jdom</groupId>
    <artifactId>jdom</artifactId>
    <version>2.0.2</version>
</dependency>

And change the org.jdom imports to org.jdom2.

The latest spring-ws (presently 2.1.4) uses DomPayloadMethodProcessor to do support check to the Element parameter. In the holiday example you have to change the org.jdom.Element to the org.w3c.dom.Element.

Also happened to me but in this case was because the annotations @ResponsePayload and @RequestPayload were not present. A possible not so odd mistake.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!