Kieff's arrow
[mediawiki.git] / soap / client.php
blobb9d75cfd2a1fb7782f6016ded1fdf5446cdf0470
1 <?php
3 if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {
4 print "This script must be run from the command line\n";
5 exit();
9 require_once('nusoap.php');
11 $t = 'Hello, World!';
13 $s = new soapclient( 'http://mediawiki.mormo.org:80/soap/' );
14 print "==echoString==\n";
15 $r = $s->call( 'echoString', array( $t ) );
17 print( $r . "\n" );
18 print( "Error: ".$s->getError() . "\n" );
20 print "\n\n==getArticle==\n";
21 $r = $s->call( 'getArticle', array( 'Frankfurt' ) );
23 print_r( $r );
24 print( "Error: ".$s->getError() . "\n" );
26 print "\n\n==getArticleByVersion==\n";
27 $r = $s->call( 'getArticleByVersion', array( 'Frankfurt am Main', 0 ) );
29 print_r( $r );
30 print( "Error: ".$s->getError() . "\n" );
32 print "\n\n==getArticleRevisions==\n";
33 $r = $s->call( 'getArticleRevisions', array( 'Frankfurt am Main' ) );
35 print_r( $r );
36 print( "Error: ".$s->getError() . "\n" );
38 print "\n\n==searchTitles==\n";
39 $r = $s->call( 'searchTitles', array( 'Frankfurt', 0 ) );
41 print_r( $r );
42 print( "Error: ".$s->getError() . "\n" );