
ksugihara
By: a guest on
Aug 17th, 2012 | syntax:
PHP | size: 0.85 KB | hits: 17 | expires: Never
//creating the stream context option containing the http headers
$ctx = stream_context_create($opts);
$soapClient = new SoapClient($wsdl,
array('location' => $api_endpoint,
'uri' => "urn:ConvertCurrency",
'soap_version' => SOAP_1_1,
'trace' => 1, //debugging option
'stream_context' => $ctx)); //adding the stream context option containing the http headers
$response = $soapClient->ConvertCurrency($params);
//The $response is a PreapprovalResponse type.
//Retriving few information from the response
debug($response);
} catch (SoapFault $e) {
echo "Error Id : ||" . $e->detail->FaultMessage->error->errorId. "<br/>";
echo "Error Message : ||" . $e->detail->FaultMessage->error->message;
}