we're trying to send a soap request to the purolator shipping API. We are stuck at the header portion.

This is what we are sending the shipping API:

  // Probleme ICI

        try {
  //Define the SOAP Envelope Headers
  $headers[] = new SoapHeader ( 'http://purolator.com/pws/datatypes/v1',
                                array (
                                        'Version'           =>  '1.4',
                                        'Language'          =>  'en',
                                        'GroupID'           =>  'xxx',
                                        'RequestReference'  =>  'Rating Example'
            ->get('Psr\Log\LoggerInterface')->debug('soapHeader created');

        } catch (\Exception $e) {
                //$debugData['result'] = ['error' => $e->getMessage(), 'code' => $e->getCode()];

  //Apply the SOAP Header to your client


                return $client;


It's simply not catching the error with the trap we made. What are we doing wrong?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.