File: Server.pm

package info (click to toggle)
debbugs 2.6.4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,800 kB
  • sloc: perl: 19,270; makefile: 81; sh: 75
file content (61 lines) | stat: -rw-r--r-- 1,267 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# This module is part of debbugs, and is released
# under the terms of the GPL version 2, or any later version at your option.
# See the file README and COPYING for more information.
# Copyright 2007 by Don Armstrong <don@donarmstrong.com>.

package Debbugs::SOAP::Server;

=head1 NAME

Debbugs::SOAP::Server -- Server Transport module

=head1 SYNOPSIS


=head1 DESCRIPTION


=head1 BUGS

None known.

=cut

use warnings;
use strict;
use vars qw(@ISA);
use SOAP::Transport::HTTP;
BEGIN{
     # Eventually we'll probably change this to just be HTTP::Server and
     # have the soap.cgi declare a class which inherits from both
     push @ISA,qw(SOAP::Transport::HTTP::CGI);
}

use Debbugs::SOAP;

sub find_target {
     my ($self,$request) = @_;

     # WTF does this do?
     $request->match((ref $request)->method);
     my $method_uri = $request->namespaceuriof || 'Debbugs/SOAP';
     my $method_name = $request->dataof->name;
     $method_uri =~ s{(?:/?Status/?|/?Usertag/?)}{};
     $method_uri =~ s{(Debbugs/SOAP/)[vV](\d+)/?}{$1};
     my ($soap_version) = $2 if defined $2;
     $self->dispatched('Debbugs:::SOAP');
     $request->{___debbugs_soap_version} = $soap_version || '';
     return ('Debbugs::SOAP',$method_uri,$method_name);
}


1;


__END__