0
我在運行Windows 2008 Server的ColdFusion 9中創建了一個Web服務。來自網絡外的其他應用程序試圖通過SOAP請求訪問它,導致失敗。我在我的Web服務代碼中啓用了日誌記錄功能,在我測試結束時正常工作。進行Web服務調用時發生500個內部服務器錯誤
有沒有辦法記錄網絡流量以在您的系統上重現\捕獲此錯誤。 Fiddler & Wireshark會捕獲流量到瀏覽器,但我們需要捕獲服務器到服務器的通信。
EDIT1:在客戶端調用Web服務時從客戶端添加日誌。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>500 - Internal server error.</title>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
<div class="content-container"><fieldset>
<h2>500 - Internal server error.</h2>
<h3>There is a problem with the resource you are looking for, and it cannot be displayed.</h3>
</fieldset></div>
</div>
</body>
</html>
SOAP響應:
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>org.xml.sax.SAXException: Bad types (class java.lang.String -> class java.util.Calendar)</faultstring>
<detail>
<ns1:stackTrace xmlns:ns1="http://xml.apache.org/axis/">
org.xml.sax.SAXException: Bad types (class java.lang.String -> class java.util.Calendar)
.at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:286)
.at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
.at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
.at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
.at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
.at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
.at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:148)
.at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
.at coldfusion.xml.rpc.CFCProvider.invoke(CFCProvider.java:54)
.at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
.at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
.at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
.at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
.at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
.at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
.at coldfusion.xml.rpc.CFCServlet.doAxisPost(CFCServlet.java:270)
.at coldfusion.filter.AxisFilter.invoke(AxisFilter.java:43)
.at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:363)
.at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
.at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
.at coldfusion.filter.PathFilter.invoke(PathFilter.java:87)
.at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
.at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
.at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
.at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
.at coldfusion.xml.rpc.CFCServlet.invoke(CFCServlet.java:138)
.at coldfusion.xml.rpc.CFCServlet.doPost(CFCServlet.java:289)
.at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
.at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
.at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
.at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
.at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
.at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
.at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
.at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
.at jrun.servlet.FilterChain.service(FilterChain.java:101)
.at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
.at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
.at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
.at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
.at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
.at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
.at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
.at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
.at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
</ns1:stackTrace>
<ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">SERVERNAME</ns2:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
「導致失敗」。除此之外,你還有什麼比我們更多的工作嗎?您的Web服務器可以記錄所有流量,並且CF服務器記錄所有錯誤。但是,如果這些請求甚至沒有達到那麼大的程度(你對此過於模糊),那麼你需要從客戶端角度來檢查。如果你自己無法複製(從系統外部),你將不得不請求另一端的ppl給你一些更多的信息。 – 2014-10-07 20:19:08
增加了客戶端服務器日誌。 – Aniruddha 2014-10-08 13:04:26
對,如果您已經與客戶進行了明確的溝通,您是否也問過他們提出的請求是什麼,以及他們傳遞了什麼參數,以及如何進行? – 2014-10-08 13:34:41