Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Commit [r419] Maximize Restore History

merged back 0.71 branch into trunk

kutterma 2013-04-21

<< < 1 2 3 4 .. 7 > >> (Page 2 of 7)
added /trunk/Debian_CPANTS.txt
removed /trunk/lib/SOAP/Header.pm
removed /trunk/lib/IO
removed /trunk/lib/SOAP/Client.pm
removed /trunk/lib/SOAP/Deserializer.pm
removed /trunk/lib/SOAP/Schema
removed /trunk/lib/SOAP/Lite/Custom
removed /trunk/t/SOAP/Transport/MQ.t
removed /trunk/lib/SOAP/Manual
removed /trunk/lib/SOAP/Server.pm
removed /trunk/lib/SOAP/XMLSchema
changed /trunk/t/02-payload.t
changed /trunk/t/36-leaks.t
changed /trunk/lib/SOAP/Constants.pm
changed /trunk/lib/SOAP/Test.pm
changed /trunk/t/28-uddi_search.t
changed /trunk/lib/XML/Parser/Lite.pm
changed /trunk/t/23-ppm.t
changed /trunk/t/SOAP/Transport/HTTP/CGI.t
changed /trunk/t/27-xmlparserlite.t
changed /trunk/lib/SOAP/Schema.pod
copied /trunk/lib/SOAP/Transport.pm -> /trunk/t/Issues/rt72836.t
copied /trunk/t/SOAP/Fault.t -> /trunk/t/Issues/rt53375.t
/trunk/Debian_CPANTS.txt Diff Switch to side-by-side view
Loading...
/trunk/lib/SOAP/Header.pm
File was removed.
/trunk/lib/IO
File was removed.
/trunk/lib/SOAP/Client.pm
File was removed.
/trunk/lib/SOAP/Schema
File was removed.
/trunk/lib/SOAP/Lite/Custom
File was removed.
/trunk/t/SOAP/Transport/MQ.t
File was removed.
/trunk/lib/SOAP/Manual
File was removed.
/trunk/lib/SOAP/Server.pm
File was removed.
/trunk/lib/SOAP/XMLSchema
File was removed.
/trunk/t/02-payload.t Diff Switch to side-by-side view
Loading...
/trunk/t/36-leaks.t Diff Switch to side-by-side view
Loading...
/trunk/lib/SOAP/Constants.pm Diff Switch to side-by-side view
Loading...
/trunk/lib/SOAP/Test.pm Diff Switch to side-by-side view
Loading...
/trunk/t/28-uddi_search.t Diff Switch to side-by-side view
Loading...
/trunk/lib/XML/Parser/Lite.pm Diff Switch to side-by-side view
Loading...
/trunk/t/23-ppm.t Diff Switch to side-by-side view
Loading...
/trunk/t/SOAP/Transport/HTTP/CGI.t Diff Switch to side-by-side view
Loading...
/trunk/t/27-xmlparserlite.t Diff Switch to side-by-side view
Loading...
/trunk/lib/SOAP/Schema.pod Diff Switch to side-by-side view
Loading...
/trunk/lib/SOAP/Transport.pm to /trunk/t/Issues/rt72836.t
--- a/trunk/lib/SOAP/Transport.pm
+++ b/trunk/t/Issues/rt72836.t
@@ -1,65 +1,60 @@
-package SOAP::Transport;
+use strict;
+use warnings;
 
-use strict;
+package DoThingsWithStuff;
 
-use vars qw($AUTOLOAD @ISA);
-
-use SOAP::Trace;
-use SOAP::Cloneable;
-use SOAP::Client;
-
-@ISA = qw(SOAP::Cloneable);
-
-sub DESTROY { SOAP::Trace::objects('()') }
+use SOAP::Lite;
+our @ISA = qw(SOAP::Server::Parameters);
 
 sub new {
-    my $self = shift;
-    return $self if ref $self;
-    my $class = ref($self) || $self;
-
-    SOAP::Trace::objects('()');
-    return bless {} => $class;
+    my ( $class ) = @_;
+    my $self = bless {}, ref($class) || $class;
+    $self;
 }
 
-sub proxy {
+sub do_something {
     my $self = shift;
-    $self = $self->new() if not ref $self;
-
-    my $class = ref $self;
-
-    return $self->{_proxy} unless @_;
-
-    $_[0] =~ /^(\w+):/ or die "proxy: transport protocol not specified\n";
-    my $protocol = uc "$1"; # untainted now
-
-    # HTTPS is handled by HTTP class
-    $protocol =~s/^HTTPS$/HTTP/;
-
-    (my $protocol_class = "${class}::$protocol") =~ s/-/_/g;
-
-    no strict 'refs';
-    unless (defined %{"$protocol_class\::Client::"}
-        && UNIVERSAL::can("$protocol_class\::Client" => 'new')
-    ) {
-        eval "require $protocol_class";
-        die "Unsupported protocol '$protocol'\n"
-            if $@ =~ m!^Can\'t locate SOAP/Transport/!;
-        die if $@;
-    }
-
-    $protocol_class .= "::Client";
-    return $self->{_proxy} = $protocol_class->new(endpoint => shift, @_);
+    my $som = pop;
+    #$som->context->serializer->encodingStyle(""); # does adding this affect the fix?
+    return SOAP::Data->name(wotsit => "doofer");
 }
 
-sub AUTOLOAD {
-    my $method = substr($AUTOLOAD, rindex($AUTOLOAD, '::') + 2);
-    return if $method eq 'DESTROY';
+package main;
 
-    no strict 'refs';
-    *$AUTOLOAD = sub { shift->proxy->$method(@_) };
-    goto &$AUTOLOAD;
+use Test::More;
+use SOAP::Lite;
+
+eval {
+	require Test::XML;
+};
+if ($@) {
+	plan skip_all => 'Cannot test without Test::XML ' . $@;
+	exit 0;
 }
 
-1;
 
-__END__+my $req11 = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Something"><soapenv:Header/><soapenv:Body><urn:do_something><stuff>things</stuff></urn:do_something></soapenv:Body></soapenv:Envelope>';
+
+my $req12 = '<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:Something"><soapenv:Header/><soapenv:Body><urn:do_something><stuff>things</stuff></urn:do_something></soapenv:Body></soapenv:Envelope>';
+
+my $expected_11 = '<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><do_somethingResponse xmlns="urn:Something"><wotsit xsi:type="xsd:string">doofer</wotsit></do_somethingResponse></soap:Body></soap:Envelope>';
+
+my $expected_12 = '<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://www.w3.org/2003/05/soap-encoding" xmlns:xsd="http://www.w3.org/2001/XMLSchema" soap:encodingStyle="http://www.w3.org/2003/05/soap-encoding" xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Body><do_somethingResponse xmlns="urn:Something"><wotsit xsi:type="xsd:string">doofer</wotsit></do_somethingResponse></soap:Body></soap:Envelope>';
+
+my $t = DoThingsWithStuff->new;
+
+my $s = SOAP::Server->new;
+$s->dispatch_with({
+    "urn:Something" => $t
+});
+
+my $res_11_1 = $s->handle($req11);
+Test::XML::is_xml($res_11_1, $expected_11, "Got correct SOAP 1.1 response");
+
+my $res_12 = $s->handle($req12);
+Test::XML::is_xml($res_12, $expected_12, "Got correct SOAP 1.2 response");
+
+my $res_11_2 = $s->handle($req11);
+Test::XML::is_xml($res_11_2, $expected_11, "Got correct SOAP 1.1 response after processing a SOAP 1.2 request");
+
+done_testing;
/trunk/t/SOAP/Fault.t to /trunk/t/Issues/rt53375.t
--- a/trunk/t/SOAP/Fault.t
+++ b/trunk/t/Issues/rt53375.t
@@ -1,39 +1,35 @@
-use strict;
-use warnings;
-use Test::More tests => 9; #qw(no_plan);
+use Test::More tests => 4;
+use XML::Parser::Lite;
 
-use Scalar::Util qw(blessed refaddr);
-
-use_ok qw(SOAP::Fault);
-
-my $fault = SOAP::Fault->new();
-
-is refaddr $fault, refaddr $fault->new();
-
-ok $fault = SOAP::Fault->new(faultstring => 'foo',
-    faultdetail => 'bar',
-    faultcode => 'soap:server',
+my $comment = '';
+my $parser = new XML::Parser::Lite(
+	Handlers => {
+		Comment => sub { $comment .= $_[1]; },
+	}
 );
 
-is $fault, "soap:server: foo";
+my $xml = <<'EOT';
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- seed-viewer -->
+<test>
+</test>
+EOT
 
-$fault = SOAP::Fault::faultstring('bar');
-ok blessed $fault, 'auto-create object on subroutine call';
-is $fault->faultstring(), 'bar', 'faultstring';
+eval {
+    $parser->parse($xml);
+};
+ok(! $@);
+is($comment, ' seed-viewer ');
 
-{
-    my $warning = q{};
-    local $^W = 1;
-    local $SIG{__WARN__} = sub { $warning = join q{}, @_ };
-
-    $fault = SOAP::Fault->new('foo' => 'bar');
-    is $warning, q{};
-
-    $fault = SOAP::Fault->new('bar');
-    like $warning , qr{\A Odd \s \(wrong\?\) \s number \s of \s parameters}x;
-
-    $warning = q{};
-    local $^W = 0;
-    $fault = SOAP::Fault->new('bar');
-    is $warning, q{};
-}+$comment = '';
+$xml = <<'EOT';
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- seed_viewer -->
+<test>
+</test>
+EOT
+eval {
+    $parser->parse($xml);
+};
+ok(! $@);
+is($comment, ' seed_viewer ');
<< < 1 2 3 4 .. 7 > >> (Page 2 of 7)