1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| #!/usr/bin/perl
use WSDL::Generator;
my $init = {
'schema_namesp' => 'http://localhost/world/WorldFunctions.xsd',
'services' => 'WorldFunctions',
'service_name' => 'WorldFunctions',
'target_namesp' => 'http://localhost/world',
'documentation' => 'Simple Hello World SOAP Service.',
'location' => 'http://localhost/world'
};
my $w = WSDL::Generator->new($init);
WorldFunctions->Hello('Joe');
WorldFunctions->GoodBye('Joe');
print $w->get(WorldFunctions); # Returns the WSDL code for a specific class
open(TOTO,"<a.wsdl");
close(TOTO);
open(TOTO,">a.wsdl");
print TOTO $w->get(WorldFunctions);
close(TOTO); |
Partager