X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=cgi%2Fsoap.cgi;h=261042b0a88c5731ab3c35d9d93df704d550bca0;hb=d48c173bfd2ba6267b71cbfeb3c3eae14f18f79e;hp=31b43bab1367681681234c4d07a55252ef259a1c;hpb=2e85e976dcd2cc3bdc89715eb8465abad8b85df6;p=debbugs.git diff --git a/cgi/soap.cgi b/cgi/soap.cgi index 31b43ba..261042b 100755 --- a/cgi/soap.cgi +++ b/cgi/soap.cgi @@ -19,12 +19,21 @@ my $soap = Debbugs::SOAP::Server # soapy is stupid, and is using the 1999 schema; override it. *SOAP::XMLSchema1999::Serializer::as_base64Binary = \&SOAP::XMLSchema2001::Serializer::as_base64Binary; *SOAP::Serializer::as_anyURI = \&SOAP::XMLSchema2001::Serializer::as_string; +# do this twice to avoid the warning if the serializer doesn't get +# used +*SOAP::XMLSchema1999::Serializer::as_base64Binary = \&SOAP::XMLSchema2001::Serializer::as_base64Binary; +*SOAP::Serializer::as_anyURI = \&SOAP::XMLSchema2001::Serializer::as_string; # to work around the serializer improperly using date/time stuff # (Nothing in Debbugs should be looked at as if it were date/time) we # kill off all of the date/time related bits in the serializer. my $typelookup = $soap->serializer()->{_typelookup}; for my $key (keys %{$typelookup}) { - delete $typelookup->{$key} if defined $key and $key =~ /Month|Day|Year|date|time|duration/i; + if (defined $key and + $key =~ /Month|Day|Year|date|time|duration/i + ) { + # set the sub to always return 0 + $typelookup->{$key}[1] = sub { 0 }; + } } our $warnings = '';