Joined: 01 Jul 2009 |
Posts: 2 |
|
|
 |
Posted: Tue Jun 30, 2009 8:48 pm |
|
 |
 |
 |
 |
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.
|