title: Nusoap, return array of data as XML in web service
body: <p>I have a PHP soap server (Using nuSoap), and a Java client (using Axis2). Which works pretty good, until it doesn't.</p>
  
  <p>The gist of what I'm trying to do is send a code to the service, and return a XML list of file names. </p>
  
  <pre><code>&lt;filename&gt;20120413.zip&lt;/filename&gt;
  </code></pre>
  
  <p>Here's the SSCE</p>
  
  <pre><code>&lt;?
  require_once('nusoap/lib/nusoap.php'); 
  $server = new soap_server();
  $server-&gt;configureWSDL('Download Database Backup', 'urn:downloadDatabase');
  
  $server-&gt;register('getBackupFileNames',                                  // method
          array('herdCode' =&gt; 'xsd:string'), // input parameters
          array('fileList' =&gt; 'xsd:string'),                           // output parameters
          'urn:uploadDatabase',                                               // namespace
          'urn:uploadDatabase#uploadDatabase',                                       // soapaction
          'rpc',                                                       // style
          'encoded',                                                   // use
          'uploadDatabase'                                          // documentation
      );
  
   function getBackupFileNames($herdCode)
      {
      $location = "/home/rhythms/backups/" . $herdCode;
      $fileList = scandir($location);
      return $fileList;
      }//end function
  
  $HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
  $server-&gt;service($HTTP_RAW_POST_DATA);
  ?&gt;
  </code></pre>
  
  <p>In a pinch, I know I could do a foreach and manually create the XML as a string. However it gets XMLEncoded then. Is there a better way? I would like to publish it by default in the WSDL. I've also tried the complexType but I had trouble handling that on the Axis2 side. </p>
  
  <p>Thank you!</p>