title: Soap Client using Suds
body: <blockquote>
    <p><a href="https://stackoverflow.com/questions/5752923/soap-call-in-python/5760667">Soap call in Python</a></p>
  </blockquote>
  
  <p>Hi above is  my previous question regarding soap. In there i am passing a 1D array. Now my problem is i need to pass the 2D array to the following Soap schema.</p>
  
  <blockquote>
    <p>Request Schema</p>
  </blockquote>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
    &lt;soap:Body&gt;
      &lt;CalculateWeb2DObjectArray xmlns="http://tempuri.org/"&gt;
        &lt;HCID&gt;string&lt;/HCID&gt;
        &lt;jaggedobjDataMICRO&gt;
          &lt;ArrayOfAnyType&gt;
            &lt;anyType /&gt;
            &lt;anyType /&gt;
          &lt;/ArrayOfAnyType&gt;
          &lt;ArrayOfAnyType&gt;
            &lt;anyType /&gt;
            &lt;anyType /&gt;
          &lt;/ArrayOfAnyType&gt;
        &lt;/jaggedobjDataMICRO&gt;
        &lt;numeratorID&gt;int&lt;/numeratorID&gt;
      &lt;/CalculateWeb2DObjectArray&gt;
    &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  </code></pre>
  
  <blockquote>
    <p>Response Schema</p>
  </blockquote>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"&gt;
        &lt;soap:Body&gt;
          &lt;CalculateWeb2DObjectArrayResponse xmlns="http://tempuri.org/"&gt;
            &lt;CalculateWeb2DObjectArrayResult&gt;
              &lt;ArrayOfAnyType&gt;
                &lt;anyType /&gt;
                &lt;anyType /&gt;
              &lt;/ArrayOfAnyType&gt;
              &lt;ArrayOfAnyType&gt;
                &lt;anyType /&gt;
                &lt;anyType /&gt;
              &lt;/ArrayOfAnyType&gt;
            &lt;/CalculateWeb2DObjectArrayResult&gt;
          &lt;/CalculateWeb2DObjectArrayResponse&gt;
        &lt;/soap:Body&gt;
      &lt;/soap:Envelope&gt;
  </code></pre>
  
  <blockquote>
    <p>My Code </p>
  </blockquote>
  
  <pre><code>from suds.xsd.doctor import Import, ImportDoctor
  from suds.client import Client
  
  # enable logging to see transmitted XML
  import logging
  logging.basicConfig(level=logging.INFO)
  logging.getLogger('suds.client').setLevel(logging.DEBUG)
  
  # fix broken wsdl
  # add &lt;s:import namespace="http://www.w3.org/2001/XMLSchema"/&gt; to the wsdl
  imp = Import('http://www.w3.org/2001/XMLSchema',
               location='http://www.w3.org/2001/XMLSchema.xsd')
  imp.filter.add('http://tempuri.org/')
  wsdl_url = 'http://204.9.76.243/nuCast.DataFeedService/Service1.asmx?WSDL'
  client = Client(wsdl_url, doctor=ImportDoctor(imp))
  
  # make request
  arrayofstring1 = client.factory.create('ArrayOfString')
  arrayofstring1.string = [1,2]
  arrayofstring2 = client.factory.create('ArrayOfString')
  arrayofstring2.string = [5,6]
  arrayofstring = client.factory.create('ArrayOfString')
  arrayofstring.string = [arrayofstring1,arrayofstring2]
  
  
  print client.service.CalculateWeb2DObjectArray(1073757, arrayofstring, 99)
  </code></pre>
  
  <p>But i got empty value in output.Plz help to solve this. </p>
  
  <p>Thanks </p>