NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Problems with the examples ...


Joined: 09 Jun 2007
Posts: 4
Reply with quote
Hello there,

I am an experienced PHP developer but am new to NuSOAP.

I am trying to develop some simple web serves using NuSOAP but I cannot even get the simple examples to work. I am trying to
run them locally using Apache 2.2.4 and PHP v5.2 on Win XP HE

Here is my client:

<?php
require_once('nusoap.php');
$client = new soapclient('http://127.0.0.1/WS//helloserver.php');
$return = $client->call('hello', array('bob'));
print_r($return);
?>

Here is my server:

<?php
// Pull in the NuSOAP code
require_once('nusoap.php');
// Create the server instance
$server = new soap_server;
// Register the method to expose
$server->register('hello');
// Define the method as a PHP function
function hello($name) {
return 'Hello, ' . $name;
}
// Use the request to (try to) invoke the service
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);
?>

Whwn I run the client, I get this:

Array ( [faultcode] => Client [faultactor] => [faultstring] => error in msg parsing: xml was empty, didn't parse! [detail] => )

THe view source looks like this:

Array
(
[faultcode] => Client
[faultactor] =>
[faultstring] => error in msg parsing:
xml was empty, didn't parse!
[detail] =>
)

Why does't this simple code work ? Any advice would be appreciated ...

THanks,


Steven Matthews
View user's profileFind all posts by ksmatthewsSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7875
Reply with quote
Quote:
I am trying to run them locally using Apache 2.2.4 and PHP v5.2

if it is 5.2.2, just don't wate your time and replace this php with any other version, for example 5.2.3.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Problems with the examples ...
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic