Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d8092299a | ||
|
|
90ea294d66 |
@@ -1,14 +1,56 @@
|
|||||||
$Log: CHANGES,v $
|
$Log: CHANGES,v $
|
||||||
Revision 1.6 2004/06/11 19:51:49 lsc
|
Revision 1.7 2004/07/27 13:00:03 lsc
|
||||||
- changed expansion mode
|
- added missing test file
|
||||||
|
|
||||||
Revision 1.5 2004/06/11 19:49:54 lsc
|
Revision 1.18 2004/07/16 07:43:05 lsc
|
||||||
|
fixed test scripts for windows
|
||||||
|
|
||||||
|
Revision 1.17 2004/07/05 08:19:49 lsc
|
||||||
|
- added wsdl_checkoccurs
|
||||||
|
|
||||||
|
Revision 1.16 2004/07/04 09:01:14 lsc
|
||||||
|
- 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
|
||||||
|
|
||||||
|
Revision 1.15 2004/07/02 12:28:31 lsc
|
||||||
|
- documentation update
|
||||||
|
- cosmetics
|
||||||
|
|
||||||
|
Revision 1.14 2004/07/02 10:53:36 lsc
|
||||||
|
- API change:
|
||||||
|
- call now behaves (almost) like SOAP::Lite::call
|
||||||
|
- call() takes a list (hash) as second argument
|
||||||
|
- 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
|
||||||
|
$soap->no_dispatch(1);
|
||||||
|
and re-enabled by calling
|
||||||
|
$soap->no_dispatch(0);
|
||||||
|
- Updated test skripts to reflect API change.
|
||||||
|
|
||||||
|
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
|
- moved .t files to more self-describing names
|
||||||
- changed WSDL.pm to accept AXIS wsdl files
|
- changed WSDL.pm to accept AXIS wsdl files
|
||||||
- implemented XPath query result caching on all absolute queries
|
- implemented XPath query result caching on all absolute queries
|
||||||
|
|
||||||
Revision 1.4 2004/06/11 12:12:20 lsc
|
Revision 1.7 2004/06/07 13:01:16 lsc
|
||||||
CPAN preparation
|
added changelog to pod
|
||||||
|
|
||||||
Revision 1.3 2004/06/11 11:59:51 lsc
|
|
||||||
Test commit
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ t/1_performance.t
|
|||||||
t/2_helloworld.NET.t
|
t/2_helloworld.NET.t
|
||||||
t/acceptance/helloworld.asmx.xml
|
t/acceptance/helloworld.asmx.xml
|
||||||
t/acceptance/helloworld.xml
|
t/acceptance/helloworld.xml
|
||||||
|
t/acceptance/test.wsdl.xml
|
||||||
WSDL.pm
|
WSDL.pm
|
||||||
MANIFEST
|
MANIFEST
|
||||||
README
|
README
|
||||||
|
|||||||
@@ -7,13 +7,13 @@ use XML::XPath;
|
|||||||
use Cache::FileCache;
|
use Cache::FileCache;
|
||||||
|
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
# use Carp;
|
|
||||||
use diagnostics;
|
# use diagnostics;
|
||||||
|
|
||||||
@ISA= qw(SOAP::Lite);
|
@ISA= qw(SOAP::Lite);
|
||||||
|
|
||||||
# let CVS handle this for you...
|
# let CVS handle this for you...
|
||||||
$VERSION = sprintf("%d.%02d", q$Revision: 1.17 $ =~ /(\d+)\.(\d+)/);
|
$VERSION = sprintf("%d.%02d", q$Revision: 1.19 $ =~ /(\d+)\.(\d+)/);
|
||||||
|
|
||||||
sub wsdlinit {
|
sub wsdlinit {
|
||||||
my $self=shift;
|
my $self=shift;
|
||||||
@@ -934,6 +934,16 @@ be stable from 1.14 on, and that is the part you'll use most frequently.
|
|||||||
|
|
||||||
=over
|
=over
|
||||||
|
|
||||||
|
=item * Check for the correct number of elements confused with complex types
|
||||||
|
|
||||||
|
If a complex type is marked optional in a WSDL file, but sub-parts are marked as
|
||||||
|
required, SOAP::WSDL will die if the complex type is not found in the data
|
||||||
|
(because it checks only for the occurence of simple type elements).
|
||||||
|
|
||||||
|
A quick-and-dirty workaround is to turn off the check with
|
||||||
|
|
||||||
|
$soap->wsdl_checkoccurs(0);
|
||||||
|
|
||||||
=item * Arrays of complex types are not checked for the correct number of elements
|
=item * Arrays of complex types are not checked for the correct number of elements
|
||||||
|
|
||||||
Arrays of complex types are just encoded and not checked for correctness etc.
|
Arrays of complex types are just encoded and not checked for correctness etc.
|
||||||
@@ -980,6 +990,12 @@ to the user.
|
|||||||
=head1 CHANGES
|
=head1 CHANGES
|
||||||
|
|
||||||
$Log: WSDL.pm,v $
|
$Log: WSDL.pm,v $
|
||||||
|
Revision 1.19 2004/07/27 13:00:03 lsc
|
||||||
|
- added missing test file
|
||||||
|
|
||||||
|
Revision 1.18 2004/07/16 07:43:05 lsc
|
||||||
|
fixed test scripts for windows
|
||||||
|
|
||||||
Revision 1.17 2004/07/05 08:19:49 lsc
|
Revision 1.17 2004/07/05 08:19:49 lsc
|
||||||
- added wsdl_checkoccurs
|
- added wsdl_checkoccurs
|
||||||
|
|
||||||
|
|||||||
+9
-2
@@ -4,6 +4,7 @@ use Test::More tests=> 7;
|
|||||||
use Time::HiRes qw( gettimeofday tv_interval );
|
use Time::HiRes qw( gettimeofday tv_interval );
|
||||||
use lib '../..';
|
use lib '../..';
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
use Cwd;
|
||||||
use_ok "SOAP::WSDL";
|
use_ok "SOAP::WSDL";
|
||||||
### test vars END
|
### test vars END
|
||||||
|
|
||||||
@@ -15,13 +16,19 @@ my $data = {
|
|||||||
givenName => 'Vorname'
|
givenName => 'Vorname'
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my $dir = cwd;
|
||||||
|
|
||||||
|
# chomp /t/ to allow running the script from t/ directory
|
||||||
|
$dir=~s|/t/?||;
|
||||||
|
|
||||||
my $t0 = [gettimeofday];
|
my $t0 = [gettimeofday];
|
||||||
ok( my $soap=SOAP::WSDL->new(
|
ok( my $soap=SOAP::WSDL->new(
|
||||||
wsdl => 'file:///home/lsc/eclipse3/workspace/SOAP/t/acceptance/helloworld.asmx.xml',
|
wsdl => "file://$dir/t/acceptance/helloworld.asmx.xml",
|
||||||
no_dispatch => 1
|
no_dispatch => 1
|
||||||
), "Create SOAP::WSDL object (".tv_interval ( $t0, [gettimeofday]) ."ms)" ); #->proxy('http://erlm5aqa.ww001.siemens.net/lasttest/helloworld/helloworld.asmx' );
|
), "Create SOAP::WSDL object (".tv_interval ( $t0, [gettimeofday]) ."ms)" ); #->proxy('http://erlm5aqa.ww001.siemens.net/lasttest/helloworld/helloworld.asmx' );
|
||||||
|
|
||||||
$soap->proxy('http://erlm5aqa.ww001.siemens.net/lasttest/helloworld/helloworld.asmx');
|
$soap->proxy('http://helloworld/helloworld.asmx');
|
||||||
|
|
||||||
$t0 = [gettimeofday];
|
$t0 = [gettimeofday];
|
||||||
ok($soap->wsdlinit(caching => 1), "wsdl file init (".tv_interval ( $t0, [gettimeofday]) ."s)" );;
|
ok($soap->wsdlinit(caching => 1), "wsdl file init (".tv_interval ( $t0, [gettimeofday]) ."s)" );;
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ use diagnostics;
|
|||||||
use Test::More tests => 5;
|
use Test::More tests => 5;
|
||||||
use Time::HiRes qw( gettimeofday tv_interval );
|
use Time::HiRes qw( gettimeofday tv_interval );
|
||||||
use lib '../..';
|
use lib '../..';
|
||||||
|
use Cwd;
|
||||||
use_ok "SOAP::WSDL";
|
use_ok "SOAP::WSDL";
|
||||||
### test vars END
|
### test vars END
|
||||||
print "Testing SOAP::WSDL ". $SOAP::WSDL::VERSION."\n";
|
print "Testing SOAP::WSDL ". $SOAP::WSDL::VERSION."\n";
|
||||||
@@ -39,14 +40,13 @@ my $data = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
my $t0 = [gettimeofday];
|
my $t0 = [gettimeofday];
|
||||||
my $dir=`pwd`;
|
my $dir= cwd;
|
||||||
chomp $dir;
|
|
||||||
$dir=~s/\/t//;
|
$dir=~s/\/t//;
|
||||||
ok( my $soap=SOAP::WSDL->new(
|
ok( my $soap=SOAP::WSDL->new(
|
||||||
wsdl => 'file:///'.$dir.'/t/acceptance/test.wsdl.xml',
|
wsdl => 'file:///'.$dir.'/t/acceptance/test.wsdl.xml',
|
||||||
no_dispatch => 1
|
no_dispatch => 1
|
||||||
), "Create SOAP::WSDL object (".tv_interval ( $t0, [gettimeofday]) ."s)" ); #->proxy('http://erlm5aqa.ww001.siemens.net/lasttest/helloworld/helloworld.asmx' );
|
), "Create SOAP::WSDL object (".tv_interval ( $t0, [gettimeofday]) ."s)" ); #->proxy('http://erlm5aqa.ww001.siemens.net/lasttest/helloworld/helloworld.asmx' );
|
||||||
$soap->proxy('http://erlm5aqa.ww001.siemens.net/lasttest/helloworld/helloworld.asmx');
|
$soap->proxy('http://helloworld/helloworld.asmx');
|
||||||
$t0 = [gettimeofday];
|
$t0 = [gettimeofday];
|
||||||
ok($soap->wsdlinit(), "WSDL init (".tv_interval ( $t0, [gettimeofday]) ."s)") ;
|
ok($soap->wsdlinit(), "WSDL init (".tv_interval ( $t0, [gettimeofday]) ."s)") ;
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ xmlns="http://schemas.xmlsoap.org/wsdl/">
|
|||||||
<service name="Service1">
|
<service name="Service1">
|
||||||
<port name="Service1Soap" binding="s0:Service1Soap">
|
<port name="Service1Soap" binding="s0:Service1Soap">
|
||||||
<soap:address
|
<soap:address
|
||||||
location="http://erlm5aqa.ww001.siemens.net/lasttest/helloworld/helloworld.asmx" />
|
location="http://helloworld/helloworld.asmx" />
|
||||||
</port>
|
</port>
|
||||||
</service>
|
</service>
|
||||||
</definitions>
|
</definitions>
|
||||||
|
|||||||
@@ -0,0 +1,105 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
|
||||||
|
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
||||||
|
xmlns:s="http://www.w3.org/2001/XMLSchema"
|
||||||
|
xmlns:s0="urn:HelloWorld"
|
||||||
|
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
|
||||||
|
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
|
||||||
|
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
|
||||||
|
targetNamespace="urn:HelloWorld"
|
||||||
|
xmlns="http://schemas.xmlsoap.org/wsdl/">
|
||||||
|
<types>
|
||||||
|
<s:schema elementFormDefault="qualified"
|
||||||
|
targetNamespace="urn:HelloWorld">
|
||||||
|
<s:element name="sayHello">
|
||||||
|
<s:complexType>
|
||||||
|
<s:sequence>
|
||||||
|
<s:element minOccurs="0" maxOccurs="1" name="name"
|
||||||
|
type="s:string" />
|
||||||
|
|
||||||
|
<s:element minOccurs="0" maxOccurs="1" name="givenName"
|
||||||
|
type="s:string" />
|
||||||
|
|
||||||
|
<s:element minOccurs="0" maxOccurs="1" name="test"
|
||||||
|
type="s0:test2" />
|
||||||
|
</s:sequence>
|
||||||
|
</s:complexType>
|
||||||
|
</s:element>
|
||||||
|
|
||||||
|
<s:element name="sayHelloResponse">
|
||||||
|
<s:complexType>
|
||||||
|
<s:sequence>
|
||||||
|
<s:element minOccurs="0" maxOccurs="1"
|
||||||
|
name="sayHelloResult" type="s:string" />
|
||||||
|
</s:sequence>
|
||||||
|
</s:complexType>
|
||||||
|
</s:element>
|
||||||
|
|
||||||
|
<s:complexType name="test2">
|
||||||
|
<s:sequence>
|
||||||
|
<s:element minOccurs="0" maxOccurs="1" name="name"
|
||||||
|
type="s:string" />
|
||||||
|
|
||||||
|
<s:element minOccurs="0" maxOccurs="1" name="givenName"
|
||||||
|
type="s:string" />
|
||||||
|
</s:sequence>
|
||||||
|
</s:complexType>
|
||||||
|
|
||||||
|
<s:complexType name="testExtended">
|
||||||
|
<s:extension base="s0:test2">
|
||||||
|
<s:sequence>
|
||||||
|
<s:element minOccurs="0" maxOccurs="1" name="extend"
|
||||||
|
type="s:string" />
|
||||||
|
</s:sequence>
|
||||||
|
</s:extension>
|
||||||
|
</s:complexType>
|
||||||
|
</s:schema>
|
||||||
|
</types>
|
||||||
|
|
||||||
|
<message name="sayHelloSoapIn">
|
||||||
|
<part name="parameters" element="s0:sayHello" />
|
||||||
|
|
||||||
|
<part name="test1" type="s0:testExtended" />
|
||||||
|
|
||||||
|
<part name="test2" type="s0:test2"
|
||||||
|
targetNamespace="urn:test2" />
|
||||||
|
</message>
|
||||||
|
|
||||||
|
<message name="sayHelloSoapOut">
|
||||||
|
<part name="parameters" element="s0:sayHelloResponse" />
|
||||||
|
</message>
|
||||||
|
|
||||||
|
<portType name="Service1Soap">
|
||||||
|
<operation name="sayHello">
|
||||||
|
<input message="s0:sayHelloSoapIn" />
|
||||||
|
|
||||||
|
<output message="s0:sayHelloSoapOut" />
|
||||||
|
</operation>
|
||||||
|
</portType>
|
||||||
|
|
||||||
|
<binding name="Service1Soap" type="s0:Service1Soap">
|
||||||
|
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
|
||||||
|
style="document" />
|
||||||
|
|
||||||
|
<operation name="sayHello">
|
||||||
|
<soap:operation soapAction="urn:HelloWorld#sayHello"
|
||||||
|
style="document" />
|
||||||
|
|
||||||
|
<input>
|
||||||
|
<soap:body use="literal" />
|
||||||
|
</input>
|
||||||
|
|
||||||
|
<output>
|
||||||
|
<soap:body use="literal" />
|
||||||
|
</output>
|
||||||
|
</operation>
|
||||||
|
</binding>
|
||||||
|
|
||||||
|
<service name="Service1">
|
||||||
|
<port name="Service1Soap" binding="s0:Service1Soap">
|
||||||
|
<soap:address
|
||||||
|
location="http://helloworld/helloworld.asmx" />
|
||||||
|
</port>
|
||||||
|
</service>
|
||||||
|
</definitions>
|
||||||
|
|
||||||
Reference in New Issue
Block a user