Differences between revisions 7 and 9 (spanning 2 versions)
Revision 7 as of 2007-06-25 20:49:03
Size: 1740
Editor: ?BastianVenthur
Comment:
Revision 9 as of 2007-07-09 01:34:43
Size: 1977
Editor: DonArmstrong
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:

This documentation will likely always be slightly behind the extant
documentation in the Debbugs::SOAP module. However, feel free to
update it when they begin to differ.
Line 24: Line 28:
=== Perl ===
{{{
#!perl
#!/usr/bin/perl

use warnings;
use strict;

use Data::Dumper;
use SOAP::Lite;

my $soap = SOAP::Lite->uri('Debbugs/SOAP')->proxy('http://bugs.debian.org/cgi-bin/soap.cgi');
print Dumper($soap->get_bugs(package=>debbugs)->result());
print Dumper($soap->get_status(bug=>400000)->result());
print Dumper($soap->get_status(bug=>400000)->result());
# et al.
}}}
Line 32: Line 54:
#url = 'http://bugs.donarmstrong.com/cgi-bin/soap.cgi'
Line 37: Line 58:
# some debug output
Line 42: Line 64:
# server.soapaction = '%s#get_status' % namespace
Line 46: Line 67:
Line 48: Line 68:
# server.soapaction = '%s#get_bugs' % namespace
Line 52: Line 71:
# One bug
print getStatus(419306)
# > 1 bug
print getStatus(409909, 419920, 421581, 417044, 397993, 419411, 419306)
# All bugs from one package (returns a list of bugnumbers)
print getBugs("package", "gtk-qt-engine")
Line 57: Line 74:
# All bugs from gtk-qt-engine + the status of 'em # returns the status of those bugs
print getStatus(409909, 419920, 421581, 417044, 397993)

# getStatus and getBugs combined:
Line 63: Line 83:
 Why do I have to set the namespace in the server AND before every soapaction in python?:: Looks like you don't need the SOAPProxy.soapaction-thingy at all, just set the namespace in the C'tor of the SOAPProxy and call the remote methods as usual.

Debbugs' SOAP Interface Documentation

This documentation will likely always be slightly behind the extant documentation in the Debbugs::SOAP module. However, feel free to update it when they begin to differ.

Please help to keep this documentation up to date!

URL and Namespace

http://bugs.debian.org/cgi-bin/soap.cgi is the official SOAP interface for Debian's BTS.

http://bugs.donarmstrong.com/cgi-bin/soap.cgi is the development version.

The namespace is Debbugs/SOAP

Available methods for bugs.debian.org

http://bugs.debian.org/debbugs-source/mainline/Debbugs/SOAP.pm

get_status(bugnumber [, bugnumber]*)
returns the status if the given bugs
get_bugs
returns bar

Available methods for bugs.donarmstrong.com

Examples

Perl

#!/usr/bin/perl

use warnings;
use strict;

use Data::Dumper;
use SOAP::Lite;

my $soap = SOAP::Lite->uri('Debbugs/SOAP')->proxy('http://bugs.debian.org/cgi-bin/soap.cgi');
print Dumper($soap->get_bugs(package=>debbugs)->result());
print Dumper($soap->get_status(bug=>400000)->result());
print Dumper($soap->get_status(bug=>400000)->result());
# et al.

Python

   1 #!/usr/bin/env python
   2 
   3 
   4 import SOAPpy
   5 
   6 url = 'http://bugs.debian.org/cgi-bin/soap.cgi'
   7 namespace = 'Debbugs/SOAP'
   8 server = SOAPpy.SOAPProxy(url, namespace)
   9 
  10 # some debug output
  11 #server.config.dumpSOAPOut = 1
  12 #server.config.dumpSOAPIn = 1
  13 
  14 
  15 def getStatus(*args):
  16         result = server.get_status(*args)
  17         return result
  18 
  19 def getBugs(*args):
  20         result = server.get_bugs(*args)
  21         return result
  22 
  23 # All bugs from one package (returns a list of bugnumbers)
  24 print getBugs("package", "gtk-qt-engine")
  25 
  26 # returns the status of those bugs
  27 print getStatus(409909, 419920, 421581, 417044, 397993)
  28 
  29 # getStatus and getBugs combined:
  30 getStatus(getBugs("package", "gtk-qt-engine"))

FAQ