Soap action can be set via the :soap_action key. #263
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, the symbol you pass to the
Savon::Client#request
method is used in both looking up the soap action in the WSDL, as well as creating the first element in the soap body. I'm using a service who's first element of the soap body is not the same as the soap action's name. As far as I could tell, there was no easy way to accomplish this with the current code base.One possibility is explicitly setting the
SOAPAction
header inside the request block, after the preconfigure has ran. I didn't like that option because the WSDL already has the soap action, and I don't like repeating it in the code. I like the automatic lookup that happens when you pass in a symbol.For this reason, I've added a
:soap_action
option in the hash parameter of the#request
method. Having the soap action name and first element of the soap body being different probably goes against the standard, but there are services out there that are written this way, and there was no "easy" way to do this with Savon.