NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
nusoap error in live Linux server


Joined: 01 Jul 2009
Posts: 2
Reply with quote
I have created a NuSoap web service. It runs fine in my local Vista PC with XAMPP (PHP 5) installed

However when i upload to live server, I have problem calling the web service from my client. It show me an empty page.

This is my sample web service:

?wsdl

My client:




My Server code:

<?
// NuSoap API
require_once('lib/nusoap.php');


// create the server instance
$webServer = new soap_server();

$namespace = '?wsdl';
$webServer->configureWSDL('ws');
$webServer->wsdl->schemaTargetNamespace = $namespace;


$methodName = 'TestPrint';
$input = array('message' => 'xsd:string');
$output = array('return' => 'xsd:string');
$soapAction = false;
$style = 'rpc';
$use = 'encoded';
$description = 'A test print method';
$webServer->register($methodName, $input, $output, $namespace, $soapAction, $style, $use, $description);



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


function TestPrint($message)
{
return "This is a message: " . $message;
}
?>


My client code:

<?php

$client = new SoapClient(null, array('location' => "", 'uri' => "http://rhinosubmitws.rhinodirectory.com/"));
$result = $client->__soapCall('TestPrint', array('message' => 'WS message'));
printf($result);

?>



Do I need to set anything in php.ini file?
Thank in advace.
View user's profileFind all posts by wellsSend private message


Joined: 01 Jul 2009
Posts: 2
Reply with quote
This is my error:
Fatal error: Uncaught SoapFault exception: [Client] looks like we got no XML document in C:\xampp\htdocs\ws\client3live.php:4 Stack trace: #0 C:\xampp\htdocs\ws\client3live.php(4): SoapClient->__soapCall('TestPrint', Array) #1 {main} thrown in C:\xampp\htdocs\ws\client3live.php on line 4
View user's profileFind all posts by wellsSend private message
nusoap error in live Linux server
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