webservise invoke Exception
@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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不好意思 刚刚看到 没给出意见 惭愧 惭愧
谢谢,url ?wsdl也应该去掉,问题已经解决
org.apache.cxf.interceptor.Fault: Unexpected wrapper element {http://bean.service.worksheet.rfidnetwork.potevio.com/}processWorkSheet found.