Anyone found a real solution to the 2d array problem?

>Hi we've been working on this and I get to post.
>
> 
>
>Mackenzie
>
> 
>
>Sigh. I'm having a problem returning an array from a webservice. It works
>when the array is only 1 dimension. When the array 
>
> 
>
>has 2 dimensions it does not work. I'm thinking that 2D arrays are
>supported...
>
> 
>
>CF version is 6,1,0,83762 on Windows 2000.
>
> 
>
>The error returned is:
>
> 
>
>Could not perform web service invocation "echoArray" because
>java.lang.NullPointerException
>
> 
>
>Stack Trace
>
>at cfremotetest2ecfm2052500108.runPage(D:\htdocs\remotetest.cfm:20) at 
>
> 
>
>cfremotetest2ecfm2052500108.runPage(D:\htdocs\remotetest.cfm:20) 
>
> 
>
>java.lang.NullPointerException
>
>      at
>coldfusion.xml.rpc.ServiceProxy.convertResult(ServiceProxy.java:342)
>
>      at
>coldfusion.xml.rpc.ServiceProxy.convertResult(ServiceProxy.java:339)
>
>      at coldfusion.xml.rpc.ServiceProxy.invokeImpl(ServiceProxy.java:212)
>
>      at coldfusion.xml.rpc.ServiceProxy.invoke(ServiceProxy.java:132)
>
>      at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:1587)
>
>      at coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:372)
>
>      at cfremotetest2ecfm2052500108.runPage(D:\htdocs\remotetest.cfm:20)
>
>      at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:147)
>
>      at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:357)
>
>      at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:62)
>
>      at
>coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:107)
>
>      at
>coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
>
>      at coldfusion.filter.PathFilter.invoke(PathFilter.java:80)
>
>      at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:47)
>
>      at
>coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:52)
>
>      at
>coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistence
>Filter.java:28)
>
>      at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:35)
>
>      at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:43)
>
>      at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
>
>      at coldfusion.CfmServlet.service(CfmServlet.java:105)
>
>      at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
>
>      at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
>
>      at
>jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:249)
>
>      at
>jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
>
>      at
>jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:192)
>
>      at
>jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:
>348)
>
>      at
>jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451
>)
>
>      at
>jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:29
>4)
>
>      at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
>
> 
>
> 
>
>The caller code in remotetest.cfm is:
>
> 
>
><cfinvoke
>
>      webservice ="#sServiceHost#/test.cfc?wsdl"
>
>      method ="echoArray"
>
>      returnVariable="foo">
>
></cfinvoke>
>
> 
>
>The component code is :
>
> 
>
><cfcomponent>
>
><cffunction name = "echoArray" returnType = "array" output = "no" access =
>"remote">
>
> 
>
><cfif 1>
>
>      <cfset aOut = arrayNew(2)>
>
> 
>
>      <cfset aOut[1][1] = "2d">
>
>      <cfset aOut[1][2] = "2">
>
>      <cfset aOut[1][3] = "b">
>
>      <cfset aOut[1][4] = "4">
>
> 
>
>      <cfset aOut[2][1] = "11">
>
>      <cfset aOut[2][2] = "22">
>
>      <cfset aOut[2][3] = "bb">
>
>      <cfset aOut[2][4] = "">
>
><cfelse>
>
>      <cfset aOut = arrayNew(1)>
>
> 
>
>      <cfset aOut[1] = "1">
>
>      <cfset aOut[2] = "2">
>
>      <cfset aOut[3] = "b">
>
>      <cfset aOut[4] = "">
>
> 
>
>      
>
></cfif>
>
> 
>
><cfreturn aOut>
>
> 
>
></cffunction>
>
> 
>
></cfcomponent>
>
> 
>
>Thanks 
>
> 
>
>Mackenzie Cosens 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Check out the new features and enhancements in the
latest product release - download the "What's New PDF" now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291828
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to