调用不存在的SOAP服务时Payara报空指针,GlassFish/Tomcat正常
Payara调用不存在SOAP服务时抛出NullPointerException问题
我部署了一个包含SOAP端点的WAR包,同时实现了处理器来监控所有Web服务的客户端调用,目的是捕获针对不存在的Web服务的请求。但发现只有在Payara服务器上会出现异常:调用不存在的SOAP服务时返回NullPointerException;而在GlassFish或Tomcat等其他应用服务器上,处理器能正常记录错误信息。
Payara环境相关信息
请求内容:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.jaxws.demo.jcg/"> soapenv:Header/ soapenv:Body ser:getBooks 1 </ser:getBooks> </soapenv:Body> </soapenv:Envelope>
响应内容:
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope"> S:Server java.lang.NullPointerException </S:Fault> </S:Body> </S:Envelope>
错误日志(server.log):
[2023-01-15T16:49:30.029+0300] [Payara 5.2021.7] [SEVERE] [AS-WSSECURITY-00001] [javax.enterprise.webservices.security] [tid: _ThreadID=740 _ThreadName=http-thread-pool::http-listener-2(620)] [timeMillis: 1673790570029] [levelValue: 1000] [[ Request processing failed. java.lang.NullPointerException at java.util.ArrayDeque.addLast(ArrayDeque.java:249) at org.glassfish.api.invocation.InvocationManagerImpl.pushWebServiceMethod(InvocationManagerImpl.java:386) at org.glassfish.webservices.MonitoringPipe.pushWebServiceMethod(MonitoringPipe.java:211) at org.glassfish.webservices.MonitoringPipe.process(MonitoringPipe.java:132) at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:89) at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:1106) at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:1020) at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:989) at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:847) at com.sun.xml.ws.api.pipe.helper.AbstractTubeImpl.process(AbstractTubeImpl.java:106) at com.sun.enterprise.security.webservices.CommonServerSecurityPipe.processRequest(CommonServerSecurityPipe.java:195) at com.sun.enterprise.security.webservices.CommonServerSecurityPipe.process(CommonServerSecurityPipe.java:134) at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:89) at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:1106) at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:1020) at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:989) at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:847) at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:389) at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:838)
GlassFish环境相关信息
请求内容:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.jaxws.demo.jcg/"> soapenv:Header/ soapenv:Body ser:getBooks 1 </ser:getBooks> </soapenv:Body> </soapenv:Envelope>
响应内容:
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">SOAP-ENV:Header/<S:Body><S:Fault xmlns:ns3="http://www.w3.org/2003/05/soap-envelope">S:Client Cannot find dispatch method for {http://service.jaxws/}getfBook </S:Fault> </S:Body> </S:Envelope>
内容的提问来源于stack exchange,提问作者Mohamed Saber
相关产品推荐
相关产品推荐

