Search code examples
coldfusioncoldfusion-9

Getting 500 internal server error when web service call is made


I have created a web service in ColdFusion 9 running on Windows 2008 Server. Other application from outside the network is trying to access it via SOAP request which results in failure. I have logging enabled in my web service code which works fine when I'm testing on my end.

Is there a way to log network traffic to reproduce\capture this error on your system. Fiddler & Wireshark would capture traffic to the browser, but we need to capture server to server communications.

EDIT1: Adding log from client side which they get when they call web service.

<!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 response:

<?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 -&gt; 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 -&gt; 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>

Solution

  • Changing all the arguments to string instead of string, numeric and date did the trick (don't know why). As of now I am accepting everything as string and then doing conversion at my end.