1 Reply Latest reply on Aug 4, 2011 11:30 PM by traycedoom

    Flex 4.5 - java.lang.IllegalArgumentException: argument type mismatch

    traycedoom

      I am having a problem when sending a soap request from a flex  4.5 application to a coldfusion 9 web service created using a CFC.

      The  most annoying thing it is only an intermittent problem but I can't work  out what is wrong.

       

      There a many methods within the web service of which Flex has no  issue, but these are mainly ones that read data.  The one I am having a  problem with is one that is writing back to the web service.

       

      The issue only arises when I have to restart the Coldfusion service  for some reason, which is quite often as the development machine is my  laptop.  It has now also happened when I have moved the Flex app to a  development server for testing and as it's hosted I can't restart the  services easily.

       

      I get the response below every time.  I have tried tracing the call  through the Flash Builder Network monitor and building a dummy call  using the same data, all to no avail.

      I have tried stripping out all of the code and then rebuilding it,  which takes a long time as I am using custom types in ColdFusion.

       

      Also , if I cfinvoke the method through a CFM page, it works fine. It  is only when trying to call it through a SOAP request through Flex 4.5.

      It will then suddenly start working again however and then it is fine  until I restart the CF services again.

       

      I can't tell what I triggers it  to start working again.

      Does something initialise it in ColdFusion and then it's fine ???.  I am  really struggling with this and any help would be appreciated.

       

      I have a  sample SOAP request that I trapped in the Network Monitor and also the  WSDL if needed.

       

       

       java.lang.IllegalArgumentException: argument type mismatch
          <ns1:stackTrace xmlns:ns1="http://xml.apache.org/axis/"
          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">java.lang.IllegalArgumentException: argument type mismatch
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.axis.utils.BeanPropertyDescriptor.set(BeanPropertyDescriptor.java:142)
      at org.apache.axis.encoding.ser.BeanPropertyTarget.set(BeanPropertyTarget.java:75)
      at org.apache.axis.encoding.DeserializerImpl.valueComplete(DeserializerImpl.java:249)
      at org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:509)
      at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
      at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:171)
      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:356)
      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.LicenseFilter.invoke(LicenseFilter.java:27)
      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/" xmlns:soapenv
      ="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org2001/XMLSchema-instance">Darren-LT</ns2:hostname>