Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2bad767211 | ||
|
|
7ca2154ad6 | ||
|
|
eb096ad88e | ||
|
|
3cfeebae54 | ||
|
|
a9033164e6 | ||
|
|
84b53d9261 | ||
|
|
b955c5ad79 | ||
|
|
080b211e4e | ||
|
|
fa4d5dd884 | ||
|
|
3d11524449 | ||
|
|
21efa286af | ||
|
|
008d06b72a | ||
|
|
c6a48ba84b | ||
|
|
30be0da3dc | ||
|
|
2347a88353 | ||
|
|
9e85f63aa0 | ||
|
|
7ba2f93e44 | ||
|
|
099c83b6bc | ||
|
|
f63138fc87 | ||
|
|
fd0854e34a | ||
|
|
c2da74b5ae | ||
|
|
7ba1959888 | ||
|
|
a554e87f49 | ||
|
|
312f3d6bbd | ||
|
|
40e0e67e84 | ||
|
|
25548e6296 | ||
|
|
a78d6d15b5 | ||
|
|
5c42b1d8f6 | ||
|
|
21b5330a8d | ||
|
|
7716d4349a | ||
|
|
6fe52c4370 | ||
|
|
bfbf5e27e0 | ||
|
|
903b3e95e4 |
@@ -1,7 +1,25 @@
|
|||||||
use Module::Build;
|
#!/usr/bin/perl -w
|
||||||
Module::Build->new(
|
use Module::Build;
|
||||||
dist_abstract => 'WSDL support for SOAP::Lite',
|
|
||||||
module_name => 'SOAP::WSDL',
|
Module::Build->new(
|
||||||
license => 'artistic',
|
create_makefile_pl => 'passthrough',
|
||||||
requires => { 'SOAP::Lite' => 0.55, 'XML::XPath' => 0 }
|
dist_name => 'SOAP-WSDL',
|
||||||
)->create_build_script;
|
dist_version => '1.27',
|
||||||
|
dist_abstract => 'WSDL support for SOAP::Lite',
|
||||||
|
module_name => 'SOAP::WSDL',
|
||||||
|
license => 'artistic',
|
||||||
|
requires => {
|
||||||
|
'SOAP::Lite' => 0,
|
||||||
|
'XML::XPath' => 0,
|
||||||
|
},
|
||||||
|
buildrequires => {
|
||||||
|
'Test::More' => 0,
|
||||||
|
'SOAP::Lite' => 0,
|
||||||
|
'XML::XPath' => 0,
|
||||||
|
'Time::HiRes' => 0,
|
||||||
|
'File::Spec' => 0,
|
||||||
|
'File::Basename' => 0,
|
||||||
|
'Cwd' => 0,
|
||||||
|
},
|
||||||
|
|
||||||
|
)->create_build_script;
|
||||||
|
|||||||
@@ -1,146 +1,170 @@
|
|||||||
2007/05/28 private methods made private and pod update
|
* v.1.27
|
||||||
- added pod tests
|
- fixed issue reported by Cominic Caffrey: SOAP::WSDL does not find XML
|
||||||
- made encodeComplexType and method generators private
|
elements with multiple prefixes assigned to the schema's targetNamespace
|
||||||
- updated pod
|
* v1.26 2007/10/05 - bugfix
|
||||||
- fixed test scripts to work again from within/without t/
|
- fixed issue reported by T Alex Beamish: tests fail when unwrapped into /tmp
|
||||||
- moved development repository to
|
* v1.25 2007/09/24 - maintenance
|
||||||
https://svn.sourceforge.net/svnroot/soap-wsdl/ (finally !)
|
- added Makefile.PL to ease installation
|
||||||
|
|
||||||
2007/05/21 updated base version to customized version from Giovanni S Fois
|
* v1.24 2007/09/22 - bugfix
|
||||||
- merged in doc changes, so that they don't refer to "customized version"
|
- fixes issue reported by David Bussenschutt: wsdlinit always uses new SOAP::Schema instance.
|
||||||
- changed build process to Build.PL
|
|
||||||
- changed repository layout to support new build process
|
* v1.23 2007/06/05 - bugfixes and optimizations
|
||||||
|
- fixes #27426: missing prereq XML::XPath
|
||||||
2006/11/06 only in the customized version
|
- fixed build_requires
|
||||||
Added the support for default values in the wsdl file
|
- some doc fixes
|
||||||
|
- now performs some initializations on calling portname()
|
||||||
2006/11/04 only in the customized version
|
|
||||||
Changed the calling interface. Now it's driven by the by the service
|
* v1.22 2007/05/30 - auto-discover service and port again
|
||||||
and port names.
|
- re-introduces auto-detecting of servicename and portname
|
||||||
|
- fixes #27325: Test fails with Test::Pod::Coverage v 1.06.
|
||||||
2006/11/03 only in the customized version
|
- Now build requires Test::More
|
||||||
Corrected the Check for the correct number of elements in complex types
|
- documentation update
|
||||||
|
- cosmetics
|
||||||
If a complex type is marked optional in a WSDL file, but sub-parts are marked as
|
|
||||||
required, SOAP::WSDL used to die if the complex type was found in the data.
|
2007/05/28 private methods made private and pod update
|
||||||
Now, if a complex type has not data associated and is not strictly required, it
|
- added pod tests
|
||||||
will not be encoded.
|
- made encodeComplexType and method generators private
|
||||||
|
- updated pod
|
||||||
A quick-and-dirty workaround is to turn off the check with
|
- fixed test scripts to work again from within/without t/
|
||||||
|
- moved development repository to
|
||||||
$soap->wsdl_checkoccurs(0);
|
https://svn.sourceforge.net/svnroot/soap-wsdl/ (finally !)
|
||||||
|
|
||||||
2006/11/02 only in the customized version
|
2007/05/21 updated base version to customized version from Giovanni S Fois
|
||||||
- small changes for .Net compatibility when encoding complex types
|
- merged in doc changes, so that they don't refer to "customized version"
|
||||||
- added some test cases to the test suite try perl t/3_varous.t for more details
|
- changed build process to Build.PL
|
||||||
|
- changed repository layout to support new build process
|
||||||
|
|
||||||
2006/10/28 only in the customized version
|
2006/11/06 only in the customized version
|
||||||
- added a small support for the complexType restrictions of Arrays
|
Added the support for default values in the wsdl file
|
||||||
|
|
||||||
2006/10/02 only in the customized version
|
2006/11/04 only in the customized version
|
||||||
(Thanks to Dan Horne for having spotted so many bugs in a row)
|
Changed the calling interface. Now it's driven by the by the service
|
||||||
- the xml prefix was used as the default wsdl namespace when looking for the complextype restrictions
|
and port names.
|
||||||
- the module crashed when the operation had no part declaration
|
|
||||||
- the port name stated in the service definition was used as the portType
|
2006/11/03 only in the customized version
|
||||||
- the test suited failed when the module was unzipped in a t.* named directory
|
Corrected the Check for the correct number of elements in complex types
|
||||||
|
|
||||||
|
If a complex type is marked optional in a WSDL file, but sub-parts are marked as
|
||||||
|
required, SOAP::WSDL used to die if the complex type was found in the data.
|
||||||
2006/09/15 only in the customized version
|
Now, if a complex type has not data associated and is not strictly required, it
|
||||||
(Thanks to Terje Kristensen for his support and twisted wsdl files :)
|
will not be encoded.
|
||||||
- cleaned up the code for readability
|
|
||||||
- cleaned up the code for "use warnings" and "use strict"
|
A quick-and-dirty workaround is to turn off the check with
|
||||||
- added support for wsdl files with multiple schema declarations
|
|
||||||
- added supporto for some restriction on complexTypes
|
$soap->wsdl_checkoccurs(0);
|
||||||
|
|
||||||
|
2006/11/02 only in the customized version
|
||||||
|
- small changes for .Net compatibility when encoding complex types
|
||||||
|
- added some test cases to the test suite try perl t/3_varous.t for more details
|
||||||
2006/07/10 only in the customized version
|
|
||||||
- added the support for SOAP::header calls
|
|
||||||
|
2006/10/28 only in the customized version
|
||||||
2006/06/10 only in the customized version
|
- added a small support for the complexType restrictions of Arrays
|
||||||
|
|
||||||
- removed the overload based on the type of the call's parameters
|
2006/10/02 only in the customized version
|
||||||
|
(Thanks to Dan Horne for having spotted so many bugs in a row)
|
||||||
- added an overloading support based on the unique name of the input message of the call. The input message must be provided by the calling script (sorry, the module has no mean to find this).
|
- the xml prefix was used as the default wsdl namespace when looking for the complextype restrictions
|
||||||
|
- the module crashed when the operation had no part declaration
|
||||||
- added a light support to the sympletypes.
|
- the port name stated in the service definition was used as the portType
|
||||||
|
- the test suited failed when the module was unzipped in a t.* named directory
|
||||||
- added a light support to the imported namespaces in the types section.
|
|
||||||
|
|
||||||
- added the support for the multiple SOAP bindings. The correct binding must be provided by the calling script (sorry, the module has no mean to find this).
|
|
||||||
|
2006/09/15 only in the customized version
|
||||||
- the method will use his own soapAction if defined
|
(Thanks to Terje Kristensen for his support and twisted wsdl files :)
|
||||||
|
- cleaned up the code for readability
|
||||||
- the method will use his own namespace if defined
|
- cleaned up the code for "use warnings" and "use strict"
|
||||||
|
- added support for wsdl files with multiple schema declarations
|
||||||
- some other code cleaning
|
- added supporto for some restriction on complexTypes
|
||||||
|
|
||||||
2006/04/23 only in the customized version
|
|
||||||
|
|
||||||
- corrected a bug related to the presence of the same method name on multiple
|
|
||||||
webservices
|
2006/07/10 only in the customized version
|
||||||
|
- added the support for SOAP::header calls
|
||||||
- added an overloading support based on the type of the call's parameters
|
|
||||||
|
2006/06/10 only in the customized version
|
||||||
- multiple extensions support added: a complextype can be an extension of a complextype which is an extension and so on
|
|
||||||
|
- removed the overload based on the type of the call's parameters
|
||||||
|
|
||||||
|
- added an overloading support based on the unique name of the input message of the call. The input message must be provided by the calling script (sorry, the module has no mean to find this).
|
||||||
Revision 1.7 2004/07/27 13:00:03 lsc
|
|
||||||
- added missing test file
|
- added a light support to the sympletypes.
|
||||||
|
|
||||||
Revision 1.18 2004/07/16 07:43:05 lsc
|
- added a light support to the imported namespaces in the types section.
|
||||||
fixed test scripts for windows
|
|
||||||
|
- added the support for the multiple SOAP bindings. The correct binding must be provided by the calling script (sorry, the module has no mean to find this).
|
||||||
Revision 1.17 2004/07/05 08:19:49 lsc
|
|
||||||
- added wsdl_checkoccurs
|
- the method will use his own soapAction if defined
|
||||||
|
|
||||||
Revision 1.16 2004/07/04 09:01:14 lsc
|
- the method will use his own namespace if defined
|
||||||
- change <definitions> element lookup from find('/definitions') and find('wsdl:definitions') to find('/*[1]') to process arbitrary default (wsdl) namespaces correctly
|
|
||||||
- fixed test output in test 06
|
- some other code cleaning
|
||||||
|
|
||||||
Revision 1.15 2004/07/02 12:28:31 lsc
|
2006/04/23 only in the customized version
|
||||||
- documentation update
|
|
||||||
- cosmetics
|
- corrected a bug related to the presence of the same method name on multiple
|
||||||
|
webservices
|
||||||
Revision 1.14 2004/07/02 10:53:36 lsc
|
|
||||||
- API change:
|
- added an overloading support based on the type of the call's parameters
|
||||||
- call now behaves (almost) like SOAP::Lite::call
|
|
||||||
- call() takes a list (hash) as second argument
|
- multiple extensions support added: a complextype can be an extension of a complextype which is an extension and so on
|
||||||
- call does no longer support the "dispatch" option
|
|
||||||
- dispatching calls can be suppressed by passing
|
|
||||||
"no_dispatch => 1" to new()
|
|
||||||
- dispatching calls can be suppressed by calling
|
Revision 1.7 2004/07/27 13:00:03 lsc
|
||||||
$soap->no_dispatch(1);
|
- added missing test file
|
||||||
and re-enabled by calling
|
|
||||||
$soap->no_dispatch(0);
|
Revision 1.18 2004/07/16 07:43:05 lsc
|
||||||
- Updated test skripts to reflect API change.
|
fixed test scripts for windows
|
||||||
|
|
||||||
Revision 1.13 2004/06/30 12:08:40 lsc
|
Revision 1.17 2004/07/05 08:19:49 lsc
|
||||||
- added IServiceInstance (ecmed) to acceptance tests
|
- added wsdl_checkoccurs
|
||||||
- refined documentation
|
|
||||||
|
Revision 1.16 2004/07/04 09:01:14 lsc
|
||||||
Revision 1.12 2004/06/26 14:13:29 lsc
|
- change <definitions> element lookup from find('/definitions') and find('wsdl:definitions') to find('/*[1]') to process arbitrary default (wsdl) namespaces correctly
|
||||||
- refined file caching
|
- fixed test output in test 06
|
||||||
- added descriptive output to test scripts
|
|
||||||
|
Revision 1.15 2004/07/02 12:28:31 lsc
|
||||||
Revision 1.11 2004/06/26 07:55:40 lsc
|
- documentation update
|
||||||
- fixed "freeze" caching bug
|
- cosmetics
|
||||||
- improved test scripts to test file system caching (and show the difference)
|
|
||||||
|
Revision 1.14 2004/07/02 10:53:36 lsc
|
||||||
Revision 1.10 2004/06/26 06:30:33 lsc
|
- API change:
|
||||||
- added filesystem caching using Cache::FileCache
|
- call now behaves (almost) like SOAP::Lite::call
|
||||||
|
- call() takes a list (hash) as second argument
|
||||||
Revision 1.9 2004/06/24 12:27:23 lsc
|
- call does no longer support the "dispatch" option
|
||||||
Cleanup
|
- dispatching calls can be suppressed by passing
|
||||||
|
"no_dispatch => 1" to new()
|
||||||
Revision 1.8 2004/06/11 19:49:15 lsc
|
- dispatching calls can be suppressed by calling
|
||||||
- moved .t files to more self-describing names
|
$soap->no_dispatch(1);
|
||||||
- changed WSDL.pm to accept AXIS wsdl files
|
and re-enabled by calling
|
||||||
- implemented XPath query result caching on all absolute queries
|
$soap->no_dispatch(0);
|
||||||
|
- Updated test skripts to reflect API change.
|
||||||
Revision 1.7 2004/06/07 13:01:16 lsc
|
|
||||||
added changelog to pod
|
Revision 1.13 2004/06/30 12:08:40 lsc
|
||||||
|
- added IServiceInstance (ecmed) to acceptance tests
|
||||||
|
- refined documentation
|
||||||
|
|
||||||
|
Revision 1.12 2004/06/26 14:13:29 lsc
|
||||||
|
- refined file caching
|
||||||
|
- added descriptive output to test scripts
|
||||||
|
|
||||||
|
Revision 1.11 2004/06/26 07:55:40 lsc
|
||||||
|
- fixed "freeze" caching bug
|
||||||
|
- improved test scripts to test file system caching (and show the difference)
|
||||||
|
|
||||||
|
Revision 1.10 2004/06/26 06:30:33 lsc
|
||||||
|
- added filesystem caching using Cache::FileCache
|
||||||
|
|
||||||
|
Revision 1.9 2004/06/24 12:27:23 lsc
|
||||||
|
Cleanup
|
||||||
|
|
||||||
|
Revision 1.8 2004/06/11 19:49:15 lsc
|
||||||
|
- moved .t files to more self-describing names
|
||||||
|
- changed WSDL.pm to accept AXIS wsdl files
|
||||||
|
- implemented XPath query result caching on all absolute queries
|
||||||
|
|
||||||
|
Revision 1.7 2004/06/07 13:01:16 lsc
|
||||||
|
added changelog to pod
|
||||||
|
|||||||
@@ -1,15 +1,18 @@
|
|||||||
Build.PL
|
Build.PL
|
||||||
CHANGES
|
CHANGES
|
||||||
HACKING
|
HACKING
|
||||||
lib/SOAP/WSDL.pm
|
lib/SOAP/WSDL.pm
|
||||||
MANIFEST This list of files
|
Makefile.PL
|
||||||
META.yml
|
MANIFEST This list of files
|
||||||
README
|
META.yml
|
||||||
t/1_performance.t
|
README
|
||||||
t/2_helloworld.NET.t
|
t/1_performance.t
|
||||||
t/3_various.t
|
t/2_helloworld.NET.t
|
||||||
t/97_pod.t
|
t/3_various.t
|
||||||
t/98_pod_coverage.t
|
t/4_auto_set_port.t
|
||||||
t/acceptance/helloworld.asmx.xml
|
t/5_same_transport.t
|
||||||
t/acceptance/helloworld.xml
|
t/97_pod.t
|
||||||
t/acceptance/test.wsdl.xml
|
t/98_pod_coverage.t
|
||||||
|
t/acceptance/helloworld.asmx.xml
|
||||||
|
t/acceptance/helloworld.xml
|
||||||
|
t/acceptance/test.wsdl.xml
|
||||||
|
|||||||
@@ -1,22 +1,19 @@
|
|||||||
---
|
---
|
||||||
name: SOAP-WSDL
|
name: SOAP-WSDL
|
||||||
version: 1.21
|
version: 1.27
|
||||||
author:
|
author: []
|
||||||
- |-
|
abstract: WSDL support for SOAP::Lite
|
||||||
Martin Kutter <martin.kutter@fen-net.de>
|
license: artistic
|
||||||
Giovanni S. Fois giovannisfois@tiscali.it
|
resources:
|
||||||
abstract: WSDL support for SOAP::Lite
|
license: http://opensource.org/licenses/artistic-license.php
|
||||||
license: artistic
|
requires:
|
||||||
resources:
|
SOAP::Lite: 0
|
||||||
license: http://opensource.org/licenses/artistic-license.php
|
XML::XPath: 0
|
||||||
requires:
|
provides:
|
||||||
SOAP::Lite: 0.55
|
SOAP::WSDL:
|
||||||
XML::XPath: 0
|
file: lib/SOAP/WSDL.pm
|
||||||
provides:
|
version: 1.27
|
||||||
SOAP::WSDL:
|
generated_by: Module::Build version 0.2808
|
||||||
file: lib/SOAP/WSDL.pm
|
meta-spec:
|
||||||
version: 1.21
|
url: http://module-build.sourceforge.net/META-spec-v1.2.html
|
||||||
generated_by: Module::Build version 0.28
|
version: 1.2
|
||||||
meta-spec:
|
|
||||||
url: http://module-build.sourceforge.net/META-spec-v1.2.html
|
|
||||||
version: 1.2
|
|
||||||
|
|||||||
+31
@@ -0,0 +1,31 @@
|
|||||||
|
# Note: this file was auto-generated by Module::Build::Compat version 0.03
|
||||||
|
|
||||||
|
unless (eval "use Module::Build::Compat 0.02; 1" ) {
|
||||||
|
print "This module requires Module::Build to install itself.\n";
|
||||||
|
|
||||||
|
require ExtUtils::MakeMaker;
|
||||||
|
my $yn = ExtUtils::MakeMaker::prompt
|
||||||
|
(' Install Module::Build now from CPAN?', 'y');
|
||||||
|
|
||||||
|
unless ($yn =~ /^y/i) {
|
||||||
|
die " *** Cannot install without Module::Build. Exiting ...\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
require Cwd;
|
||||||
|
require File::Spec;
|
||||||
|
require CPAN;
|
||||||
|
|
||||||
|
# Save this 'cause CPAN will chdir all over the place.
|
||||||
|
my $cwd = Cwd::cwd();
|
||||||
|
|
||||||
|
CPAN::Shell->install('Module::Build::Compat');
|
||||||
|
CPAN::Shell->expand("Module", "Module::Build::Compat")->uptodate
|
||||||
|
or die "Couldn't install Module::Build, giving up.\n";
|
||||||
|
|
||||||
|
chdir $cwd or die "Cannot chdir() back to $cwd: $!";
|
||||||
|
}
|
||||||
|
eval "use Module::Build::Compat 0.02; 1" or die $@;
|
||||||
|
|
||||||
|
Module::Build::Compat->run_build_pl(args => \@ARGV);
|
||||||
|
require Module::Build;
|
||||||
|
Module::Build::Compat->write_makefile(build_class => 'Module::Build');
|
||||||
@@ -20,13 +20,10 @@ need the following packages:
|
|||||||
|
|
||||||
INSTALLING
|
INSTALLING
|
||||||
|
|
||||||
Use the usual mantra:
|
perl Build.PL
|
||||||
|
perl Build
|
||||||
perl Makefile.PL
|
perl Build test
|
||||||
make
|
perl Build install
|
||||||
make test
|
|
||||||
make install
|
|
||||||
|
|
||||||
|
|
||||||
LICENSE
|
LICENSE
|
||||||
|
|
||||||
|
|||||||
+1573
-1241
File diff suppressed because it is too large
Load Diff
+107
-107
@@ -1,107 +1,107 @@
|
|||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
use strict;
|
use strict;
|
||||||
use Test;
|
use Test;
|
||||||
plan tests=> 11;
|
plan tests=> 11;
|
||||||
use Time::HiRes qw( gettimeofday tv_interval );
|
use Time::HiRes qw( gettimeofday tv_interval );
|
||||||
use lib '../lib';
|
use lib '../lib';
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
use Cwd;
|
use Cwd;
|
||||||
|
|
||||||
use SOAP::WSDL;
|
use SOAP::WSDL;
|
||||||
|
|
||||||
ok 1; # if we made it this far, we're ok
|
ok 1; # if we made it this far, we're ok
|
||||||
### test vars END
|
### test vars END
|
||||||
|
|
||||||
print "# Testing SOAP::WSDL ". $SOAP::WSDL::VERSION."\n";
|
print "# Testing SOAP::WSDL ". $SOAP::WSDL::VERSION."\n";
|
||||||
print "# Performance test with WSDL file\n";
|
print "# Performance test with WSDL file\n";
|
||||||
|
|
||||||
my $data = { name => 'Mein Name',
|
my $data = { name => 'Mein Name',
|
||||||
givenName => 'Vorname' };
|
givenName => 'Vorname' };
|
||||||
|
|
||||||
my $dir = cwd;
|
my $dir = cwd;
|
||||||
|
|
||||||
# chomp /t/ to allow running the script from t/ directory
|
# chomp /t/ to allow running the script from t/ directory
|
||||||
$dir=~s|/t/?||;
|
$dir=~s|/t/?$||;
|
||||||
|
|
||||||
my $t0 = [gettimeofday];
|
my $t0 = [gettimeofday];
|
||||||
|
|
||||||
{
|
{
|
||||||
ok( my $soap=SOAP::WSDL->new(
|
ok( my $soap=SOAP::WSDL->new(
|
||||||
wsdl => "file://$dir/t/acceptance/helloworld.asmx.xml",
|
wsdl => "file://$dir/t/acceptance/helloworld.asmx.xml",
|
||||||
no_dispatch => 1
|
no_dispatch => 1
|
||||||
) );
|
) );
|
||||||
|
|
||||||
print "# Test with NO caching\n";
|
print "# Test with NO caching\n";
|
||||||
print "# Create SOAP::WSDL object (".tv_interval ( $t0, [gettimeofday]) ."ms)\n" ;
|
print "# Create SOAP::WSDL object (".tv_interval ( $t0, [gettimeofday]) ."ms)\n" ;
|
||||||
|
|
||||||
|
|
||||||
$t0 = [gettimeofday];
|
$t0 = [gettimeofday];
|
||||||
eval{ $soap->wsdlinit(caching => 0) };
|
eval{ $soap->wsdlinit(caching => 0) };
|
||||||
unless ($@) {
|
unless ($@) {
|
||||||
ok(1);
|
ok(1);
|
||||||
} else {
|
} else {
|
||||||
ok 0;
|
ok 0;
|
||||||
print STDERR $@;
|
print STDERR $@;
|
||||||
}
|
}
|
||||||
print "# wsdl file init (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;;
|
print "# wsdl file init (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;;
|
||||||
|
|
||||||
$soap->readable(1);
|
$soap->readable(1);
|
||||||
$soap->wsdl_cache_store();
|
$soap->wsdl_cache_store();
|
||||||
$soap->servicename("Service1");
|
$soap->servicename("Service1");
|
||||||
$soap->portname("Service1Soap");
|
$soap->portname("Service1Soap");
|
||||||
|
|
||||||
$t0 = [gettimeofday];
|
$t0 = [gettimeofday];
|
||||||
ok( $soap->call("sayHello" , %{ $data }));
|
ok( $soap->call("sayHello" , %{ $data }));
|
||||||
print "# NO cache first call: (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
print "# NO cache first call: (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
||||||
|
|
||||||
$t0 = [gettimeofday];
|
$t0 = [gettimeofday];
|
||||||
ok($soap->call(sayHello => %{ $data }) );
|
ok($soap->call(sayHello => %{ $data }) );
|
||||||
print "# NO cache second call (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
print "# NO cache second call (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
||||||
|
|
||||||
$t0 = [gettimeofday];
|
$t0 = [gettimeofday];
|
||||||
for (my $i=1; $i<100; $i++) {
|
for (1..10) {
|
||||||
$soap->call(sayHello => %{ $data });
|
$soap->call(sayHello => %{ $data });
|
||||||
}
|
}
|
||||||
ok(1);
|
ok(1);
|
||||||
print "# NO cache: 100 x call (".tv_interval ( $t0, [gettimeofday]) ."s)\n";
|
print "# NO cache: 10 x call (".tv_interval ( $t0, [gettimeofday]) ."s)\n";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
print "# Test with caching ENABLED\n";
|
print "# Test with caching ENABLED\n";
|
||||||
|
|
||||||
$t0 = [gettimeofday];
|
$t0 = [gettimeofday];
|
||||||
ok(my $soap=SOAP::WSDL->new(
|
ok(my $soap=SOAP::WSDL->new(
|
||||||
wsdl => "file://$dir/t/acceptance/helloworld.asmx.xml",
|
wsdl => "file://$dir/t/acceptance/helloworld.asmx.xml",
|
||||||
no_dispatch => 1
|
no_dispatch => 1
|
||||||
) );
|
) );
|
||||||
print "# Create SOAP::WSDL object (".tv_interval ( $t0, [gettimeofday]) ."ms)\n" ;
|
print "# Create SOAP::WSDL object (".tv_interval ( $t0, [gettimeofday]) ."ms)\n" ;
|
||||||
-e "$dir/t/cache" or mkdir "$dir/t/cache";
|
-e "$dir/t/cache" or mkdir "$dir/t/cache";
|
||||||
|
|
||||||
$t0 = [gettimeofday];
|
$t0 = [gettimeofday];
|
||||||
eval{ $soap->wsdlinit(caching => 1,cache_directory =>"$dir/t/cache") };
|
eval{ $soap->wsdlinit(caching => 1,cache_directory =>"$dir/t/cache") };
|
||||||
unless ($@) {
|
unless ($@) {
|
||||||
ok(1);
|
ok(1);
|
||||||
} else {
|
} else {
|
||||||
ok 0;
|
ok 0;
|
||||||
print STDERR $@;
|
print STDERR $@;
|
||||||
}
|
}
|
||||||
print "# wsdl file init (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;;
|
print "# wsdl file init (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;;
|
||||||
$soap->readable(1);
|
$soap->readable(1);
|
||||||
$soap->servicename("Service1");
|
$soap->servicename("Service1");
|
||||||
$soap->portname("Service1Soap");
|
$soap->portname("Service1Soap");
|
||||||
|
|
||||||
$t0 = [gettimeofday];
|
$t0 = [gettimeofday];
|
||||||
ok( $soap->call("sayHello" , %{ $data }));
|
ok( $soap->call("sayHello" , %{ $data }));
|
||||||
print "# CACHE first call (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
print "# CACHE first call (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
||||||
|
|
||||||
$t0 = [gettimeofday];
|
$t0 = [gettimeofday];
|
||||||
ok($soap->call(sayHello => %{ $data }) );
|
ok($soap->call(sayHello => %{ $data }) );
|
||||||
print "# CACHE second call: (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
print "# CACHE second call: (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
||||||
|
|
||||||
$t0 = [gettimeofday];
|
$t0 = [gettimeofday];
|
||||||
for (my $i=1; $i<100; $i++) {
|
for (1..10) {
|
||||||
$soap->call(sayHello => %{ $data });
|
$soap->call(sayHello => %{ $data });
|
||||||
}
|
}
|
||||||
ok(1);
|
ok(1);
|
||||||
print "# CACHE: 100 x call (".tv_interval ( $t0, [gettimeofday]) ."s)\n";
|
print "# CACHE: 10 x call (".tv_interval ( $t0, [gettimeofday]) ."s)\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ my $data = {
|
|||||||
|
|
||||||
|
|
||||||
my $dir= cwd;
|
my $dir= cwd;
|
||||||
$dir=~s/\/t\/?//;
|
$dir=~s/\/t\/?$//;
|
||||||
|
|
||||||
my $t0 = [gettimeofday];
|
my $t0 = [gettimeofday];
|
||||||
ok( my $soap=SOAP::WSDL->new(wsdl => 'file:///'.$dir.'/t/acceptance/test.wsdl.xml',
|
ok( my $soap=SOAP::WSDL->new(wsdl => 'file:///'.$dir.'/t/acceptance/test.wsdl.xml',
|
||||||
|
|||||||
+109
-112
@@ -1,112 +1,109 @@
|
|||||||
#!/usr/bin/perl -w
|
#!/usr/bin/perl -w
|
||||||
use strict;
|
use strict;
|
||||||
use Test;
|
use warnings;
|
||||||
plan tests=> 8;
|
use diagnostics;
|
||||||
use Time::HiRes qw( gettimeofday tv_interval );
|
use Test::More tests=> 9;
|
||||||
use lib '../lib';
|
use Time::HiRes qw( gettimeofday tv_interval );
|
||||||
use Data::Dumper;
|
use lib '../lib';
|
||||||
use Cwd;
|
use Data::Dumper;
|
||||||
use SOAP::WSDL;
|
use Cwd;
|
||||||
|
use_ok qw/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 "# Various Features Test with WSDL file \n";
|
||||||
print "# Testing SOAP::WSDL ". $SOAP::WSDL::VERSION."\n";
|
|
||||||
print "# Various Features Test with WSDL file \n";
|
my $data = {name => 'Mein Name',
|
||||||
|
givenName => 'Vorname'};
|
||||||
my $data = {name => 'Mein Name',
|
|
||||||
givenName => 'Vorname'};
|
my $dir = cwd;
|
||||||
|
|
||||||
my $dir = cwd;
|
# chomp /t/ to allow running the script from t/ directory
|
||||||
|
$dir=~s|/t/?$||;
|
||||||
# chomp /t/ to allow running the script from t/ directory
|
|
||||||
$dir=~s|/t/?||;
|
my $t0 = [gettimeofday];
|
||||||
|
ok( my $soap=SOAP::WSDL->new(wsdl => "file://$dir/t/acceptance/helloworld.asmx.xml",
|
||||||
my $t0 = [gettimeofday];
|
no_dispatch => 1
|
||||||
ok( my $soap=SOAP::WSDL->new(wsdl => "file://$dir/t/acceptance/helloworld.asmx.xml",
|
));
|
||||||
no_dispatch => 1
|
|
||||||
));
|
print "# Create SOAP::WSDL object (".tv_interval ( $t0, [gettimeofday]) ."ms)\n" ;
|
||||||
|
|
||||||
print "# Create SOAP::WSDL object (".tv_interval ( $t0, [gettimeofday]) ."ms)\n" ;
|
$t0 = [gettimeofday];
|
||||||
|
eval{ $soap->wsdlinit(caching => 0) };
|
||||||
$t0 = [gettimeofday];
|
if ($@) {
|
||||||
eval{ $soap->wsdlinit(caching => 0) };
|
fail("wsdlinit");
|
||||||
unless ($@) {
|
print STDERR $@;
|
||||||
ok(1);
|
} else {
|
||||||
} else {
|
pass("wsdlinit");
|
||||||
ok 0;
|
}
|
||||||
print STDERR $@;
|
print "# wsdl file init (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;;
|
||||||
}
|
|
||||||
print "# wsdl file init (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;;
|
$soap->readable(1);
|
||||||
|
$soap->servicename("Service1");
|
||||||
$soap->readable(1);
|
$soap->portname("Service1Soap");
|
||||||
$soap->servicename("Service1");
|
|
||||||
$soap->portname("Service1Soap");
|
$t0 = [gettimeofday];
|
||||||
|
ok( $soap->call("sayHello" , %{ $data }), "call sayHello");
|
||||||
$t0 = [gettimeofday];
|
print "# Normal Call: (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
||||||
|
|
||||||
ok( $soap->call("sayHello" , %{ $data }));
|
$soap->servicename("Service2");
|
||||||
print "# Normal Call: (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
is( $soap->portname("Service2Soap"), 'Service2Soap' );
|
||||||
|
|
||||||
$soap->servicename("Service2");
|
$data = {name => 'Mein Name',
|
||||||
$soap->portname("Service2Soap");
|
givenName => 'Vorname'};
|
||||||
|
|
||||||
$data = {name => 'Mein Name',
|
$t0 = [gettimeofday];
|
||||||
givenName => 'Vorname'};
|
ok($soap->call(sayGoodBye => %{ $data }), "Multiple Services/Port Call" );
|
||||||
|
print "# Multiple Services/Port Call: (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
||||||
$t0 = [gettimeofday];
|
|
||||||
ok($soap->call(sayGoodBye => %{ $data }) );
|
$soap->servicename("Service2");
|
||||||
print "# Multiple Services/Port Call: (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
$soap->portname("Service2Soap");
|
||||||
|
$data = {name => 'Mein Name',
|
||||||
$soap->servicename("Service2");
|
givenName => 'Vorname',
|
||||||
$soap->portname("Service2Soap");
|
wsdl_input_name => 'firstOverload'
|
||||||
$data = {name => 'Mein Name',
|
};
|
||||||
givenName => 'Vorname',
|
|
||||||
wsdl_input_name => 'firstOverload'
|
$t0 = [gettimeofday];
|
||||||
};
|
|
||||||
|
my $xml = $soap->serializer->method( $soap->call(sayGoodByeOverload => %{ $data }) );
|
||||||
$t0 = [gettimeofday];
|
like($xml , qr/<name/, 'serialized overloaded method');
|
||||||
|
|
||||||
my $xml = $soap->serializer->method( $soap->call(sayGoodByeOverload => %{ $data }) );
|
$data = {
|
||||||
$xml =~ /<name/ and ok(1);
|
name => 'Mein Name',
|
||||||
|
givenName => 'Vorname',
|
||||||
$data = {
|
wsdl_input_name => 'secondOverload'
|
||||||
name => 'Mein Name',
|
};
|
||||||
givenName => 'Vorname',
|
|
||||||
wsdl_input_name => 'secondOverload'
|
$t0 = [gettimeofday];
|
||||||
};
|
$xml = $soap->serializer->method( $soap->call(sayGoodByeOverload => %{ $data }) );
|
||||||
|
unlike($xml , qr/<name/ , 'Overloaded calls');
|
||||||
$t0 = [gettimeofday];
|
|
||||||
$xml = $soap->serializer->method( $soap->call(sayGoodByeOverload => %{ $data }) );
|
print "# Overloaded Calls: (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
||||||
$xml !~ /<name/ and ok(1);
|
|
||||||
|
$soap->servicename("Service2");
|
||||||
print "# Overloaded Calls: (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
$soap->portname("Service2Soap");
|
||||||
|
$data = { name => 'Mein Name',
|
||||||
$soap->servicename("Service2");
|
'recipients' => [
|
||||||
$soap->portname("Service2Soap");
|
{user_name => 'Adam', last_name => "Eden"},
|
||||||
$data = { name => 'Mein Name',
|
{user_name => 'Eve',last_name => 'Apple'},
|
||||||
'recipients' => [
|
],
|
||||||
{user_name => 'Adam', last_name => "Eden"},
|
wsdl_input_name => 'thirdOverload'
|
||||||
{user_name => 'Eve',last_name => 'Apple'},
|
};
|
||||||
],
|
|
||||||
wsdl_input_name => 'thirdOverload'
|
$t0 = [gettimeofday];
|
||||||
};
|
$xml = $soap->serializer->method( $soap->call(sayGoodByeOverload => %{ $data }) );
|
||||||
|
|
||||||
$t0 = [gettimeofday];
|
my $xpath = new XML::XPath->new(xml=>$xml);
|
||||||
$xml = $soap->serializer->method( $soap->call(sayGoodByeOverload => %{ $data }) );
|
|
||||||
|
my @recipients = $xpath->findnodes('//recipients');
|
||||||
my $xpath = new XML::XPath->new(xml=>$xml);
|
if($recipients[0]->findvalue("user_name") eq "Adam" and
|
||||||
|
$recipients[0]->findvalue("last_name") eq "Eden" and
|
||||||
my @recipients = $xpath->findnodes('//recipients');
|
$recipients[1]->findvalue("user_name") eq "Eve" and
|
||||||
if($recipients[0]->findvalue("user_name") eq "Adam" and
|
$recipients[1]->findvalue("last_name") eq "Apple"){
|
||||||
$recipients[0]->findvalue("last_name") eq "Eden" and
|
ok(1);
|
||||||
$recipients[1]->findvalue("user_name") eq "Eve" and
|
}else{
|
||||||
$recipients[1]->findvalue("last_name") eq "Apple"){
|
ok(0);
|
||||||
ok(1);
|
}
|
||||||
}else{
|
print "# Restricted Arrays: (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
||||||
ok(0);
|
print "#End\n";
|
||||||
}
|
|
||||||
print "# Restricted Arrays: (".tv_interval ( $t0, [gettimeofday]) ."s)\n" ;
|
|
||||||
print "#End\n";
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
#!/usr/bin/perl -w
|
||||||
|
#######################################################################################
|
||||||
|
#
|
||||||
|
# 2_helloworld.t
|
||||||
|
#
|
||||||
|
# Acceptance test for message encoding, based on .NET wsdl and example code.
|
||||||
|
# SOAP::WSDL's encoding doesn't I<exactly> match the .NET example, because
|
||||||
|
# .NET doesn't always specify types (SOAP::WSDL does), and the namespace
|
||||||
|
# prefixes chosen are different (maybe the encoding style, too ? this would be a bug !)
|
||||||
|
#
|
||||||
|
########################################################################################
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use diagnostics;
|
||||||
|
use Test::More tests => 6;
|
||||||
|
use Time::HiRes qw( gettimeofday tv_interval );
|
||||||
|
use lib '../lib';
|
||||||
|
use Cwd;
|
||||||
|
use_ok qw/SOAP::WSDL/;
|
||||||
|
|
||||||
|
### test vars END
|
||||||
|
print "# Testing SOAP::WSDL ". $SOAP::WSDL::VERSION."\n";
|
||||||
|
print "# Acceptance test against sample output with simple WSDL\n";
|
||||||
|
|
||||||
|
my $data = {
|
||||||
|
name => 'test',
|
||||||
|
givenName => 'GIVENNAME',
|
||||||
|
test => {
|
||||||
|
name => 'TESTNAME',
|
||||||
|
givenName => 'GIVENNAME',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
my $dir= cwd;
|
||||||
|
$dir=~s/\/t\/?$//;
|
||||||
|
|
||||||
|
# print $dir;
|
||||||
|
my $url = $dir . '/t/acceptance/test.wsdl.xml';
|
||||||
|
die "no wsdl found" if (not -e $url);
|
||||||
|
ok( my $soap=SOAP::WSDL->new( wsdl => 'file:///'. $url ), "Create SOAP::WSDL object");
|
||||||
|
$soap->no_dispatch( 1 );
|
||||||
|
|
||||||
|
eval{ $soap->wsdlinit() };
|
||||||
|
unless ($@) {
|
||||||
|
pass "wsdlinit";
|
||||||
|
} else {
|
||||||
|
fail "wsdlinit - $@";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ok( $soap->call(sayHello => %{ $data }) , "SOAP call");
|
||||||
|
|
||||||
|
is( $soap->servicename() , 'Service1', "Auto-detected servicename");
|
||||||
|
is( $soap->portname() , 'Service1Soap', "Auto-detected portname");
|
||||||
|
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
# Addresses issue reported by David Bussenschutt
|
||||||
|
use Test::More tests => 1;
|
||||||
|
use lib '../lib';
|
||||||
|
use SOAP::Lite;
|
||||||
|
use SOAP::WSDL;
|
||||||
|
use File::Spec;
|
||||||
|
use File::Basename qw(dirname);
|
||||||
|
|
||||||
|
my $path = File::Spec->rel2abs( dirname __FILE__);
|
||||||
|
|
||||||
|
my $soap = SOAP::WSDL->new(
|
||||||
|
wsdl => "file://$path/acceptance/helloworld.asmx.xml"
|
||||||
|
);
|
||||||
|
my $transport = $soap->schema()->useragent()->protocols_forbidden(['file']);
|
||||||
|
|
||||||
|
# If it dies with 500 Access to 'file'..., wsdlinit uses the same UA...
|
||||||
|
eval { $soap->wsdlinit()};
|
||||||
|
ok index( $@, q{500 Access to 'file}) > 0;
|
||||||
|
|
||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
use Test::More;
|
use Test::More;
|
||||||
eval "use Test::Pod::Coverage 1.00";
|
eval { use Test::Pod::Coverage 1.08 };
|
||||||
plan skip_all => "Test::Pod::Coverage 1.00 required for testing POD" if $@;
|
plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD" if $@;
|
||||||
|
|
||||||
|
|
||||||
BEGIN
|
BEGIN
|
||||||
|
|||||||
Reference in New Issue
Block a user