6 #use SOAP::Transport::HTTP;
8 use Debbugs::SOAP::Server;
10 # Work around stupid soap bug on line 411
11 if (not exists $ENV{EXPECT}) {
15 my $soap = Debbugs::SOAP::Server
16 #my $soap = SOAP::Transport::HTTP::CGI
17 -> dispatch_to('Debbugs::SOAP');
18 #$soap->serializer()->soapversion(1.2);
19 # soapy is stupid, and is using the 1999 schema; override it.
20 *SOAP::XMLSchema1999::Serializer::as_base64Binary = \&SOAP::XMLSchema2001::Serializer::as_base64Binary;
21 *SOAP::Serializer::as_anyURI = \&SOAP::XMLSchema2001::Serializer::as_string;
22 # do this twice to avoid the warning if the serializer doesn't get
24 *SOAP::XMLSchema1999::Serializer::as_base64Binary = \&SOAP::XMLSchema2001::Serializer::as_base64Binary;
25 *SOAP::Serializer::as_anyURI = \&SOAP::XMLSchema2001::Serializer::as_string;
26 # to work around the serializer improperly using date/time stuff
27 # (Nothing in Debbugs should be looked at as if it were date/time) we
28 # kill off all of the date/time related bits in the serializer.
29 my $typelookup = $soap->serializer()->{_typelookup};
30 for my $key (keys %{$typelookup}) {
31 delete $typelookup->{$key} if defined $key and $key =~ /Month|Day|Year|date|time|duration/i;
36 # Ignore stupid warning because elements (hashes) can't start with
38 local $SIG{__WARN__} = sub {$warnings .= $_[0] unless $_[0] =~ /Cannot encode unnamed element/};
42 warn $warnings if length $warnings;