Skip to Content.
Sympa Menu

en - Re: [sympa-users] Struggling with the SOAP interface => MORE INFO

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Jobst Schmalenbach <address@concealed>
  • To: Olivier Salaün <address@concealed>
  • Cc: address@concealed
  • Subject: Re: [sympa-users] Struggling with the SOAP interface => MORE INFO
  • Date: Mon, 19 Jun 2006 12:38:42 +1000

On Sat, Jun 17, 2006 at 06:55:27PM +0200, Olivier Salaün
(address@concealed) wrote:
> Hi Jobst,
>
> It looks like your SOAP request is sent to Sympa's web interface instead
> of Sympa's SOAP inteface. And of course wwsympa.fcgi can't cope with a
> SOAP request ; therefore it throughs a syntax error.

Thats correct.

>
> You probably missconfigured Apache to map
> http://lists.barrett.com.au/sympasoap to sympa_soap_server.fcgi
> Check the documentation :
> http://www.sympa.org/doc/html/node12.html#SECTION001220000000000000000

I did not specify the "sympa_url", so it actually was talking to the
webinterface, hence you are correct, too.

BUT, when I tried to find the reason of my problem (before I wrote my
emails),
I searched every log file, I searched all the SOAP traffic from and to
server/client, I hooked myself into the the ports to see what is
actually happening but there was never any error message from the sympa
soap interface that there maybe something WRONG.

I think this is a small problem (small bug)?
Looking at the perl code of wwsympa.fcgi I can see:

<code>
sub do_wsdl {

&do_log('info', "do_wsdl ()");
my $sympawsdl = '/home/sympa/bin/etc/sympa.wsdl';

unless (-r $sympawsdl){
&error_message('404');
&wwslog('err','could not find $sympawsdl');
return undef;
}

my $soap_url= &Conf::get_robot_conf($robot,'soap_url');

# added by me to show a problem ###########
#
my $jobst_msg = "SOAP URL IS $soap_url";
&do_log('info', $jobst_msg );
#
# finished adding by me ###################

unless (defined $soap_url) {
&error_message('no_soap_service');
&wwslog('err','No SOAP service was defined in sympa.conf
(soap_url parameter)');
return undef;
}
</code>

Searching all the log files I have never been able to see the "SOAP service"
error message. This message should show up (as it is fatal) even if debug
logging is disabled or set to a normal level (log_level 0).

All I ever see in the logs (amongst other messages is:

Jun 17 21:13:56 lists.barrett.com.au wwsympa[18488]: do_wsdl ()

but nothing else. If the errormessage

"No SOAP service was defined in sympa.conf (soap_url parameter)"

would have come up in the log files I would have found the error
straight away without bothering everyone.


My logfile setting is correct (otherwise do_wsdl would not show up):

syslog LOCAL1
log_socket_type unix
log_level 0

and in syslog.conf:

local1.* /var/log/sympa



Now using the code from above I deleted the "soap_url" in the sympa.conf file
and restarted sympa and httpd just to be sure ;-), I increased the LOG LEVEL
to 3 in sympa.conf, and this is what I get:

Jun 19 12:15:30 vps881 wwsympa[18485]: List::request_action
topics_visibility,md5,lists.barrett.com.au
Jun 19 12:15:30 vps881 wwsympa[18485]: List::verify(true()
)
Jun 19 12:15:30 vps881 wwsympa[18485]: rule true()
,md5,do_it accepted
Jun 19 12:15:30 vps881 wwsympa[18485]: do_wsdl ()
Jun 19 12:15:30 vps881 wwsympa[18485]: SOAP URL IS
Jun 19 12:15:30 vps881 wwsympa[18485]: Language::SetLang(en_US)
Jun 19 12:15:30 vps881 wwsympa[18485]: [robot lists.barrett.com.au]
[client 150.101.215.42] check_param_out
Jun 19 12:15:30 vps881 wwsympa[18485]: Language::SetLang(de_DE)
Jun 19 12:15:30 vps881 wwsympa[18485]: Language::gettext(_language_)
Jun 19 12:15:30 vps881 wwsympa[18485]: Language::SetLang(cs)

As expected, my message doesnt SHOW anything, as it is NOT defined .. but
I dont get any othe hint there is something wrong.


Putting the soap_url back into the sympa.conf file I get

Jun 19 12:20:29 vps881 wwsympa[18849]: List::verify(true()
)
Jun 19 12:20:29 vps881 wwsympa[18849]: rule true()
,md5,do_it accepted
Jun 19 12:20:29 vps881 wwsympa[18849]: do_wsdl ()
Jun 19 12:20:29 vps881 wwsympa[18849]: SOAP URL IS
http://lists.barrett.com.au/sympasoap
Jun 19 12:20:29 vps881 wwsympa[18849]: Language::SetLang(en_US)
Jun 19 12:20:29 vps881 wwsympa[18849]: [robot lists.barrett.com.au]
[client 150.101.215.42] check_param_out
Jun 19 12:20:29 vps881 wwsympa[18849]: Language::SetLang(de_DE)




The irritating side-effect of a missing "soap_url" in sympa.conf is that
you get conflicting error messages depending how you call soap client:

This will yield "transport not found":
$soapclient = new nusoapclient($soapServer);

This will yeild "return is not of type xml":
$soapclient = new nusoapclient($soapServer,'wsdl');

so its really hard to debug!


It would be so easy if the do_wsdl will the admin aware that
"soap_url" is not set!


regards
Jobst




--
Fortune: No such file or directory.

__, Jobst Schmalenbach, Technical Director
_ _.--'-n_/ Barrett Consulting Group P/L & The Meditation Room P/L
-(_)------(_)= +61 3 9532 7677, POBox 277, Caulfield South, 3162, Australia



Archive powered by MHonArc 2.6.19+.

Top of Page