import SOAP-WSDL 1.20 from CPAN
git-cpan-module: SOAP-WSDL git-cpan-version: 1.20 git-cpan-authorid: MKUTTER git-cpan-file: authors/id/M/MK/MKUTTER/SOAP-WSDL-1.20.tar.gz
This commit is contained in:
committed by
Michael G. Schwern
parent
1d8092299a
commit
95465c33d9
@@ -1,11 +1,13 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
use Test::More tests=> 7;
|
||||
use Test;
|
||||
plan tests=> 6;
|
||||
use Time::HiRes qw( gettimeofday tv_interval );
|
||||
use lib '../..';
|
||||
use Data::Dumper;
|
||||
use Cwd;
|
||||
use_ok "SOAP::WSDL";
|
||||
use SOAP::WSDL;
|
||||
ok 1; # if we made it this far, we're ok
|
||||
### test vars END
|
||||
|
||||
print "Testing SOAP::WSDL ". $SOAP::WSDL::VERSION."\n";
|
||||
@@ -26,29 +28,33 @@ my $t0 = [gettimeofday];
|
||||
ok( my $soap=SOAP::WSDL->new(
|
||||
wsdl => "file://$dir/t/acceptance/helloworld.asmx.xml",
|
||||
no_dispatch => 1
|
||||
), "Create SOAP::WSDL object (".tv_interval ( $t0, [gettimeofday]) ."ms)" ); #->proxy('http://erlm5aqa.ww001.siemens.net/lasttest/helloworld/helloworld.asmx' );
|
||||
) );
|
||||
print "Create SOAP::WSDL object (".tv_interval ( $t0, [gettimeofday]) ."ms)\n" ;
|
||||
|
||||
$soap->proxy('http://helloworld/helloworld.asmx');
|
||||
|
||||
$t0 = [gettimeofday];
|
||||
ok($soap->wsdlinit(caching => 1), "wsdl file init (".tv_interval ( $t0, [gettimeofday]) ."s)" );;
|
||||
eval{ $soap->wsdlinit(caching => 1) };
|
||||
unless ($@) {
|
||||
ok(1);
|
||||
} else {
|
||||
ok 0;
|
||||
print STDERR $@;
|
||||
}
|
||||
print "wsdl file init (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;;
|
||||
$soap->readable(1);
|
||||
|
||||
$t0 = [gettimeofday];
|
||||
ok( $soap->call("sayHello" , %{ $data }), "1 x call pre-work (".tv_interval ( $t0, [gettimeofday]) ."s)" );;
|
||||
ok( $soap->call("sayHello" , %{ $data }));
|
||||
print "1 x call pre-work (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
||||
|
||||
$t0 = [gettimeofday];
|
||||
ok($soap->call(sayHello => %{ $data }), "1 x call pre-work (".tv_interval ( $t0, [gettimeofday]) ."s)" );;
|
||||
ok($soap->call(sayHello => %{ $data }) );
|
||||
print "1 x call pre-work (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
||||
|
||||
$t0 = [gettimeofday];
|
||||
for (my $i=1; $i<100; $i++) {
|
||||
$soap->call(sayHello => %{ $data });
|
||||
}
|
||||
ok(1, "100 x call pre-work (".tv_interval ( $t0, [gettimeofday]) ."s)" );;
|
||||
|
||||
$soap->call(sayHello => %{ $data });
|
||||
$t0 = [gettimeofday];
|
||||
for (my $i=1; $i<100; $i++) {
|
||||
$soap->call(sayHello => %{ $data });
|
||||
}
|
||||
ok(1, "100 x call pre-work (".tv_interval ( $t0, [gettimeofday]) ."s)" );;
|
||||
ok(1);
|
||||
print "100 x call pre-work (".tv_interval ( $t0, [gettimeofday]) ."s)\n";
|
||||
|
||||
@@ -12,11 +12,13 @@
|
||||
|
||||
use strict;
|
||||
use diagnostics;
|
||||
use Test::More tests => 5;
|
||||
use Test;
|
||||
plan tests => 5;
|
||||
use Time::HiRes qw( gettimeofday tv_interval );
|
||||
use lib '../..';
|
||||
use Cwd;
|
||||
use_ok "SOAP::WSDL";
|
||||
use SOAP::WSDL;
|
||||
ok 1; # if we made it this far, we're ok
|
||||
### test vars END
|
||||
print "Testing SOAP::WSDL ". $SOAP::WSDL::VERSION."\n";
|
||||
print "Acceptance test against sample output with simple WSDL\n";
|
||||
@@ -45,10 +47,12 @@ $dir=~s/\/t//;
|
||||
ok( my $soap=SOAP::WSDL->new(
|
||||
wsdl => 'file:///'.$dir.'/t/acceptance/test.wsdl.xml',
|
||||
no_dispatch => 1
|
||||
), "Create SOAP::WSDL object (".tv_interval ( $t0, [gettimeofday]) ."s)" ); #->proxy('http://erlm5aqa.ww001.siemens.net/lasttest/helloworld/helloworld.asmx' );
|
||||
) );
|
||||
print "Create SOAP::WSDL object (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
||||
$soap->proxy('http://helloworld/helloworld.asmx');
|
||||
$t0 = [gettimeofday];
|
||||
ok($soap->wsdlinit(), "WSDL init (".tv_interval ( $t0, [gettimeofday]) ."s)") ;
|
||||
ok($soap->wsdlinit());
|
||||
print "WSDL init (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
||||
|
||||
$t0 = [gettimeofday];
|
||||
do {
|
||||
@@ -64,8 +68,12 @@ do {
|
||||
$xml_test=~s/^.+\<([^\/]+?)\:Body\>//;
|
||||
$xml_test=~s/\<\/$1\:Body\>.*//;
|
||||
|
||||
if ( ($xml) && ($xml eq $xml_test) ) { pass ("Message encoding (" .tv_interval ( $t0, [gettimeofday]) ."s)") } else {
|
||||
fail( "Message encoding (".tv_interval ( $t0, [gettimeofday]) ."s)") ;
|
||||
if ( ($xml) && ($xml eq $xml_test) ) {
|
||||
ok 1;
|
||||
print "Message encoding (" .tv_interval ( $t0, [gettimeofday]) ."s)\n"
|
||||
} else {
|
||||
ok 0;
|
||||
print "Message encoding (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
||||
print "$xml\n$xml_test\n"; };
|
||||
};
|
||||
|
||||
@@ -83,8 +91,12 @@ do {
|
||||
$xml_test=~s/^.+\<([^\/]+?)\:Body\>//;
|
||||
$xml_test=~s/\<\/$1\:Body\>.*//;
|
||||
|
||||
if ( ($xml) && ($xml eq $xml_test) ) { pass ("Message encoding (" .tv_interval ( $t0, [gettimeofday]) ."s)") } else {
|
||||
fail( "Message encoding (".tv_interval ( $t0, [gettimeofday]) ."s)") ;
|
||||
if ( ($xml) && ($xml eq $xml_test) ) {
|
||||
ok 1;
|
||||
print "Message encoding (" .tv_interval ( $t0, [gettimeofday]) ."s)\n";
|
||||
} else {
|
||||
ok 0;
|
||||
print "Message encoding (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
||||
print "$xml\n$xml_test\n"; };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user