Seite 1 von 1

Re: API - addRecipientToLocalBlocklist gibt's nicht?

Verfasst: 04.07.2012, 20:32
von Thomas Wittich
Mirko,
Dein Tipp hat gut geholfen, danke!
Ich habe set_time_limit in die SOAP-Loop eingebaut und nun geht's.

Nochmals vielen Dank!

Thomas

Re: API - addRecipientToLocalBlocklist gibt's nicht?

Verfasst: 04.07.2012, 18:31
von mirko
Auf die Version 4.20 updaten, dann ist der Fehler mit der Bocklist entfernt.

Beim Scripttimeout kann ich nicht helfen, wenn der PHP Safe mode off ist, kannst mit set_time_limit() versuchen die Scriptlaufzeit zu verlängern.

Re: API - addRecipientToLocalBlocklist gibt's nicht?

Verfasst: 04.07.2012, 15:49
von Thomas Wittich
Mirko,
die Änderungen kann ich machen, ok.

Noch was anderes. Ich lesen in einer Schleife die Empfänger einer Liste ein.
Bei der längsten Liste hört das PHP-Script einfach auf, ohne SOAP-Abbruch oder Timeout-Meldung...
PHP.ini und init_set habe ich beides probiert mit MaxExecTime sehr hoch setzen. Half nicht.

Hast Du noch eine Idee?
Danke, Thomas

Output:

Code: Alles auswählen

...
2012-07-04 15:07:44 - INFO - Calling api_Recipients.api_listRecipients with: Array
(
[0] => 15
[1] => 650
[2] => 50
)

2012-07-04 15:07:45 - INFO - Calling api_Recipients.api_listRecipients with: Array
(
[0] => 15
[1] => 700
[2] => 50
)

2012-07-04 15:07:46 - INFO - Calling api_Recipients.api_listRecipients with: Array
(
[0] => 15
[1] => 750
[2] => 50
)

2012-07-04 15:07:47 - INFO - Calling api_Recipients.api_listRecipients with: Array
(
[0] => 15
[1] => 800
[2] => 50
)

2012-07-04 15:07:48 - INFO - Calling api_Recipients.api_listRecipients with: Array
(
[0] => 15
[1] => 850
[2] => 50
)
Hier ist noch lange nicht das Ende. Hmm


"15" -> MailinglistId
"850" -> Start bei 850. Empf.
"50" -> Jede iteration liest 50 Empfänger

Re: API - addRecipientToLocalBlocklist gibt's nicht?

Verfasst: 27.06.2012, 12:07
von mirko
das kann nicht kompatibel lassen. Ändere bitte manuell die api_recipients.php im api-Verzeichnis, nach Bocklist suchen und in Blocklist ändern, das kommt mehrfach vor.

Re: API - addRecipientToLocalBlocklist gibt's nicht?

Verfasst: 27.06.2012, 12:04
von mirko
Ja habe ich auch gerade gesehen, da ein fehlt ein "l", so ein Mist :shock:

Re: API - addRecipientToLocalBlocklist gibt's nicht?

Verfasst: 27.06.2012, 01:24
von Thomas Wittich
Hi Mirko,
kleiner Hinweis: Habe das WSDL gefunden; dort steht drinnen "api_addRecipientToLocalBocklist" - da liegt der Hund begraben:

Code: Alles auswählen

2012-06-27 01:06:33 - INFO - Calling api_Recipients.api_addRecipientToLocalBocklist with: Array
(
[0] => 14
[1] => Array
(
[0] => 1553
[1] => 1298
[2] => 1444
[3] => 838
[4] => 1108
[5] => 1611
[6] => 1624
[7] => 1647
)
Bocklist ist Bockmist und nicht Bockwurst - lustiges Fehlerchen.
Ist mir egal, jetzt weiss ich es ja. Wäre aber nett, wenn's behoben wird und dennoch die nächsten paar Versionen abwärtskompatibel bleibt.

Vielen Dank!
Thomas

API - addRecipientToLocalBlocklist gibt's nicht?

Verfasst: 27.06.2012, 01:13
von Thomas Wittich
Mirko,
nächste Frage: Ich verwende die API analog Deiner Empfehlung in diesem Thread.
Nun bekomme ich diese Meldung von NuSoap zurück:

Code: Alles auswählen

2012-06-27 01:06:28 - ABORT - Soap-Fault in line 54 of file /html/swm_service/lib/swmservice/bs_swmservicecommon.php: Array
(
[faultcode] => SOAP-ENV:Client
[faultactor] =>
[faultstring] => Operation 'api_Recipients.api_addRecipientToLocalBlocklist' is not defined in the WSDL for this service
[detail] =>
)

2012-06-27 01:06:28 - ABORT - Soap-Fault in line 54 of file /html/swm_service/lib/swmservice/bs_swmservicecommon.php: Array
(
[faultcode] => SOAP-ENV:Client
[faultactor] =>
[faultstring] => Operation 'api_Recipients.api_addRecipientToLocalBlocklist' is not defined in the WSDL for this service
[detail] =>
)
Zu diesem Code:

Code: Alles auswählen

    function call($function,$params=array(),$str1="",$str2="",$bln1=false,$bln2=true) {
        # $this->client->setHeaders(array('APIToken' => $apikey));

        $this->log("Calling ".$function." with: ".print_r($params,1));

        $result = $this->client->call($function,$params, $str1, $str2, $bln1, $bln2);
        
        if($this->client->fault) {
            $this->log("Soap-Fault in line ". __LINE__ ." of file ". __FILE__ .": ".print_r($result,1),LOG_LEVEL_ABORT);
        } else {
            if($this->client->getError()) {
                $this->log("Soap-Error in line ".__LINE__." of file ". __FILE__ .": ". $this->client->getError(),LOG_LEVEL_ABORT);
            }
        }

        return($result);
    }
und diesen Function-Parametern:

Code: Alles auswählen

2012-06-27 01:06:27 - INFO - Calling api_Recipients.api_addRecipientToLocalBlocklist with: Array
(
[0] => 14
[1] => Array
(
[0] => 1553
[1] => 1298
[2] => 1444
[3] => 838
[4] => 1108
[5] => 1611
[6] => 1624
[7] => 1647
)
Bitte richtig verstehen: Die selbe Instanz des Clients macht unmittelbar vorher erfolgrieche Calls auf Function api_Recipients.api_listRecipients. Das ist schonmal super.
Auch die Parameter machen Sinn - da steht kein Quatsch drinnen.

Hierzu konkret die Fragen:
1. Kann ich das verwendete WSDL irgendwie einsehen? Was wird hier benutzt?
2. Warum kennt SWM-API diese Funktion nicht?

Danke, Thomas