Jump to content

Soap doesn't work


PallMallShow

Recommended Posts

Hi everybody,

 

for start this post, I note I'm French, and my English not sound like English :)

 

So, I've installed SkyFire on my ubuntu and phpmyadmin too.

 

I've my website on the serv (var/www).

 

I want to use SOAP, so I change my worldserver.conf et I modify Soap = 0 to Soap = 1 (for enabled this), after, I create a php script (with google :) ) but, Soap return to me a error.

 

 

Method 'ns1:executeCommand' not implemented: method name or namespace not recognized

I give to you my php Code, but i'm sure that is correct :

 

 

<?phpfunction ExecuteSoapCommand($command, $client){try //Try to execute function{$result = $client->executeCommand(new SoapParam($command, "command"));}catch(Exception $e) //Don't give fatal error if there is a problem{return array('sent' => false, 'message' => print_r($e));}return array('sent' => true, 'message' => $result);}// The above block takes in a string called $command and a soap client object. It returns an array that contains whether or not the command was successfully sent and the output (either trinity output or the exception).function getServerUptime($client){$cmd_msg = ".server info";$soap_output = ExecuteSoapCommand($cmd_msg, $client);echo print_r($soap_output);$array = explode(':', $soap_output['message']);$array2 = explode('.', $array[8]);return $array2[0];}// This block is an example of implementation. It sends the ".server info" command and parses the string so that only the uptime is left.$client = new SoapClient(NULL,array("location" => "http://127.0.0.1:7878/","uri" => "urn:TC","style" => SOAP_RPC,"login" => "PALLMALLSHOW","password" => "mdp"));echo getServerUptime($client);?>

For finish, I've test with 127.0.0.1, my domain et my IP address.

 

 

Tank you for you're help !

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.