1 # This module is part of debbugs, and is released
2 # under the terms of the GPL version 2, or any later version at your option.
3 # See the file README and COPYING for more information.
4 # Copyright 2007 by Don Armstrong <don@donarmstrong.com>.
6 package Debbugs::SOAP::Server;
10 Debbugs::SOAP::Server -- Server Transport module
27 use SOAP::Transport::HTTP;
29 # Eventually we'll probably change this to just be HTTP::Server and
30 # have the soap.cgi declare a class which inherits from both
31 push @ISA,qw(SOAP::Transport::HTTP::CGI);
37 my ($self,$request) = @_;
40 $request->match((ref $request)->method);
41 my $method_uri = $request->namespaceuriof || 'Debbugs/SOAP';
42 my $method_name = $request->dataof->name;
43 $method_uri =~ s{(?:/?Status/?|/?Usertag/?)}{};
44 $method_uri =~ s{(Debbugs/SOAP/)[vV](\d+)/?}{$1};
45 my ($soap_version) = $2 if defined $2;
46 $self->dispatched('Debbugs:::SOAP');
47 $request->{___debbugs_soap_version} = $soap_version || '';
48 return ('Debbugs::SOAP',$method_uri,$method_name);