root/trunk/hotstuff/dxs/hotstuff-dxs

Revision 446, 0.8 KB (checked in by josef, 4 years ago)

- adapt copyright headers to the updated licence

  • Property svn:executable set to *
Line 
1#!/usr/bin/perl
2#
3# Web service handler for the DXS backend service
4# Copyright (C) 2005 Josef Spillner <josef@kstuff.org>
5# Published under 'GNU AGPLv3 or later' conditions
6
7use strict;
8use SOAP::Transport::HTTP;
9
10SOAP::Transport::HTTP::CGI
11        #->dispatch_to("DXS::(?:methodname)")
12        -> dispatch_to("DXS")
13        #-> serializer(DXSSerializer->new)
14        #-> options({site => $site})
15        -> handle;
16
17### Serializer code
18### We need this when we want to have custom response names
19#
20#BEGIN{
21#
22#package DXSSerializer;
23#@DXSSerializer::ISA = 'SOAP::Serializer';
24#
25#sub envelope{
26#       UNIVERSAL::isa($_[2] => 'SOAP::Data')
27#               ? do{
28#                       (my $method = $_[2]->name) =~ s/Response$//;
29#                       $_[2]->name($method);
30#               } : $_[2] =~ s/Response$//
31#               if $_[1] =~ /^(?:method|response)$/;
32#       shift->SUPER::envelope(@_);
33#}
34#
35#}
36
Note: See TracBrowser for help on using the browser.