didn't mean to commit that comment
[lhc/web/wiklou.git] / soap / client.php
1 <?php
2
3 if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {
4 print "This script must be run from the command line\n";
5 exit();
6 }
7
8
9 require_once('nusoap.php');
10
11 $t = 'Hello, World!';
12
13 $s = new soapclient( 'http://mediawiki.mormo.org:80/soap/' );
14 print "==echoString==\n";
15 $r = $s->call( 'echoString', array( $t ) );
16
17 print( $r . "\n" );
18 print( "Error: ".$s->getError() . "\n" );
19
20 print "\n\n==getArticle==\n";
21 $r = $s->call( 'getArticle', array( 'Frankfurt' ) );
22
23 print_r( $r );
24 print( "Error: ".$s->getError() . "\n" );
25
26 print "\n\n==getArticleByVersion==\n";
27 $r = $s->call( 'getArticleByVersion', array( 'Frankfurt am Main', 0 ) );
28
29 print_r( $r );
30 print( "Error: ".$s->getError() . "\n" );
31
32 print "\n\n==getArticleRevisions==\n";
33 $r = $s->call( 'getArticleRevisions', array( 'Frankfurt am Main' ) );
34
35 print_r( $r );
36 print( "Error: ".$s->getError() . "\n" );
37
38 print "\n\n==searchTitles==\n";
39 $r = $s->call( 'searchTitles', array( 'Frankfurt', 0 ) );
40
41 print_r( $r );
42 print( "Error: ".$s->getError() . "\n" );
43
44 ?>
45