Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7911039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:05:58+00:00 2026-06-03T13:05:58+00:00

I am making a soap call from inside a try…catch block, $request->l_Request->Year = $year;

  • 0

I am making a soap call from inside a try…catch block,

        $request->l_Request->Year = $year;      
//      $request->l_Request->Period = $period;      
        try {
            /**
             * 
             * perform getMake request
             * @var stdClass
             */
            $response = $client->getSeries($request);    
            $series = $response->getSeriesResult->Lookup_Struc;                                                                                
            return $series;                      
        } catch (SoapFault $exception) {                        
            /**
             * log exception on soap request
             */
            $this->getLogger()->log($exception->getMessage(), Zend_Log::ERR);
            $this->getLogger()->log($exception->getTraceAsString(), Zend_Log::INFO);
            return false;           
        }  catch (Exception $exception) {                           
            /**
             * log exception on soap request
             */
            $this->getLogger()->log($exception->getMessage(), Zend_Log::ERR);
            $this->getLogger()->log($exception->getTraceAsString(), Zend_Log::INFO);
            return false;           
        }  

Here’s how my output/error looks like

( ! ) Fatal error: SOAP-ERROR: Encoding: object has no ‘Period’
property in C:\wamp\www\FHH\library\Zend\Soap\Client.php on line 1121

But I am unable to catch soap-error using try catch, Is there special way to handle this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T13:06:02+00:00Added an answer on June 3, 2026 at 1:06 pm

    I use the following class in my applications to turn errors into exceptions:

    class ErrorHandler
    {
        public function __construct()
        {
            set_error_handler( array( __CLASS__, 'handleError' ));
        }
    
        static public function handleError( $errno, $errstr, $errfile,
                                            $errline, array $errcontext )
        {
            throw new ErrorException( $errstr, 0, $errno, $errfile, $errline );
        }
    }
    

    You just need to create an instance of it:

    $errorHandler = new ErrorHandler();
    

    An alternative if you’re using ZF1 MVC is to rename the constructor to __initErrorHandler() and add those two methods to your bootstrap class.

    I have successfully used this approach in code that uses Zend_Soap_Server, so hopefully it will work for you too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

currently making a SOAP request using Java's SOAPConnectionFactory and SOAPConnection 's .call() method, which
In SOAP-UI I am making a request to a web service like this: <soapenv:Envelope
I'm using Google Ads API for a while and making SOAP API request using
I am making a SOAP request using WCF to a third party service. The
I am making a SOAP web service call in a Java application to a
I am making a soap request which is returning the following: HTTP/1.1 200 OK
I am working on making a web service using soap. I'm stuck at trying
While I'm making SOAP or REST invocations to WCF, I'd like to have the
My wife recently started a business making soap bars and the soap labels have
I'm trying to write a simple SOAP client using SOAP::Lite . After making a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.