I have a WCF Service, the interfaces work fine when connecting with a c# application but when I connect using a PHP application all variables passed to the service are null.
This is the PHP code used to connect to the service and send the data.
$SelectedFolder = $_REQUEST['folder'];
var_dump($SelectedFolder);
try
{
$client = new SoapClient('http://localhost:8663/Service.svc?wsdl');
$Files = $client->GetAllLatestVersionsString($SelectedFolder);
}
The var dump displays the following
string 'Pictures/Sam开发者_JAVA技巧ple/' (length=16)
This is the service code
[OperationContract]
List<VersionedFileDataModel> GetAllLatestVersionsString(string partUri);
I've tried passing a static value instead of a variable and both times the value received by the service is null.
Thanks in Advance for any help,
Matt
Fixed it, I was required to pass the variables through using an array of params, for the example I posted I had to change the code to this.
try
{
$client = new SoapClient('http://localhost:8663/Service.svc?wsdl');
$params->partUri = $SelectedFolder;
$Files = $client->GetAllLatestVersionsString($params);
}
精彩评论