6 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/perl -w
use SOAP::Transport::HTTP;
SOAP::Transport::HTTP::CGI
-> dispatch_to('Demo')
-> handle;
package Demo;
sub hi {return "hello, world";}
sub bye {return "goodbye, cruel world";}
1
2
3
4
5
6
7
8
9
10
11
use strict;
use SOAP::Lite;
my $url = 'Pfad zur CGI Datei';
my $soap = SOAP::Lite
-> uri('urn:Demo') # Package
-> proxy($url) # CGI-Datei
-> readable(1)
-> hi() # auszufühende Methode
-> result # führe aus;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use strict;
use warnings;
use SOAP::Lite;
use HTTP::Headers;
my $url = 'http://my.example.com/soap/serv.pl'; # SOAP-Serverskript
my $http = new HTTP::Headers;
my $soap = SOAP::Lite
->uri('urn:Demo') # Package
->proxy($url) #CGI-Datei
->readable(1)
->hi() # auszufühende Methode
->result; # führe aus;
$http->header (Content_type => 'text/plain');
print $http->as_string, "\n", $soap;
use CGI::Carp qw(fatalsToBrowser);
1
2
3
4
5
6
7
8
9
10
Content-type: text/html
<h1>Software error:</h1>
<pre>500 Internal Server Error at soap-client.pl line 7
</pre>
<p>
For help, please send mail to this site's webmaster, giving this error message
and the time and date of the error.
</p>
my $soap = SOAP::Lite->uri('urn:Demo')->proxy($url)->readable(1)->hi()->result;
6 Einträge, 1 Seite |