SoapHeaderMiddleware Example not working because of type error - how to use correctly? #542
-
Good morning again 🌞 I try to manipulate our soap header before sending the request. The given example here does not work because of type error:
Should I not use the Middleware or how it must be used? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It seems like you are injecting PHP's https://www.php.net/manual/en/class.soapheader.php instead of The provided example should work, given it is covered by unit tests: |
Beta Was this translation helpful? Give feedback.
It seems like you are injecting PHP's https://www.php.net/manual/en/class.soapheader.php instead of
Soap\Xml\Builder\SoapHeader
?The provided example should work, given it is covered by unit tests:
https://github.com/php-soap/psr18-transport/blob/main/tests/Unit/Middleware/SoapHeaderMiddlewareTest.php