| 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 <[email protected]>. |
| 5 |
|
| 6 |
package Debbugs::SOAP::Server; |
| 7 |
|
| 8 |
=head1 NAME |
| 9 |
|
| 10 |
Debbugs::SOAP::Server -- Server Transport module |
| 11 |
|
| 12 |
=head1 SYNOPSIS |
| 13 |
|
| 14 |
|
| 15 |
=head1 DESCRIPTION |
| 16 |
|
| 17 |
|
| 18 |
=head1 BUGS |
| 19 |
|
| 20 |
None known. |
| 21 |
|
| 22 |
=cut |
| 23 |
|
| 24 |
use warnings; |
| 25 |
use strict; |
| 26 |
use vars qw(@ISA); |
| 27 |
use SOAP::Transport::HTTP; |
| 28 |
BEGIN{ |
| 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); |
| 32 |
} |
| 33 |
|
| 34 |
use Debbugs::SOAP; |
| 35 |
|
| 36 |
sub find_target { |
| 37 |
my ($self,$request) = @_; |
| 38 |
|
| 39 |
# WTF does this do? |
| 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); |
| 49 |
} |
| 50 |
|
| 51 |
|
| 52 |
1; |
| 53 |
|
| 54 |
|
| 55 |
__END__ |
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|