Below is the code to implement the webservice client in php using SOAP.
Please note to enable extension=php_soap.dll in php.ini
<?PHP
//Need to use below if need to download the response in PDF
header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="filename.pdf"');
$wcfClient = new SoapClient('<SERVICE URL>?wsdl');
$args = array('ID' => '234','EMPNO' => '','savetype' => '1');
$response = $wcfClient->Create_card($args) ;
echo $response->Create_PDFResult;
?>
Please note to enable extension=php_soap.dll in php.ini
<?PHP
//Need to use below if need to download the response in PDF
header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="filename.pdf"');
$wcfClient = new SoapClient('<SERVICE URL>?wsdl');
$args = array('ID' => '234','EMPNO' => '','savetype' => '1');
$response = $wcfClient->Create_card($args)
echo $response->Create_PDFResult;
?>
No comments:
Post a Comment