SoapHeaderMiddleware Example not working because of type error - how to use correctly? #542
Answered
by
veewee
trailsnail
asked this question in
Q&A
-
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.
Answered by
veewee
Sep 3, 2024
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.
0 replies
Answer selected by
trailsnail
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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