Trying to consume a simple WCF service with PHP
Posted: Thu Oct 01, 2009 4:30 pm
Hi,
I has a simple WCF service that echos whatever string the user has fed it as an argument.
The problem is a null value is always sent to the service as an argument, instead of what the user has actually entered.
in the example above, instead of "some passed message", apparently null is sent.
I can return values back that are set INSIDE the service, but cant feed it any.
In addition, I thought that if I returned an object say, that contains [message] and [success],
I could access it by just typing echo but I can't do this. I can view the object using var_dump... it looks like this:
object(stdClass)#2 (1) {
["myCallResult"]=>
object(stdClass)#3 (1) {
["success"]=>
bool(false)
}
}
I has a simple WCF service that echos whatever string the user has fed it as an argument.
The problem is a null value is always sent to the service as an argument, instead of what the user has actually entered.
Code: Select all
$client = new SoapClient("http://apservice.com/Service/WCFGateway.svc?wsdl");
$retval = $client->getmessage("some passed message");I can return values back that are set INSIDE the service, but cant feed it any.
In addition, I thought that if I returned an object say, that contains [message] and [success],
I could access it by just typing echo
Code: Select all
$retval->message;object(stdClass)#2 (1) {
["myCallResult"]=>
object(stdClass)#3 (1) {
["success"]=>
bool(false)
}
}