Web服务异常

时间:2015-07-14 14:14:10

标签: java xml character-encoding xml-serialization jax-ws

我们有一个总是正常运行的网络服务,但是当我们从第三方客户端获得请求时,我们得到了第500个错误(服务器端错误)。此请求抛出的异常是:

Jul 14, 2015 5:00:39 AM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
WARNING: Interceptor for {http://tempuri.org/soaprequest}SoaprequestImplService has thrown exception, unwinding now
org.apache.cxf.binding.soap.SoapFault: Problems creating SAAJ object model
    at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInterceptor.java:235)
    at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInterceptor.java:75)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
    at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
    at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:240)
    at org.apache.openejb.server.cxf.CxfWsContainer.onMessage(CxfWsContainer.java:86)
    at org.apache.openejb.server.webservices.WsServlet.service(WsServlet.java:98)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1157)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:627)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:809)
Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character (CTRL-CHAR, code 159); expected a semi-colon after the reference for entity 'Р'
 at javax.xml.stream.SerializableLocation@b4884c8b
    at com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:639)
    at com.ctc.wstx.sr.StreamScanner.parseEntityName(StreamScanner.java:2058)
    at com.ctc.wstx.sr.StreamScanner.resolveNonCharEntity(StreamScanner.java:1479)
    at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2786)
    at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1071)
    at org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:1311)
    at org.apache.cxf.staxutils.StaxUtils.readDocElements(StaxUtils.java:1194)
    at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInterceptor.java:223)
    ... 27 more

据我所知,Java XML API没有正确处理请求xml,因为它在某个地方出错了。 因此,要修复此错误,我想模仿来自我自己的客户端的这种格式错误的请求,但不知道如何中断请求数据以便我可以得到相同的错误。任何建议都将不胜感激。

0 个答案:

没有答案