aboutsummaryrefslogtreecommitdiffstats
path: root/Bugzilla/WebService/Server
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-02-15 11:02:52 -0500
committerDave Lawrence <dlawrence@mozilla.com>2012-02-15 11:02:52 -0500
commitc69c8a9235e885cd9ce6d5c984381afb3dbecb9e (patch)
treebea02d0316186158a2c6b1077ef9b21484622204 /Bugzilla/WebService/Server
parentb9382a0880f28ce3ef743b6258acc9d49d8e6fa1 (diff)
downloadbugs-c69c8a9235e885cd9ce6d5c984381afb3dbecb9e.tar
bugs-c69c8a9235e885cd9ce6d5c984381afb3dbecb9e.tar.gz
bugs-c69c8a9235e885cd9ce6d5c984381afb3dbecb9e.tar.bz2
bugs-c69c8a9235e885cd9ce6d5c984381afb3dbecb9e.tar.xz
bugs-c69c8a9235e885cd9ce6d5c984381afb3dbecb9e.zip
Bug 724464 - JSON-RPC support shouldn't require SOAP::Lite
r/a=LpSolit
Diffstat (limited to 'Bugzilla/WebService/Server')
-rw-r--r--Bugzilla/WebService/Server/XMLRPC.pm14
1 files changed, 14 insertions, 0 deletions
diff --git a/Bugzilla/WebService/Server/XMLRPC.pm b/Bugzilla/WebService/Server/XMLRPC.pm
index 5338d8b5a..67e7b7555 100644
--- a/Bugzilla/WebService/Server/XMLRPC.pm
+++ b/Bugzilla/WebService/Server/XMLRPC.pm
@@ -18,6 +18,20 @@ if ($ENV{MOD_PERL}) {
use Bugzilla::WebService::Constants;
+# Allow WebService methods to call XMLRPC::Lite's type method directly
+BEGIN {
+ *Bugzilla::WebService::type = sub {
+ my ($self, $type, $value) = @_;
+ if ($type eq 'dateTime') {
+ # This is the XML-RPC implementation, see the README in Bugzilla/WebService/.
+ # Our "base" implementation is in Bugzilla::WebService::Server.
+ $value = Bugzilla::WebService::Server->datetime_format_outbound($value);
+ $value =~ s/-//g;
+ }
+ return XMLRPC::Data->type($type)->value($value);
+ };
+}
+
sub initialize {
my $self = shift;
my %retval = $self->SUPER::initialize(@_);