title: Nested complex-type elements never get populated when calling AXIS-based web service from .NET
body: <p>I've been trying for a couple of days now to get a .NET client working fully with a Web Server provided by my Coldfusion-based web app. I'm not a .NET developer, per se, but I happen to have a copy of VS 2003, which seems like it should do the trick.</p>
  
  <p>I can use a simple multiplier() method in my web service that takes two numbers and returns a number, so simple types are working fine. It's the complex types that are killing me. I'm basically trying to return an associative array from a method called get_struct(). I get an object of type Map back, but the property (called item), which is supposed to be an array with two elements (of type mapItem) always has an "undefined value".</p>
  
  <p>Here's the WSDL that is generated by ColdFusion:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;wsdl:definitions targetNamespace="http://trunk.v.pfapi.remote_api" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://trunk.v.pfapi.remote_api" xmlns:intf="http://trunk.v.pfapi.remote_api" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="http://rpc.xml.coldfusion" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  &lt;!--WSDL created by Macromedia ColdFusion MX version 7,0,2,142559--&gt;
   &lt;wsdl:types&gt;
    &lt;schema targetNamespace="http://rpc.xml.coldfusion" xmlns="http://www.w3.org/2001/XMLSchema"&gt;
     &lt;import namespace="http://trunk.v.pfapi.remote_api"/&gt;
     &lt;import namespace="http://xml.apache.org/xml-soap"/&gt;
     &lt;import namespace="http://schemas.xmlsoap.org/soap/encoding/"/&gt;
     &lt;complexType name="CFCInvocationException"&gt;
      &lt;sequence/&gt;
     &lt;/complexType&gt;
     &lt;complexType name="QueryBean"&gt;
      &lt;sequence&gt;
       &lt;element name="columnList" nillable="true" type="impl:ArrayOf_xsd_string"/&gt;
       &lt;element name="data" nillable="true" type="impl:ArrayOfArrayOf_xsd_anyType"/&gt;
      &lt;/sequence&gt;
     &lt;/complexType&gt;
    &lt;/schema&gt;
    &lt;schema targetNamespace="http://xml.apache.org/xml-soap" xmlns="http://www.w3.org/2001/XMLSchema"&gt;
     &lt;import namespace="http://trunk.v.pfapi.remote_api"/&gt;
     &lt;import namespace="http://rpc.xml.coldfusion"/&gt;
     &lt;import namespace="http://schemas.xmlsoap.org/soap/encoding/"/&gt;
     &lt;complexType name="mapItem"&gt;
      &lt;sequence&gt;
       &lt;element name="key" nillable="true" type="xsd:anyType"/&gt;
       &lt;element name="value" nillable="true" type="xsd:anyType"/&gt;
      &lt;/sequence&gt;
     &lt;/complexType&gt;
     &lt;complexType name="Map"&gt;
      &lt;sequence&gt;
       &lt;element maxOccurs="unbounded" minOccurs="0" name="item" type="apachesoap:mapItem"/&gt;
      &lt;/sequence&gt;
     &lt;/complexType&gt;
    &lt;/schema&gt;
    &lt;schema targetNamespace="http://trunk.v.pfapi.remote_api" xmlns="http://www.w3.org/2001/XMLSchema"&gt;
     &lt;import namespace="http://rpc.xml.coldfusion"/&gt;
     &lt;import namespace="http://xml.apache.org/xml-soap"/&gt;
     &lt;import namespace="http://schemas.xmlsoap.org/soap/encoding/"/&gt;
     &lt;complexType name="ArrayOf_xsd_string"&gt;
      &lt;complexContent&gt;
       &lt;restriction base="soapenc:Array"&gt;
        &lt;attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:string[]"/&gt;
       &lt;/restriction&gt;
      &lt;/complexContent&gt;
     &lt;/complexType&gt;
     &lt;complexType name="ArrayOfArrayOf_xsd_anyType"&gt;
      &lt;complexContent&gt;
       &lt;restriction base="soapenc:Array"&gt;
        &lt;attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:anyType[][]"/&gt;
       &lt;/restriction&gt;
      &lt;/complexContent&gt;
     &lt;/complexType&gt;
    &lt;/schema&gt;
   &lt;/wsdl:types&gt;
     &lt;wsdl:message name="CFCInvocationException"&gt;
        &lt;wsdl:part name="fault" type="tns1:CFCInvocationException"/&gt;
     &lt;/wsdl:message&gt;
     &lt;wsdl:message name="multiplierResponse"&gt;
        &lt;wsdl:part name="multiplierReturn" type="xsd:double"/&gt;
     &lt;/wsdl:message&gt;
     &lt;wsdl:message name="get_structResponse"&gt;
        &lt;wsdl:part name="get_structReturn" type="apachesoap:Map"/&gt;
     &lt;/wsdl:message&gt;
     &lt;wsdl:message name="struct_keycountResponse"&gt;
        &lt;wsdl:part name="struct_keycountReturn" type="xsd:double"/&gt;
     &lt;/wsdl:message&gt;
     &lt;wsdl:message name="get_structRequest"&gt;
     &lt;/wsdl:message&gt;
     &lt;wsdl:message name="multiplierRequest"&gt;
        &lt;wsdl:part name="factor1" type="xsd:double"/&gt;
        &lt;wsdl:part name="factor2" type="xsd:double"/&gt;   &lt;/wsdl:message&gt;
     &lt;wsdl:message name="struct_keycountRequest"&gt;
        &lt;wsdl:part name="theStruct" type="apachesoap:Map"/&gt;
     &lt;/wsdl:message&gt;
     &lt;wsdl:portType name="remote_io_test"&gt;
        &lt;wsdl:operation name="multiplier" parameterOrder="factor1 factor2"&gt;
           &lt;wsdl:input message="impl:multiplierRequest" name="multiplierRequest"/&gt;
           &lt;wsdl:output message="impl:multiplierResponse" name="multiplierResponse"/&gt;
           &lt;wsdl:fault message="impl:CFCInvocationException" name="CFCInvocationException"/&gt;
        &lt;/wsdl:operation&gt;
        &lt;wsdl:operation name="get_struct"&gt;
           &lt;wsdl:input message="impl:get_structRequest" name="get_structRequest"/&gt;
           &lt;wsdl:output message="impl:get_structResponse" name="get_structResponse"/&gt;
           &lt;wsdl:fault message="impl:CFCInvocationException" name="CFCInvocationException"/&gt;
        &lt;/wsdl:operation&gt;
        &lt;wsdl:operation name="struct_keycount" parameterOrder="theStruct"&gt;
           &lt;wsdl:input message="impl:struct_keycountRequest" name="struct_keycountRequest"/&gt;
           &lt;wsdl:output message="impl:struct_keycountResponse" name="struct_keycountResponse"/&gt;
           &lt;wsdl:fault message="impl:CFCInvocationException" name="CFCInvocationException"/&gt;
        &lt;/wsdl:operation&gt;
     &lt;/wsdl:portType&gt;
     &lt;wsdl:binding name="remote_io_test.cfcSoapBinding" type="impl:remote_io_test"&gt;
        &lt;wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/&gt;
        &lt;wsdl:operation name="multiplier"&gt;
           &lt;wsdlsoap:operation soapAction=""/&gt;
           &lt;wsdl:input name="multiplierRequest"&gt;
              &lt;wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://trunk.v.pfapi.remote_api" use="encoded"/&gt;
           &lt;/wsdl:input&gt;
           &lt;wsdl:output name="multiplierResponse"&gt;
              &lt;wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://trunk.v.pfapi.remote_api" use="encoded"/&gt;
           &lt;/wsdl:output&gt;
           &lt;wsdl:fault name="CFCInvocationException"&gt;
              &lt;wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="CFCInvocationException" namespace="http://trunk.v.pfapi.remote_api" use="encoded"/&gt;
           &lt;/wsdl:fault&gt;
        &lt;/wsdl:operation&gt;
        &lt;wsdl:operation name="get_struct"&gt;
           &lt;wsdlsoap:operation soapAction=""/&gt;
           &lt;wsdl:input name="get_structRequest"&gt;
              &lt;wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://trunk.v.pfapi.remote_api" use="encoded"/&gt;
           &lt;/wsdl:input&gt;
           &lt;wsdl:output name="get_structResponse"&gt;
              &lt;wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://trunk.v.pfapi.remote_api" use="encoded"/&gt;
           &lt;/wsdl:output&gt;
           &lt;wsdl:fault name="CFCInvocationException"&gt;
              &lt;wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="CFCInvocationException" namespace="http://trunk.v.pfapi.remote_api" use="encoded"/&gt;
           &lt;/wsdl:fault&gt;
        &lt;/wsdl:operation&gt;
        &lt;wsdl:operation name="struct_keycount"&gt;
           &lt;wsdlsoap:operation soapAction=""/&gt;
           &lt;wsdl:input name="struct_keycountRequest"&gt;
              &lt;wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://trunk.v.pfapi.remote_api" use="encoded"/&gt;
           &lt;/wsdl:input&gt;
           &lt;wsdl:output name="struct_keycountResponse"&gt;
              &lt;wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://trunk.v.pfapi.remote_api" use="encoded"/&gt;
           &lt;/wsdl:output&gt;
           &lt;wsdl:fault name="CFCInvocationException"&gt;
              &lt;wsdlsoap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" name="CFCInvocationException" namespace="http://trunk.v.pfapi.remote_api" use="encoded"/&gt;
           &lt;/wsdl:fault&gt;
        &lt;/wsdl:operation&gt;
     &lt;/wsdl:binding&gt;
     &lt;wsdl:service name="remote_io_testService"&gt;
    &lt;wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"&gt;
  This is a collection of test methods to allow remote developers
     to evaluate datatype support, etc in their programming environment.
     The WSDL endpoint for this web service is [YOUR PEERFOCUS SITE]/remote_api/pfapi/v/trunk/remote_io_test.cfc?wsdl  &lt;/wsdl:documentation&gt;
        &lt;wsdl:port binding="impl:remote_io_test.cfcSoapBinding" name="remote_io_test.cfc"&gt;
           &lt;wsdlsoap:address location="http://leon.cupahr.tafkan.localhost/remote_api/pfapi/v/trunk/remote_io_test.cfc"/&gt;
        &lt;/wsdl:port&gt;
     &lt;/wsdl:service&gt;
  &lt;/wsdl:definitions&gt;
  </code></pre>
  
  <p>and here's the web service stub generated when I add a web reference in VS:</p>
  
  <pre><code>//------------------------------------------------------------------------------
  // &lt;autogenerated&gt;
  //     This code was generated by a tool.
  //     Runtime Version: 1.1.4322.2443
  //
  //     Changes to this file may cause incorrect behavior and will be lost if 
  //     the code is regenerated.
  // &lt;/autogenerated&gt;
  //------------------------------------------------------------------------------
  
  // 
  // This source code was auto-generated by Microsoft.VSDesigner, Version 1.1.4322.2443.
  // 
  namespace pfapi_test.remote_io_test {
      using System.Diagnostics;
      using System.Xml.Serialization;
      using System;
      using System.Web.Services.Protocols;
      using System.ComponentModel;
      using System.Web.Services;
  
  
      /// &lt;remarks/&gt;
      [System.Diagnostics.DebuggerStepThroughAttribute()]
      [System.ComponentModel.DesignerCategoryAttribute("code")]
      [System.Web.Services.WebServiceBindingAttribute(Name="remote_io_test.cfcSoapBinding", Namespace="http://trunk.v.pfapi.remote_api")]
      [System.Xml.Serialization.SoapIncludeAttribute(typeof(QueryBean))]
      [System.Xml.Serialization.SoapIncludeAttribute(typeof(CFCInvocationException))]
      public class remote_io_testService : System.Web.Services.Protocols.SoapHttpClientProtocol {
  
          /// &lt;remarks/&gt;
          public remote_io_testService() {
              this.Url = "http://leon.cupahr.tafkan.nooch/remote_api/pfapi/v/trunk/remote_io_test.cfc";
          }
  
          /// &lt;remarks/&gt;
          [System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://trunk.v.pfapi.remote_api", ResponseNamespace="http://trunk.v.pfapi.remote_api")]
          [return: System.Xml.Serialization.SoapElementAttribute("multiplierReturn")]
          public System.Double multiplier(System.Double factor1, System.Double factor2) {
              object[] results = this.Invoke("multiplier", new object[] {
                          factor1,
                          factor2});
              return ((System.Double)(results[0]));
          }
  
          /// &lt;remarks/&gt;
          public System.IAsyncResult Beginmultiplier(System.Double factor1, System.Double factor2, System.AsyncCallback callback, object asyncState) {
              return this.BeginInvoke("multiplier", new object[] {
                          factor1,
                          factor2}, callback, asyncState);
          }
  
          /// &lt;remarks/&gt;
          public System.Double Endmultiplier(System.IAsyncResult asyncResult) {
              object[] results = this.EndInvoke(asyncResult);
              return ((System.Double)(results[0]));
          }
  
          /// &lt;remarks/&gt;
          [System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://trunk.v.pfapi.remote_api", ResponseNamespace="http://trunk.v.pfapi.remote_api")]
          [return: System.Xml.Serialization.SoapElementAttribute("get_structReturn")]
          public Map get_struct() {
              object[] results = this.Invoke("get_struct", new object[0]);
              return ((Map)(results[0]));
          }
  
          /// &lt;remarks/&gt;
          public System.IAsyncResult Beginget_struct(System.AsyncCallback callback, object asyncState) {
              return this.BeginInvoke("get_struct", new object[0], callback, asyncState);
          }
  
          /// &lt;remarks/&gt;
          public Map Endget_struct(System.IAsyncResult asyncResult) {
              object[] results = this.EndInvoke(asyncResult);
              return ((Map)(results[0]));
          }
  
          /// &lt;remarks/&gt;
          [System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace="http://trunk.v.pfapi.remote_api", ResponseNamespace="http://trunk.v.pfapi.remote_api")]
          [return: System.Xml.Serialization.SoapElementAttribute("struct_keycountReturn")]
          public System.Double struct_keycount(Map theStruct) {
              object[] results = this.Invoke("struct_keycount", new object[] {
                          theStruct});
              return ((System.Double)(results[0]));
          }
  
          /// &lt;remarks/&gt;
          public System.IAsyncResult Beginstruct_keycount(Map theStruct, System.AsyncCallback callback, object asyncState) {
              return this.BeginInvoke("struct_keycount", new object[] {
                          theStruct}, callback, asyncState);
          }
  
          /// &lt;remarks/&gt;
          public System.Double Endstruct_keycount(System.IAsyncResult asyncResult) {
              object[] results = this.EndInvoke(asyncResult);
              return ((System.Double)(results[0]));
          }
      }
  
      /// &lt;remarks/&gt;
      [System.Xml.Serialization.SoapTypeAttribute("Map", "http://xml.apache.org/xml-soap")]
      public class Map {
  
          /// &lt;remarks/&gt;
          public mapItem[] item;
      }
  
      /// &lt;remarks/&gt;
      [System.Xml.Serialization.SoapTypeAttribute("mapItem", "http://xml.apache.org/xml-soap")]
      public class mapItem {
  
          /// &lt;remarks/&gt;
          public object key;
  
          /// &lt;remarks/&gt;
          public object value;
      }
  
      /// &lt;remarks/&gt;
      [System.Xml.Serialization.SoapTypeAttribute("QueryBean", "http://rpc.xml.coldfusion")]
      public class QueryBean {
  
          /// &lt;remarks/&gt;
          public string[] columnList;
  
          /// &lt;remarks/&gt;
          public object[] data;
      }
  
      /// &lt;remarks/&gt;
      [System.Xml.Serialization.SoapTypeAttribute("CFCInvocationException", "http://rpc.xml.coldfusion")]
      public class CFCInvocationException {
      }
  }
  </code></pre>
  
  <p>And finally, my CLI app that tests the service:</p>
  
  <pre><code>using System;
  
  namespace pfapi_test
  {
   /// &lt;summary&gt;
   /// Summary description for Class1.
   /// &lt;/summary&gt;
   class Class1
   {
    /// &lt;summary&gt;
    /// The main entry point for the application.
    /// &lt;/summary&gt;
    [STAThread]
    static void Main(string[] args)
    {
     //
     // TODO: Add code to start application here
     //
  
     Console.WriteLine("Instantiating WS");
  
     remote_io_test.remote_io_testService testWS = new remote_io_test.remote_io_testService();
  
     Console.WriteLine("Calling multiplier(3,15)");
     Console.WriteLine(testWS.multiplier(3,15));
  
     Console.WriteLine("Calling get_struct()");
     remote_io_test.Map theStruct = testWS.get_struct();
     Console.Write("result: ");
     Console.WriteLine(theStruct);
     Console.Write("result.item: ");
     Console.WriteLine(theStruct.item);
  
     Console.WriteLine("Press Enter to exit...");
     Console.ReadLine();
    }
   }
  }
  </code></pre>
  
  <p>No matter what I try, theStruct.item is always "undefined value" according to the debugger. The printed output looks like:</p>
  
  <pre><code>Instantiating WS
  Calling multiplier(3,15)
  45
  Calling get_struct()
  result: pfapi_test.remote_io_test.Map
  result.item:
  Press Enter to exit...
  </code></pre>
  
  <p>I've tried using ColdFusion 8, and there's no difference. I've tried returning a real custom database with two properties instead of my ad-hoc associative array, and that works fine, but rewriting my API to avoid associative arrays isn't really an option at this time. The API works fine with ColdFusion, PHP/NuSOAP, and Ruby on Rails, so it seems like it should be possible to get it working with .NET as well.</p>
  
  <p>I hope someone can provide some insight. I have the suspicion that there's some kind of namespace issue here, but I don't know SOAP and XML well enough to figure out what it is. I've also searched like mad for a solution online, but I haven't found a single person who's solved this problem, which is very disheartening!</p>
  
  <p>Request:</p>
  
  <pre><code>POST /remote_api/pfapi/v/trunk/remote_io_test.cfc HTTP/1.1
  VsDebuggerCausalityData: [snip]
  User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 1.1.4322.2443)
  Content-Type: text/xml; charset=utf-8
  SOAPAction: ""
  Content-Length: 488
  Expect: 100-continue
  Host: leon.cupahr.tafkan.nooch
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://trunk.v.pfapi.remote_api" xmlns:types="http://trunk.v.pfapi.remote_api/encodedTypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"&gt;
      &lt;tns:get_struct /&gt;
    &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  </code></pre>
  
  <p>Response:</p>
  
  <pre><code>HTTP/1.1 200 OK
  Date: Thu, 17 Dec 2009 15:14:33 GMT
  Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7l DAV/2 PHP/5.2.8 JRun/4.0 Phusion_Passenger/2.2.7
  Set-Cookie: CFID=21543;expires=Sat, 10-Dec-2039 15:14:33 GMT;path=/
  Set-Cookie: CFTOKEN=479cc311ca4875db-9D346355-ED36-6183-C8895635E4EE1252;expires=Sat, 10-Dec-2039 15:14:33 GMT;path=/
  Transfer-Encoding: chunked
  Content-Type: text/xml; charset=utf-8
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;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"&gt;
   &lt;soapenv:Body&gt;
    &lt;ns1:get_structResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://trunk.v.pfapi.remote_api"&gt;
     &lt;get_structReturn xsi:type="ns2:Map" xmlns:ns2="http://xml.apache.org/xml-soap"&gt;
      &lt;item xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"&gt;
       &lt;key xsi:type="soapenc:string"&gt;FOO&lt;/key&gt;
       &lt;value xsi:type="soapenc:string"&gt;bar&lt;/value&gt;
      &lt;/item&gt;
      &lt;item&gt;
       &lt;key xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"&gt;ANOTHERKEY&lt;/key&gt;
       &lt;value xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"&gt;another value&lt;/value&gt;
      &lt;/item&gt;
     &lt;/get_structReturn&gt;
    &lt;/ns1:get_structResponse&gt;
   &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>Update: I heard from the .NET developer on the other end, and he's tried all of the following to no avail:</p>
  
  <ul>
  <li>using WCF instead of ASMX</li>
  <li>using .NET 3.5</li>
  <li>using VB.NET to communicate with the web service instead of C#</li>
  </ul>
  
  <p>He did send me a screenshot of the "Data Type" section of the Service Reference Settings dialog. Is it possible that changing the settings for Collection type and Dictionary collection type might resolve this issue?</p>
  
  <p>Update 2: here's the ColdFusion code for remote_io_test.cfc</p>
  
  <pre><code>&lt;cfcomponent name="remote_io_test"
      hint="This is a collection of test methods to allow remote developers
          to evaluate datatype support, etc in their programming environment."&gt;
  
  &lt;cffunction name="get_struct" returntype="struct" access="remote" output="no"
          hint="Returns an associative array with two keys, 'foo' and 'anotherKey'.
              Allows you to test your implementation's support for WDDX encoding.
              ColdFusion and PHP (w/ NuSOAP) will automatically decode the result
              into an associative array. Feedback on other languages is appreciated."&gt;
      &lt;cfset var stFoo = structNew()&gt;
      &lt;cfset stFoo.foo = "bar"&gt;
      &lt;cfset stFoo.anotherKey = "another value"&gt;
      &lt;cfreturn duplicate(stFoo)&gt;
  &lt;/cffunction&gt; &lt;!--- get_struct ---&gt;
  
  
  &lt;cffunction name="multiplier" returntype="numeric" access="remote" output="no"
          hint="Multiplies two factors and returns the result. Allows you to test
              passing simple variables to a remote method."&gt;
      &lt;cfargument name="factor1" type="numeric" required="yes"&gt;
      &lt;cfargument name="factor2" type="numeric" required="yes"&gt;
  
      &lt;cfreturn factor1 * factor2&gt;
  &lt;/cffunction&gt; &lt;!--- multiplier ---&gt;
  
  
  &lt;cffunction name="struct_keycount" returntype="numeric" access="remote" output="no"
          hint="Returns the number of keys in an upload associative array. Allows
              you to test passing complex variables to a remote method."&gt;
      &lt;cfargument name="theStruct" type="struct" required="yes"&gt;
  
      &lt;cfreturn structCount(theStruct)&gt;
  &lt;/cffunction&gt; &lt;!--- struct_keycount ---&gt;
  </code></pre>
  
  <p></p>
  
  <p>Thanks for reading, and thanks in advance for your replies!</p>
  
  <p>Cross-posted at <a href="http://social.msdn.microsoft.com/Forums/en-US/asmxandxml/thread/30a1686c-cf18-4a7d-a5a8-d8f39ce4575b" rel="nofollow noreferrer">link text</a></p>