soap php client to wcf webservice
Posted: Thu Feb 05, 2009 12:36 pm
Hello,
a friend published a webservice and now I would like to use it:
The webservice is written in wcf, the client in php:
interface of the webservice function:
He builds up one string with value and value 1 and tries to send it back.
The client coding:
This worked fine so far. Result was You entered: 1 | 0
But then I tried to pass several parameters, which didnt work.
The webservice receives the first paramter and ignores the following ones.
Result as well: You entered: 1 | 0 which should have been You entered: 1 | 3
Is there anything wrong with my php coding? How can i pass several parameters to a wcf platform?
thx in advance
tob1
a friend published a webservice and now I would like to use it:
The webservice is written in wcf, the client in php:
interface of the webservice function:
Code: Select all
Function GetData(ByVal value As Integer, ByVal value1 As Integer) As String
The client coding:
Code: Select all
$client = new
SoapClient(
"mywsdl"
);
$params = array('value'=>"1");
$webService = $client->GetData($params);
$wsResult = $webService->GetDataResult;
print $wsResult;
} catch (Exception $e) {
print 'Caught exception: '. $e->getMessage(). "\n";
}But then I tried to pass several parameters, which didnt work.
Code: Select all
$client = new
SoapClient(
"mywsdl"
);
$params = array('value'=>"1",'value1' => "3");
$webService = $client->GetData($params);
$wsResult = $webService->GetDataResult;
print $wsResult;
} catch (Exception $e) {
print 'Caught exception: '. $e->getMessage(). "\n";
}Result as well: You entered: 1 | 0 which should have been You entered: 1 | 3
Is there anything wrong with my php coding? How can i pass several parameters to a wcf platform?
thx in advance
tob1