Romanticus
2007-12-11 12:46:44 UTC
Hi,
I have allready written some webservices with SCA in PHP for PHP clients
and all worked fine. Now I'm trying to use a PHP SCA webservice with a
C# Client and I have massive Problems getting a valid response.
This is the sourcecode of the webservice:
<?php
include "Log.php";
include "SCA/SCA.php";
/**
* @service
* @binding.soap
*/
class authorizationService {
/**
* @param string $username
* @param string $password
* @return string
*/
function login($username, $password) {
$logger = Log::factory('file', 'log.txt', 'WS');
$logger->log($username . "@" . $password);
$returnValue = $username . "@" . $password;
return $returnValue;
}
/**
* Ping-Function
*
* @return int
*/
function ping(){
$logger = Log::factory('file', 'log.txt', 'WS');
$logger->log("tadaaa!");
return time();
}
}
?>
I fixed the generated WSDL (wrong namespace of the types-element) and
created a C#-Proxy using the wsdl.exe-tool. When I try to invoke the
ping-method I always get 0 as response, when invoking the login-method I
get null. The log entries are written correctly, so the call reaches the
webservice. A PHP-Client gets the correct responses in case of ping the
timestamp and in case of login the string ***@password. What is
wrong with this service? I hope, somebody can help or point me to the
right direction.
Romanticus
I have allready written some webservices with SCA in PHP for PHP clients
and all worked fine. Now I'm trying to use a PHP SCA webservice with a
C# Client and I have massive Problems getting a valid response.
This is the sourcecode of the webservice:
<?php
include "Log.php";
include "SCA/SCA.php";
/**
* @service
* @binding.soap
*/
class authorizationService {
/**
* @param string $username
* @param string $password
* @return string
*/
function login($username, $password) {
$logger = Log::factory('file', 'log.txt', 'WS');
$logger->log($username . "@" . $password);
$returnValue = $username . "@" . $password;
return $returnValue;
}
/**
* Ping-Function
*
* @return int
*/
function ping(){
$logger = Log::factory('file', 'log.txt', 'WS');
$logger->log("tadaaa!");
return time();
}
}
?>
I fixed the generated WSDL (wrong namespace of the types-element) and
created a C#-Proxy using the wsdl.exe-tool. When I try to invoke the
ping-method I always get 0 as response, when invoking the login-method I
get null. The log entries are written correctly, so the call reaches the
webservice. A PHP-Client gets the correct responses in case of ping the
timestamp and in case of login the string ***@password. What is
wrong with this service? I hope, somebody can help or point me to the
right direction.
Romanticus