I am facing weired issue for soap api on my development and production server.

We have itegrated bunch of 3rd party soap API which are fetching details from 3rd party and displaying data on our site.It is working very well.Most of time APIs working perfectly.It happen in some random period of time soap api response becomes null and we get 0 in api response.We had discuss with 3rd party service about that issue and they had replied after check their log that, they are providing each and every response raising from our end.Can any one guide me does it code base issue or server base issue? and how to get rid of it as it is loosing client's business because of it.

Below are functinal of our WSDL calling from PHP soap function.

We send request for validation to 3rd party api, and store temp. security key on our server. And use this security key as token for each api.while this random glitch happen we does not get any response in that case. below is my soap code for call wsdl api.

        $wsdl = 'URL';
        $options = array(
        'cache_wsdl' => 0,
        'trace' => 1,
        'stream_context' => stream_context_create(array(
              'ssl' => array(
                   'verify_peer' => 0,
                    'verify_peer_name' => 0,
                    'allow_self_signed' => 1

        $soapCall = new SoapClient($wsdl,$options);
        try {
                $response = $soapCall->__soapCall("API_FUNCTION", array($params));
                //Save records to log
                $requestParamLogs =  $soapCall->__getLastRequest();
                $responseParamLogs = $soapCall->__getLastResponse();                                                                    
        catch (SoapFault $e) {
            $requestParamLogs =  $soapCall->__getLastRequest();
            $responseParamLogs = $soapCall->__getLastResponse();                

While we are facing such random issue on our deployment and production server, we do not get such issue in local server.

Note: We are getting response of each API in postman without issue all time.

I have tried google for it, but do not get anything suitable solution for my case so anyone having an idea, please guide me.

0 Answers