Skip to content

Add xml body nodes to each request #465

Answered by veewee
rico asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @rico ,

I can imagine it gets overwhelming... That's the downside of having it ultra flexible. :)
We do our best to document everything as good as possible, but feel free to improve the documentation.

There are a few ways to do this depending on your exact case:

  1. If you have to pass e.g. a token to every request, and this token is part of the generated soap types - then you can use an event listener to fill in this data at object level.
  2. If it's more like a soap-header that needs to be added, then it can be done trough a HTTP middleware.

If you think an event subscriber is the way to go:

The basics are covered here: https://github.com/phpro/soap-client/blob/master/docs/events.md

We …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by rico
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants