Web Service calls from PHP using SOAP
Posted: 22 Feb 2012, 14:00
Right, so I have been trying to call a web service using php for the last 2 days.
So far I have managed to make it so that there are no exceptions, but I do get a fatal error because the execution time of 30 seconds was exceeded.
Here is my code:
Can you guys spot an error in my code (I masked out the uri on purpose), or do I need to call the guys responsible for the web service and ask them to sort out their service?
So far I have managed to make it so that there are no exceptions, but I do get a fatal error because the execution time of 30 seconds was exceeded.
Here is my code:
Code: Select all
<?php
try {
$client = new SoapClient(null, array('location' => 'http://localhost:8080/nuSoap/samples/kmq-4.php','uri' => '****'));
$result = $client->__soapCall('GetItemQuantityOnHand', array(new SoapParam('SB3510/BK', '001')));
printf("Result = %s\n", $result);
}
catch (Exception $e)
{
printf("Message = %s\n",$e->__toString());
}
?>