I am using ZEND framework, My requirement is below:
Client provided an XML file that i imported manually in my SoapUI and added certificate under "File->Preferences->SSL Settings->Key Store" and also supplied "Key Store Password" and set "Require Client authentication" true.
Then i changed request url with another one, after completing all above steps I can successfully get the response.
1- Import XML by adding new soap project
2- Add certificate under "File->Preferences->SSL Settings->Key Store" and also supplied "Key Store Password" and set "Require Client authentication" true/checked.
3- In XML file we have location: soap:address location= http://ift.tt/17gCOov
But after completing step 1 and 2, we changed the request url to http://ift.tt/17gCOox manually and it is working expected.
I did same thing in php/zend code
ini_set('soap.wsdl_cache_enabled',0);
ini_set('soap.wsdl_cache_ttl',0);
$certlocation = APPLICATION_ROOT . '/public/scripts/somename.pfx';
//$certlocation = APPLICATION_ROOT . '/public/scripts/example.ex.com.p7b';
//Used both above certs
$wsdlLocation = APPLICATION_ROOT . '/public/scripts/CommonIO.wsdl';
$options = array(
"trace" => 1,
"exceptions" => true,
"local_cert" => $certlocation,
/*"passphrase" => "somepassword",*/
"uri" => "urn:xmethods-delayed-quotes",
"style" => SOAP_RPC,
"use" => SOAP_ENCODED,
"soap_version" => SOAP_1_1,
"location" => "http://ift.tt/17gCOox"
);
$client = new SoapClient($wsdlLocation, $options);
Log_Manager::info('Soap Client Object Created successfully...'.$client);
//$client = new Zend_Soap_Client('http://ift.tt/17gCOoB', $options);
$response = $client->SomeMethod($request_obj);
In log I found "Soap Client Object Created successfully" printed even not sure Is it correct or not but I am able to create an object of SoapClient But just after that it thows an below exception (faultcode: HTTP, faultstring: Could not connect to host).
ReceiverSOAP Fault: (faultcode: HTTP, faultstring: Could not connect to host)
Any help is truly appreciated.
No comments:
Post a Comment