title: Node-soap consuming delphi soap webservice
body: <p>I'm using nodejs and node-soap as client to consume a webservice published on iis and developed in delphi. The  webservice is published with document/literal style.</p>
  
  <p>On Node I'm invoking and logging the response of the operations like this:</p>
  
  <pre><code>        client[functionName](args, function (err, result) {
              if (err) {
                  console.log(err);
              } else {
                  console.log(result);
              }
          });
  </code></pre>
  
  <p>Here is a portion of the xml result from delphi:</p>
  
  <pre><code>...
    &lt;GetValuesResponse xmlns="urn:WS_TEST"&gt;
    &lt;res xmlns="urn:UTest"&gt;
      &lt;matrixData&gt;
        &lt;TDoubleDynArray&gt;
          &lt;double&gt;4.32427893698308&lt;/double&gt;
          &lt;double&gt;4.40404718921869&lt;/double&gt;
          &lt;double&gt;4.50060875771443&lt;/double&gt;
          &lt;double&gt;4.56778202275494&lt;/double&gt;
          &lt;double&gt;4.61816197153533&lt;/double&gt;
          &lt;double&gt;4.73991351442126&lt;/double&gt;
          &lt;double&gt;4.78609513413661&lt;/double&gt;
          &lt;double&gt;4.8238800957219&lt;/double&gt;
          &lt;double&gt;4.8238800957219&lt;/double&gt;
          &lt;double&gt;4.81128510852681&lt;/double&gt;
          ...
  </code></pre>
  
  <p>And this is the json obtained from node-soap (response):</p>
  
  <pre><code>  ... 
  "matrixData": {
        "TDoubleDynArray": [
          {
            "double": [
              "4.32427893698308",
              "4.40404718921869",
              "4.50060875771443",
              "4.56778202275494",
              "4.61816197153533",
              "4.73991351442126",
              "4.78609513413661",
              "4.8238800957219",
              "4.8238800957219",
              "4.81128510852681",
              ...
  </code></pre>
  
  <p>I dont understand why node-soap includes the types of the data in the structure of the resulting json. Also, I don`t understand why arrays are parsed to json like an object with an array inside, instead of just an array.</p>
  
  <p>Is there any way to ask node-soap just to include the data and the arrays just like simple arrays?      </p>
  
  <p>Here is the wsdl portion with the defines involved:</p>
  
  <pre><code>&lt;element name="matrixData" type="ns6:TMatOfDouble"/&gt;
  
  &lt;complexType name="TMatOfDouble"&gt;
    &lt;complexContent&gt;
      &lt;restriction base="soapenc:Array"&gt;
        &lt;sequence/&gt;
        &lt;attribute ref="soapenc:arrayType" n1:arrayType="ns1:TDoubleDynArray[]"/&gt;  
      &lt;/restriction&gt;
    &lt;/complexContent&gt;
  &lt;/complexType&gt;
  
  &lt;complexType name="TDoubleDynArray"&gt;
    &lt;complexContent&gt;
      &lt;restriction base="soapenc:Array"&gt;
        &lt;sequence/&gt;
        &lt;attribute ref="soapenc:arrayType" n1:arrayType="xs:double[]"/&gt;
      &lt;/restriction&gt;
    &lt;/complexContent&gt;
  &lt;/complexType&gt;
  </code></pre>
  
  <p>Thanks in advance for any help</p>