• 26-09-2022, 13:11:25
    #10
    ERP
    Kimlik doğrulama veya yönetimden onay bekliyor.
    WebKadir adlı üyeden alıntı: mesajı görüntüle
    Aşağıdaki kod ile tüm veriler ekrana basılır.
    <?php
    $arama = 0;
    $verisayisi = 110000;
     for ($i = 0; $i <= $verisayisi/10000; $i++) {
    $arama=$arama+10000;
    $curl = curl_init();
     
    curl_setopt_array($curl, array(
      CURLOPT_URL => 'http://192.168.1.1/ws/servis.asmx',
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => '',
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 0,
      CURLOPT_FOLLOWLOCATION => true,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => 'POST',
      CURLOPT_POSTFIELDS =>'<?xml version="1.0" encoding="utf-8"?>
    <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/">
      <soap:Body>
        <arama xmlns="http://tempuri.org/">
          <firmakod>API kodum</firmakod>
          <idno>0</idno>
          <arama>'.($arama > 0 ? $arama : "").'</arama>
        </arama>
      </soap:Body>
    </soap:Envelope>',
      CURLOPT_HTTPHEADER => array(
        'Content-Type: text/xml'
      ),
    ));
     
    $response = curl_exec($curl);
     
    curl_close($curl);
    echo $response;
    
    }
    Şöyle bir hata alıyorum.;

    soap:ClientUnable to handle request without a valid action parameter. Please supply a valid soap action.soap:ClientUnable to handle request without a valid action parameter. Please supply a valid soap action.soap:ClientUnable to handle request without a valid action parameter. Please supply a valid soap action.soap:ClientUnable to handle request without a valid action parameter. Please supply a valid soap action.soap:ClientUnable to handle request without a valid action parameter. Please supply a valid soap action.soap:ClientUnable to handle request without a valid action parameter. Please supply a valid soap action.soap:ClientUnable to handle request without a valid action parameter. Please supply a valid soap action.soap:ClientUnable to handle request without a valid action parameter. Please supply a valid soap action.soap:ClientUnable to handle request without a valid action parameter. Please supply a valid soap action.soap:ClientUnable to handle request without a valid action parameter. Please supply a valid soap action.soap:ClientUnable to handle request without a valid action parameter. Please supply a valid soap action.soap:ClientUnable to handle request without a valid action parameter. Please supply a valid soap action.
  • 26-09-2022, 14:07:56
    #11
    api tarafında sayfa başına limit parametresi yoksa hepsini alamazsınız. 10k limit verilmiş sayfalama var anladığım kadarıyla. tavsiye ettikleri gibi döngüyle alabilirsiniz.
  • 26-09-2022, 14:26:33
    #12
    WebKadir adlı üyeden alıntı: mesajı görüntüle
    Aşağıdaki kod ile tüm veriler ekrana basılır.
    <?php
    $arama = 0;
    $verisayisi = 110000;
     for ($i = 0; $i <= $verisayisi/10000; $i++) {
    $arama=$arama+10000;
    $curl = curl_init();
     
    curl_setopt_array($curl, array(
      CURLOPT_URL => 'http://192.168.1.1/ws/servis.asmx',
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => '',
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 0,
      CURLOPT_FOLLOWLOCATION => true,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => 'POST',
      CURLOPT_POSTFIELDS =>'<?xml version="1.0" encoding="utf-8"?>
    <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/">
      <soap:Body>
        <arama xmlns="http://tempuri.org/">
          <firmakod>API kodum</firmakod>
          <idno>0</idno>
          <arama>'.($arama > 0 ? $arama : "").'</arama>
        </arama>
      </soap:Body>
    </soap:Envelope>',
      CURLOPT_HTTPHEADER => array(
        'Content-Type: text/xml'
      ),
    ));
     
    $response = curl_exec($curl);
     
    curl_close($curl);
    echo $response;
    
    }
    x1881 adlı üyeden alıntı: mesajı görüntüle
    api tarafında sayfa başına limit parametresi yoksa hepsini alamazsınız. 10k limit verilmiş sayfalama var anladığım kadarıyla. tavsiye ettikleri gibi döngüyle alabilirsiniz.

    İşte nasıl yapabileceğim konusunda fikrim yok, araştırıyorum. Teşekkürler.
  • 26-09-2022, 14:33:53
    #13
    ERP adlı üyeden alıntı: mesajı görüntüle
    Şöyle bir hata alıyorum.;

    soap:ClientUnable to handle request without a valid action parameter. Please supply a valid soap action.soap:ClientUnable to handle request without a valid action parameter. Please supply a valid soap action.soap:ClientUnable to handle request without a valid action parameter. Please supply a valid soap action.soap:ClientUnable to handle request without a valid action parameter. Please supply a valid soap action.soap:ClientUnable to handle request without a valid action parameter. Please supply a valid soap action.soap:ClientUnable to handle request without a valid action parameter. Please supply a valid soap action.soap:ClientUnable to handle request without a valid action parameter. Please supply a valid soap action.soap:ClientUnable to handle request without a valid action parameter. Please supply a valid soap action.soap:ClientUnable to handle request without a valid action parameter. Please supply a valid soap action.soap:ClientUnable to handle request without a valid action parameter. Please supply a valid soap action.soap:ClientUnable to handle request without a valid action parameter. Please supply a valid soap action.soap:ClientUnable to handle request without a valid action parameter. Please supply a valid soap action.
    API parametresi hatalı tarzında bir uyarı kontrol edeceğim kodları
  • 26-09-2022, 14:34:38
    #14
    WebKadir adlı üyeden alıntı: mesajı görüntüle
    API parametresi hatalı tarzında bir uyarı kontrol edeceğim kodları
    Çok teşekkür ederim.
  • 26-09-2022, 15:34:32
    #15
    ERP adlı üyeden alıntı: mesajı görüntüle
    Çok teşekkür ederim.
    bunu deneyin hocam aynı hatayı verirse CURLOPT_POSTFIELDS kısmında bir hata var demektir.
    Kod kısaca <arama> değerini 10 bin 10 bin artırarak request gönderiyor.
    <?php
    $arama = 0;
    $verisayisi = 110000;
     for ($i = 0; $i <= $verisayisi/10000; $i++) {
    $curl = curl_init();
      
    curl_setopt_array($curl,array(
      CURLOPT_URL => 'http://192.168.1.1/ws/servis.asmx',
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => '',
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 0,
      CURLOPT_FOLLOWLOCATION => true,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => 'POST',
      CURLOPT_POSTFIELDS =>'<?xml version="1.0" encoding="utf-8"?>
    <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/">
      <soap:Body>
        <arama xmlns="http://tempuri.org/">
          <firmakod>API kodum</firmakod>
          <idno>0</idno>
          <arama>'.($arama > 0 ? $arama : "").'</arama>
        </arama>
      </soap:Body>
    </soap:Envelope>',
      CURLOPT_HTTPHEADER => array(
        'Content-Type: text/xml'
      ),
    ));
      
    $response = curl_exec($curl);
      
    curl_close($curl);
    echo $response;
    $arama=$arama+10000;
     
    }
  • 26-09-2022, 15:42:56
    #16
    WebKadir adlı üyeden alıntı: mesajı görüntüle
    bunu deneyin hocam aynı hatayı verirse CURLOPT_POSTFIELDS kısmında bir hata var demektir.
    Kod kısaca <arama> değerini 10 bin 10 bin artırarak request gönderiyor.
    <?php
    $arama = 0;
    $verisayisi = 110000;
     for ($i = 0; $i <= $verisayisi/10000; $i++) {
    $curl = curl_init();
      
    curl_setopt_array($curl,array(
      CURLOPT_URL => 'http://192.168.1.1/ws/servis.asmx',
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => '',
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 0,
      CURLOPT_FOLLOWLOCATION => true,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => 'POST',
      CURLOPT_POSTFIELDS =>'<?xml version="1.0" encoding="utf-8"?>
    <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/">
      <soap:Body>
        <arama xmlns="http://tempuri.org/">
          <firmakod>API kodum</firmakod>
          <idno>0</idno>
          <arama>'.($arama > 0 ? $arama : "").'</arama>
        </arama>
      </soap:Body>
    </soap:Envelope>',
      CURLOPT_HTTPHEADER => array(
        'Content-Type: text/xml'
      ),
    ));
      
    $response = curl_exec($curl);
      
    curl_close($curl);
    echo $response;
    $arama=$arama+10000;
     
    }
    Malesef aynı hatayı aldım. Teşekkür ederim.
  • 26-09-2022, 15:45:05
    #17
    ERP adlı üyeden alıntı: mesajı görüntüle
    Malesef aynı hatayı aldım. Teşekkür ederim.
    aşağıdaki xml post olarak iletmeyi dener misiniz döngü içerisinde olmayacak
    <?xml version="1.0" encoding="utf-8"?>
    <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/">
      <soap:Body>
        <arama xmlns="http://tempuri.org/">
          <firmakod>API kodum</firmakod>
          <idno>0</idno>
          <arama>10000</arama>
        </arama>
      </soap:Body>
    </soap:Envelope>
  • 26-09-2022, 15:52:24
    #18
    WebKadir adlı üyeden alıntı: mesajı görüntüle
    aşağıdaki xml post olarak iletmeyi dener misiniz döngü içerisinde olmayacak
    <?xml version="1.0" encoding="utf-8"?>
    <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/">
      <soap:Body>
        <arama xmlns="http://tempuri.org/">
          <firmakod>API kodum</firmakod>
          <idno>0</idno>
          <arama>10000</arama>
        </arama>
      </soap:Body>
    </soap:Envelope>


    Malesef aynı hatayı aldım.