Re: Problem in a Simple webservice: 1D array works 2D fails
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
Re: Problem in a Simple webservice: 1D array works 2D fails
Was there a solution found for this problem? ~| Download the latest ColdFusion 8 utilities including Report Builder, plug-ins for Eclipse and Dreamweaver updates. http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291868 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Problem in a Simple webservice: 1D array works 2D fails
You may want to look at using custom types. http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?href=1549.htm I was working on something similar and in research it seemed as if custom types would fix it for me. That portion of the app hasn't been created yet so I can't say yay or nay. On 10/28/05, Will Tomlinson [EMAIL PROTECTED] wrote: Thanks to everyone else for suggesting other data structures that work. I did some testing and there is no problem with Structs of Structs and other combinations, but the designer wants as simple and portable a solution as possible, so it's back to see what I can do to make the 2D Array work. I don't know how it can get any simpler than a struct of structs. Will ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222648 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Problem in a Simple webservice: 1D array works 2D fails
Hi, Thanks to everyone for their help. Robert, I tried the settings suggested in the Axis Docs, but still No luck with the 2D Arrays. You were able to duplicated the problem on CFMX 6.1, Did you make the changes to server-config.wsdd and get 2DArrays to work? Thanks to everyone else for suggesting other data structures that work. I did some testing and there is no problem with Structs of Structs and other combinations, but the designer wants as simple and portable a solution as possible, so it's back to see what I can do to make the 2D Array work. Has anyone successfully build a webservice in Coldfusion that sends back a 2DArray, if so how did you get it to work? Thanks again Mackenzie Cosens -Original Message- From: Robert Munn [mailto:[EMAIL PROTECTED] Sent: Thursday, October 27, 2005 3:42 PM To: CF-Talk Subject: Re: Problem in a Simple webservice: 1D array works 2D fails I was able to replicate this error on CFMX 6.1. According to the Apache Axis documentation, 2D array support needs to be enabled through the global Axis config. See this document: http://ws.apache.org/axis/java/reference.html Note that 2d array support is disabled by default. Here is the relevant info: Global Axis Configuration The server is configured (by default) by values in the server-config.wsdd file, though a dedicated Axis user can write their own configuration handler, and so store configuration data in an LDAP server, database, remote web service, etc. Consult the source on details as to how to do that. You can also add options to the web.xml file and have them picked up automatically. We don't encourage that as it is nice to keep configuration stuff in one place. In the server-config file, there is a global configuration section, which supports parameter name/value pairs as nested elements. Here are the options that we currently document, though there may be more (consult the source, as usual). globalConfiguration parameter name=adminPassword value=admin/ parameter name=attachments.Directory value=c:\temp\attachments/ parameter name=sendMultiRefs value=true/ parameter name=sendXsiTypes value=true/ parameter name=attachments.implementation value=org.apache.axis.attachments.AttachmentsImpl/ parameter name=sendXMLDeclaration value=true/ parameter name=enable2DArrayEncoding value=true/ parameter name=dotNetSoapEncFix value=false/ /globalConfiguration ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222624 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Problem in a Simple webservice: 1D array works 2D fails
Thanks to everyone else for suggesting other data structures that work. I did some testing and there is no problem with Structs of Structs and other combinations, but the designer wants as simple and portable a solution as possible, so it's back to see what I can do to make the 2D Array work. I don't know how it can get any simpler than a struct of structs. Will ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222638 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Problem in a Simple webservice: 1D array works 2D fails
I was able to replicate this error on CFMX 6.1. According to the Apache Axis documentation, 2D array support needs to be enabled through the global Axis config. See this document: http://ws.apache.org/axis/java/reference.html Note that 2d array support is disabled by default. Here is the relevant info: Global Axis Configuration The server is configured (by default) by values in the server-config.wsdd file, though a dedicated Axis user can write their own configuration handler, and so store configuration data in an LDAP server, database, remote web service, etc. Consult the source on details as to how to do that. You can also add options to the web.xml file and have them picked up automatically. We don't encourage that as it is nice to keep configuration stuff in one place. In the server-config file, there is a global configuration section, which supports parameter name/value pairs as nested elements. Here are the options that we currently document, though there may be more (consult the source, as usual). globalConfiguration parameter name=adminPassword value=admin/ parameter name=attachments.Directory value=c:\temp\attachments/ parameter name=sendMultiRefs value=true/ parameter name=sendXsiTypes value=true/ parameter name=attachments.implementation value=org.apache.axis.attachments.AttachmentsImpl/ parameter name=sendXMLDeclaration value=true/ parameter name=enable2DArrayEncoding value=true/ parameter name=dotNetSoapEncFix value=false/ /globalConfiguration 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 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 ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222498 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Problem in a Simple webservice: 1D array works 2D fails
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... Could you use a Structure instead of an array? Will ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222517 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Problem in a Simple webservice: 1D array works 2D fails
A query might work too (which is a 2d array with named columns, if you like to think of it that way). On 10/28/05, Will Tomlinson [EMAIL PROTECTED] wrote: 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... Could you use a Structure instead of an array? ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222519 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54