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: David Verdin <address@concealed>
  • To: address@concealed
  • Subject: Re: [sympa-users] soap interface usage (perl)
  • Date: Wed, 2 Sep 2020 14:42:01 +0200

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


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature




Archive powered by MHonArc 2.6.19+.

Top of Page