NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Getting some errors with my client/server web service files


Joined: 28 Dec 2006
Posts: 2
Reply with quote
CLIENT.PHP (service call file)

<html>

<head>
<title></title>
</head>

<body>

<?php
// Nusoap library 'nusoap.php' should be available through include_path directive
require_once('C:\webservicephp\lib\nusoap.php');

// set the URL or path to the WSDL document
$wsdl = 'C:\webservicephp\server.php';

// instantiate the SOAP client object
$soap = new soapclient($wsdl,"wsdl");

// set parameter name (string)
$name ="testtt";
$p = array($name);
// get the result, a native PHP type, such as an array or string
$result = $client->call('hello', $p);
?>

</body>

</html>



ERROR BEING OUTPUTTED

Fatal error: Call to a member function on a non-object in C:\webservicephp\php18D.tmp on line 23




SERVER.php (file that contains the actual call)

<?php
require_once('C:\webservicephp\lib\nusoap.php');
$server = new soap_server;

$server->configureWSDL('Client','http://soapinterop.org/');

$server->wsdl->schemaTargetNamespace = 'http://soapinterop.org/xsd/';

$server->register('hello');

function hello($name){
return "hello" . $name;
}

$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$server->service($HTTP_RAW_POST_DATA);
?>


ERRORS BEING DISPLAYED

Notice: Undefined index: HTTPS in C:\webservicephp\lib\nusoap.php on line 4006

Warning: Cannot modify header information - headers already sent by (output started at C:\webservicephp\lib\nusoap.php:4006) in C:\webservicephp\lib\nusoap.php on line 3281



I am at a lose in what to do here.. it seems like I have everything setup correctly... what could I be doing wrong? Even though questions like mine probably pop up millions of times on this message board.. I would really appreciate it if some one could assist me with this problem Very Happy



Thanx a bunch in advance Smile
View user's profileFind all posts by retrogamer4everSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
Quote:
$wsdl = 'C:\webservicephp\server.php'

this is not a correct WSDL.
You need URL there or WSDL (xml) file produced by the server.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
But what about the other errors?


Joined: 28 Dec 2006
Posts: 2
Reply with quote
Okay i have a incorrect file being used as the WSDL that solves the client side prob, but what about the server side?

Notice: Undefined index: HTTPS in C:\webservicephp\lib\nusoap.php on line 4006

Warning: Cannot modify header information - headers already sent by (output started at C:\webservicephp\lib\nusoap.php:4006) in C:\webservicephp\lib\nusoap.php on line 3281

are those two errors also being caused by not generating a wsdl file?
View user's profileFind all posts by retrogamer4everSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
Quote:
Warning: Cannot modify header information - headers

Once that Notice is "displayed", no headers could be issued.
You may want to turn off "display_errors"

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Getting some errors with my client/server web service files
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