Is there available any tool for PHP which can be used to generate code for consuming a web service based on its WSDL? Something comparable to clicking \"Add Web Reference\"
Say you were provided the following:
12345
and
true
003p0000006XKX3AAO
Abcdef1234567890
Let's say that accessing http://thesite.com/ said that the WSDL address is: http://thesite.com/PortalIntegratorService.svc?wsdl
$client = new SoapClient('http://thesite.com/PortalIntegratorService.svc?wsdl');
$result = $client->authenticateLogin(array('LoginId' => 12345));
if (!empty($result->authenticateLoginResult->RequestStatus)
&& !empty($result->authenticateLoginResult->UserName)) {
echo 'The username is: '.$result->authenticateLoginResult->UserName;
}
As you can see, the items specified in the XML are used in the PHP code though the LoginId value can be changed.