]> git.donarmstrong.com Git - debbugs.git/blobdiff - cgi/soap.cgi
* Fix link to pseudopackages
[debbugs.git] / cgi / soap.cgi
index 6599109cf9ed2a4beeb4daabb81892cdbbed49ab..f6b0d0410c4daeeb5f29dbd4a6a7e3ae9e0615fc 100755 (executable)
@@ -1,13 +1,28 @@
 #!/usr/bin/perl -wT
 
-package debbugs;
+#use SOAP::Transport::HTTP;
 
-use SOAP::Transport::HTTP;
+use Debbugs::SOAP::Server;
 
-use Debbugs::SOAP::Usertag;
-use Debbugs::SOAP::Status;
+# Work around stupid soap bug on line 411
+if (not exists $ENV{EXPECT}) {
+     $ENV{EXPECT} = '';
+}
 
-SOAP::Transport::HTTP::CGI
-    -> dispatch_to('Debbugs::SOAP::Usertag', 'Debbugs::SOAP::Status')
-    -> handle;
+my $soap = Debbugs::SOAP::Server
+#my $soap = SOAP::Transport::HTTP::CGI
+    -> dispatch_to('Debbugs::SOAP');
+#$soap->serializer()->soapversion(1.2);
+# 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;
+# 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}) {
+     next unless defined $_ and /Month|Day|Year|date|time|duration/i;
+     delete $typelookup->{$key};
+}
+$soap->handle;