Skip to Content.
Sympa Menu

en - Re: [sympa-users] soap interface usage (perl)

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Denis PUGNERE <address@concealed>
  • To: David Verdin <address@concealed>
  • Cc: address@concealed
  • Subject: Re: [sympa-users] soap interface usage (perl)
  • Date: Wed, 2 Sep 2020 14:47:25 +0200 (CEST)


Bonjour David,
version 6.2.38

--
Denis PUGNÈRE, CNRS / IN2P3 / IP2I
Institut de Physique des 2 Infinis
Campus LyonTech - La Doua, DIRAC building
4 rue FERMI, 69622 Villeurbanne Cedex, FRANCE
Tel : +33 (0)4.72.43.11.23
https://www.ip2i.in2p3.fr

----- Le 2 Sep 20, à 14:42, David Verdin address@concealed a écrit :

> Hi Denis,
>
> Which version of Sympa are you using?
>
> Regards,
>
> David
>
> On 02/09/2020 14:29, Denis PUGNERE wrote:
>> Hello the list,
>>
>> I'm trying to add / del subscribers to a list using a remote script which
>> does
>> this thru the soap interface to sympa.
>> I'm using the "trusted_application" soap-api feature [1].
>>
>> But I'm facing a problem with the format provided to the interface via the
>> api :
>>
>> the api call is :
>> ---
>> #!/usr/bin/perl
>> #use SOAP::Lite;
>> use SOAP::Lite +trace =>'debug';
>>
>> my $soap = SOAP::Lite->new();
>> $soap->ns('urn:sympa/soap');
>> $soap->proxy('https://listes.ipnl.in2p3.fr/sympa/soap');
>>
>> my $response = $soap->authenticateRemoteAppAndRun(
>> 'adduser_management',
>> 'fcbf3......fake.password.....cee2',
>> 'address@concealed',
>> 'add', ['ipnl','address@concealed','Denis PUGNERE2'] );
>>
>> print $response->result, "\n";
>> ---
>>
>> the error (from the sympa server logs) is :
>>
>> Sep 2 13:57:18 lyolistes wwsympa[25378]: err main::#1252 >
>> main::get_parameters#2210 [robot ipnl.in2p3.fr] [client 134.158.138.202]
>> Syntax error for parameter POSTDATA value "
>> <?xml version="1.0" encoding="UTF-8"?>
>> <soap:Envelope
>> soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
>> xmlns:namesp1="urn:sympa/soap"
>> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
>> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>> <soap:Body>
>> <namesp1:authenticateRemoteAppAndRun>
>> <c-gensym3 xsi:type="xsd:string">adduser_management</c-gensym3>
>> <c-gensym5
>> xsi:type="xsd:string">fcbf3......fake.password.....cee2</c-gensym5>
>> <c-gensym7
>> xsi:type="xsd:string">address@concealed</c-gensym7>
>> <c-gensym9 xsi:type="xsd:string">add</c-gensym9>
>> <soapenc:Array soapenc:arrayType="xsd:string[3]"
>> xsi:type="soapenc:Array">
>> <item xsi:type="xsd:string">ipnl</item>
>> <item xsi:type="xsd:string">address@concealed</item>
>> <item xsi:type="xsd:string">Denis PUGNERE2</item>
>> </soapenc:Array>
>> </namesp1:authenticateRemoteAppAndRun>
>> </soap:Body>
>> </soap:Envelope>" not conform to regexp:[\w\-\.]+; dumped vars in
>> /var/spool/sympa/tmp/sympa_dump.1599047838.25378
>>
>> do you know what I've done wrong ?
>> Cheers,
>> Denis
>>
>> [1] : https://sympa-community.github.io/manual/customize/soap-api.html
>>
> --
> "Mieux vaut viser la perfection et la rater que viser la médiocrité et
> l'atteindre."
> - Francis Blanche
>
> David Verdin
> Chef de Projet Collaboratif
> Département PROduits NUMériques
> Direction des Services Applicatifs
> RENATER - Rennes



Archive powered by MHonArc 2.6.19+.

Top of Page