ha! yeah, my slides are done...under the gun to get my sample code up though
So, yeah, #1 was a typo on my part, but all good there. #2 would relate to Remoting, I'm using WebService though, as in WSDL. Yuck, I know, but its demo. Trying to get typed AS objects in Flex land from CF via WebService using SchemaTypeRegistry in AS land. About to put a new line in that slide: Geting typed objects is more work then I care to do, so don't you try it at home. :) According to docs and a few blog posts remote com.cubicleman.cfo.model.StateDTO[] function getAllStates() is supposed to work with WSDL Douglas Knudsen http://www.cubicleman.com this is my signature, like it? On Thu, May 5, 2011 at 9:19 AM, Cameron Childress <camer...@gmail.com>wrote: > Good to see I'm not the only one still working on a CFO presentation. > > Two thoughts come to mind. > > 1) Is the case getAllSTates (capitol T) corrrect? > > 2) Have you flipped on the serialize-array-to-arraycollection XML flag > in services-config? (http://www.rakshith.net/blog/?p=109) I seriously > doubt this setting would impact this, but it's worth a shot > considering this is a pretty recent addition in CF. > > -Cameron > > On Wed, May 4, 2011 at 11:05 PM, Douglas Knudsen > <douglasknud...@gmail.com> wrote: > > long time lurker, first time poster here :) > > so, I created a nifty method right below here and having issue with the > > return type. Based on docs and reading, I can return a array of objects > > like that, but its bombing out. If I change to returning a "array" > things > > are happy, but the WSDL is different loosing some type info. Not sure > > what's the deal. This is CF 9.01. > > Any pointers or ideas? > > > > remote com.cubicleman.cfo.model.StateDTO[] function getAllStates() > > > > { > > > > //this guy does the DB work and > returns com.cubicleman.cfo.model.StateDTO[] > > > > return stateService.getAll(); > > > > } > > > > Now, if I hit this method in a web browser > > using > > http://localhost:8080/cfobjective/CFOFacade.cfc?wsdl&method=getAllSTates > > It works a treat, dumping out the states, all 50! > > Now, when I use CFINVOKE in a CFM page to hit the same method I get this > > error > > > > AxisFault > > faultCode: { > http://schemas.xmlsoap.org/soap/envelope/}Server.userException > > faultSubcode: > > faultString: coldfusion.xml.rpc.CFCInvocationException: > > [java.lang.ClassCastException : java.util.ArrayList] > > faultActor: > > faultNode: > > faultDetail: > > { > http://xml.apache.org/axis/}stackTrace:coldfusion.xml.rpc.CFCInvocationException > : > > [java.lang.ClassCastException : java.util.ArrayList] > > at > > > coldfusion.xml.rpc.CFComponentSkeleton.__createCFCInvocationException(CFComponentSkeleton.java:733) > > at > > > coldfusion.xml.rpc.CFComponentSkeleton.__cast(CFComponentSkeleton.java:409) > > at > > > cfobjective.CFOFacade.getAllStates(/Servers/apache-tomcat-6.0.26_CF9_64bit_cfo/webapps/ROOT/cfobjective/CFOFacade.cfc) > > 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.providers.java.... '' > > > > If I try and use Flex to invoke, I get this nasty bugger > > > > > > <soapenv:Fault 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"> > > > > <faultcode> > > > > soapenv:Server.userException > > > > </faultcode> > > > > <faultstring> > > > > coldfusion.xml.rpc.CFCInvocationException: > [java.lang.ClassCastException > > : java.util.ArrayList] > > > > </faultstring> > > > > <detail> > > > > <ns1:stackTrace xmlns:ns1="http://xml.apache.org/axis/"> > > > > coldfusion.xml.rpc.CFCInvocationException: > > [java.lang.ClassCastException : java.util.ArrayList] > > > > at > > > coldfusion.xml.rpc.CFComponentSkeleton.__createCFCInvocationException(CFComponentSkeleton.java:733) > > > > at > > > coldfusion.xml.rpc.CFComponentSkeleton.__cast(CFComponentSkeleton.java:409) > > > > at > > > cfobjective.CFOFacade.getAllStates(/Servers/apache-tomcat-6.0.26_CF9_64bit_cfo/webapps/ROOT/cfobjective/CFOFacade.cfc) > > > > 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.providers.java.RPCProvider.invokeMethod(RPCProvider.java:388) > > > > at > > > org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:283) > > > > 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:374) > > > > at > > > coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) > > > > at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) > > > > at coldfusion.filter.PathFilter.invoke(PathFilter.java:94) > > > > 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:637) > > > > at > > > org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327) > > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > > > > at > coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) > > > > at > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) > > > > at > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) > > > > at > > > coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) > > > > at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) > > > > at > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) > > > > at > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) > > > > at > > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) > > > > at > > > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) > > > > at > > > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) > > > > at > > > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) > > > > at > > > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) > > > > at > > > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) > > > > at > > > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) > > > > at > > > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) > > > > at > org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) > > > > at java.lang.Thread.run(Thread.java:680) > > > > </ns1:stackTrace> > > > > <ns2:hostname xmlns:ns2="http://xml.apache.org/axis/"> > > > > dkmacbookpro > > > > </ns2:hostname> > > > > </detail> > > > > </soapenv:Fault> > > > > Douglas Knudsen > > http://www.cubicleman.com > > this is my signature, like it? > > > > > > -- > Cameron Childress > Sumo Consulting Inc > http://www.sumoc.com > --- > cell: 678.637.5072 > aim: cameroncf > email: camer...@gmail.com > > > ------------------------------------------------------------- > To unsubscribe from this list, manage your profile @ > http://www.acfug.org?falogin.edituserform > > For more info, see http://www.acfug.org/mailinglists > Archive @ http://www.mail-archive.com/discussion%40acfug.org/ > List hosted by http://www.fusionlink.com > ------------------------------------------------------------- > > > >