title: Works in .NET, don't work in PHP? SOAP
body: <p>EDIT:
  I managed to get through this by asking the server developer to split the string into an array on his side. It works now.</p>
  
  <p>Anyway, i never managed to know how to correctly pass an array to a .NET soap server.</p>
  
  <hr>
  
  <p>i have a SOAP client in PHP that is not working. The server developer handled me a working .NET example. I paste here both. Am i missing something?</p>
  
  <p>Regards</p>
  
  <blockquote>
    <p>PHP CODE</p>
  </blockquote>
  
  <pre><code>$res = new cResult;
  
  //$oRequest = new InsertVenta; (throws the same error wether this is specified or not)
  
  $pcAccesorios = new cACC_VENTA;
  
  $oUSER = new cUSER;
  $oUSER-&gt;LOGIN = "hidden"; 
  $oUSER-&gt;PASS  = "hidden";
  //$oUSER-&gt;ERROR = 0;
  
  $oAVISO = new cVENTA;
  $oAVISO-&gt;NOMBRE = str_pad($nombre, 150); 
  $oAVISO-&gt;DIRECCION = str_pad($direccion, 250);       
  $oAVISO-&gt;CP = str_pad($codpostal, 5);              
  $oAVISO-&gt;POBLACION = str_pad($poblacion, 150);       
  $oAVISO-&gt;PROVINCIA = str_pad($provincia, 75);      
  $oAVISO-&gt;PERS_CONTACTO = str_pad($pers_contacto, 150);   
  $oAVISO-&gt;TFNS_CONTACTO = str_pad($telefono, 50);   
  $oAVISO-&gt;EMAIL = str_pad($email, 75); 
  $oAVISO-&gt;NIF = str_pad($nifcif, 10);
  $oAVISO-&gt;ERROR = 0;
  //$oAVISO-&gt;HasError = 0;
  //$oAVISO-&gt;$ID_ORDEN = 0;
  
  
  $oRequest-&gt;oUSER = $oUSER;       
  $oRequest-&gt;oAVISO = $oAVISO;
  
  $maxindex = count($listacompra);
  for ( $i = 0 ; $i &lt; $maxindex; $i++) {
      $array_de_2 = explode(" ", $listacompra[$i]);
  
      $pcAccesorios-&gt;REFERENCIA = $array_de_2[1];
      $pcAccesorios-&gt;UNIDADES = $array_de_2[0];
  
      $oRequest-&gt;oACC[$i] = $pcAccesorios;
  }
  
  //$oRequest-&gt;oACC = $oACC; 
  //var_dump($oRequest);
  
  try {
      $client = new SoapClient($wdsladdress, array("trace" =&gt; 1,"exceptions"=&gt;0));
      //print $client-&gt;__getTypes();
      //var_dump($client-&gt;__getFunctions());
      //print "conectado      ";
  } catch (Exception $e) {
   echo '', $e-&gt;getMessage(), "\n";
   die();
  }
  
  try {             
      //$res=$client-&gt;INSERT_VENTA($oUSER, $oAVISO, $oACC);
  
      $res=$client-&gt;INSERT_VENTA($oRequest);
      //$client-&gt;__getLastRequest();
      //$res-&gt;INSERT_VENTAResult;
      $ID_ORDEN=(string)$res-&gt;INSERT_VENTAResult-&gt;ID_ORDEN;
      var_dump($ID_ORDEN);
      print var_dump($res);                            
  } catch (Exception $e) {
  echo '',  $e-&gt;getMessage(), "\n";
  die();
  }
  </code></pre>
  
  <blockquote>
    <p>.NET CODE</p>
  </blockquote>
  
  <pre><code>Dim oAVISO As New WS_TSG.cVENTA
  oAVISO.CP = "24400"
  oAVISO.DIRECCION = "Mi direccion "
  oAVISO.EMAIL = "email@servidor.com "
  'oAVISO.ID_ORDEN =
  oAVISO.NIF = "A12345678 "
  oAVISO.NOMBRE = "Mi nombre "
  oAVISO.PERS_CONTACTO = "Anonimo Nadie "
  oAVISO.POBLACION = "Vega de la esquina "
  oAVISO.PROVINCIA = "Leon "
  oAVISO.TFNS_CONTACTO = "987343434 "
  
  Dim oACC As New WS_TSG.ArrayOfCACC_VENTA
  Dim oACC_VENTA As New WS_TSG.cACC_VENTA
  
  oACC_VENTA.REFERENCIA = "KITHDTV72"
  oACC_VENTA.UNIDADES = "1"
  oACC.Add(oACC_VENTA)
  oACC_VENTA.REFERENCIA = "USBTV82"
  oACC_VENTA.UNIDADES = "2"
  oACC.Add(oACC_VENTA)
  oACC_VENTA.REFERENCIA = "ACDCTV425"
  oACC_VENTA.UNIDADES = "1"
  oACC.Add(oACC_VENTA)
  
  oAVISO = WS.INSERT_VENTA(oUSER, oAVISO, oACC)
  </code></pre>
  
  <p>The error is:</p>
  
  <blockquote>
    <p>Server was unable to read request. ---> There is an error in XML
    document (2, 280). ---> Input string was not in a correct format.</p>
  </blockquote>
  
  <p>Any help? Thanks!</p>