Discussion:
Problems with SCA and a C#-Client
Romanticus
2007-12-11 12:46:44 UTC
Permalink
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
simonslaws-gM/Ye1E23mwN+
2007-12-11 13:25:01 UTC
Permalink
Post by Romanticus
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.
<?php
include "Log.php";
include "SCA/SCA.php";
/**
*/
class authorizationService {
/**
*/
function login($username, $password) {
$logger = Log::factory('file', 'log.txt', 'WS');
return $returnValue;
}
/**
* Ping-Function
*
*/
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
wrong with this service? I hope, somebody can help or point me to the
right direction.
Romanticus
Hi

The service looks good to me. You are saying that the request reaches
the service intact so there must be something wrong with the way that
we either describe or transmit the response. Do you have access to a
trace of the SOAP envelopes that are sent/received between client and
server? Also can you tell me what version of .Net you are using?

Regards

Simon
Silvano Girardi Jr
2007-12-11 13:31:27 UTC
Permalink
Hi Romanticus,
I was experiencing the same problem.

Please try this fix:

http://cvs.php.net/viewvc.cgi/pecl/sdo/SCA/Bindings/soap/Mapper.php?r1=1.2.4.1&r2=1.2.4.2&pathrev=FULMAR

--
Silvano Girardi Jr
Post by simonslaws-gM/Ye1E23mwN+
Post by Romanticus
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.
<?php
include "Log.php";
include "SCA/SCA.php";
/**
*/
class authorizationService {
/**
*/
function login($username, $password) {
$logger = Log::factory('file', 'log.txt', 'WS');
return $returnValue;
}
/**
* Ping-Function
*
*/
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
wrong with this service? I hope, somebody can help or point me to the
right direction.
Romanticus
Hi
The service looks good to me. You are saying that the request reaches
the service intact so there must be something wrong with the way that
we either describe or transmit the response. Do you have access to a
trace of the SOAP envelopes that are sent/received between client and
server? Also can you tell me what version of .Net you are using?
Regards
Simon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "phpsoa" group.
To post to this group, send email to phpsoa-/***@public.gmane.org
To unsubscribe from this group, send email to phpsoa-unsubscribe-/***@public.gmane.org
For more options, visit this group at http://groups.google.co.uk/group/phpsoa?hl=en
-~----------~----~----~----~------~----~------~--~---
Romanticus
2007-12-11 13:41:54 UTC
Permalink
Hi Silvano,

thx for the fast help - it worked! :)

Romanticus
Post by Silvano Girardi Jr
Hi Romanticus,
I was experiencing the same problem.
http://cvs.php.net/viewvc.cgi/pecl/sdo/SCA/Bindings/soap/Mapper.php?r1=1.2.4.1&r2=1.2.4.2&pathrev=FULMAR
<http://cvs.php.net/viewvc.cgi/pecl/sdo/SCA/Bindings/soap/Mapper.php?r1=1.2.4.1&r2=1.2.4.2&pathrev=FULMAR>
--
Silvano Girardi Jr
On Dec 11, 2007 10:25 AM,
On 11 Dec, 12:46, Romanticus
Post by Romanticus
Hi,
I have allready written some webservices with SCA in PHP for PHP
clients
Post by Romanticus
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.
<?php
include "Log.php";
include "SCA/SCA.php";
/**
*/
class authorizationService {
/**
*/
function login($username, $password) {
$logger = Log::factory('file', 'log.txt', 'WS');
return $returnValue;
}
/**
* Ping-Function
*
*/
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
Post by Romanticus
get null. The log entries are written correctly, so the call
reaches the
Post by Romanticus
webservice. A PHP-Client gets the correct responses in case of
ping the
Post by Romanticus
wrong with this service? I hope, somebody can help or point me to the
right direction.
Romanticus
Hi
The service looks good to me. You are saying that the request reaches
the service intact so there must be something wrong with the way that
we either describe or transmit the response. Do you have access to a
trace of the SOAP envelopes that are sent/received between client and
server? Also can you tell me what version of .Net you are using?
Regards
Simon
Continue reading on narkive:
Search results for 'Problems with SCA and a C#-Client' (Questions and Answers)
11
replies
how does sickle cell anemia provide evidence for evolution?
started 2012-10-07 20:33:18 UTC
biology
Loading...