webservise invoke Exception

发布于 2021-11-14 22:54:55 字数 5915 浏览 776 评论 3

@foxbrother 你好,想跟你请教个问题:

客户端调用cxf webservice出现异常

2012-9-13 10:53:43 org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
警告: Interceptor for {http://bean.service.worksheet.rfidnetwork.potevio.com/}/ReceiveWorkSheet#{http://service.worksheet.rfidnetwork.potevio.com/}processWorkSheet has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Unexpected wrapper element {http://bean.service.worksheet.rfidnetwork.potevio.com/}processWorkSheet found.   Expected {http://service.worksheet.rfidnetwork.potevio.com/}processWorkSheet.
 at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:106)
 at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
 at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:123)
 at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:207)
 at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:213)
 at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:193)
 at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:126)
 at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185)
 at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:108)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
 at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:164)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:212)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:818)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:624)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
 at java.lang.Thread.run(Thread.java:619)

客户端代码:

http://dpaste.com/hold/800388/

服务端代码:

接口:

@WebService
public interface ReceiveWorkSheetService {

 public void processWorkSheet(String xmlStr);


}

 

实现类:

http://dpaste.com/hold/800392/

cxf的配置文件spring-cxf.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
 xsi:schemaLocation="http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  http://cxf.apache.org/jaxws
  http://cxf.apache.org/schemas/jaxws.xsd">
 
 <!--导入与CXF框架有关的xml-->
 <import resource="classpath:META-INF/cxf/cxf.xml" />
 <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
 <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
 
 <!-- 发布WebService接口 -->
 <jaxws:endpoint id="SendWorkSheetServiceBean" implementor="com.potevio.rfidnetwork.worksheet.service.bean.SendWorkSheetServiceBean" address="/SendWorkSheetService" />
 
 <!-- 发布WebService接口 -->
 <jaxws:endpoint id="ReceiveWorkSheetServiceBean" implementor="com.potevio.rfidnetwork.worksheet.service.bean.ReceiveWorkSheetServiceBean" address="/ReceiveWorkSheet" />
</beans>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

感情旳空白 2021-11-19 16:59:35

不好意思 刚刚看到 没给出意见 惭愧 惭愧

累赘 2021-11-19 06:31:53

谢谢,url ?wsdl也应该去掉,问题已经解决

岁月打碎记忆 2021-11-19 04:38:50

org.apache.cxf.interceptor.Fault: Unexpected wrapper element {http://bean.service.worksheet.rfidnetwork.potevio.com/}processWorkSheet found.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文