-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
@paracycle was kind enough to track down these changes. I believe these changes may be valid for Output, but almost certainly not for Input. I had an opportunity to speak with @rubiii earlier about this and his thoughts were that it wasn't very surprising that this change broke a lot of real code. For one, it also changed specs. Secondly, there wasn't a real example of why this would need to be like this in the PR. Lastly, the end result of the code is overly complicated. I've just spent the last hour looking at the `input_output_for` method in Wasabi::Parser just to find out that this was pulling in a completely bogus request / response tag name in two thirds of the cases. My hopes are that this fix will fix the regression in Savon 2.3.x and we can stop worrying about this for Savon v3.
- Loading branch information
Showing
7 changed files
with
18 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d079227
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this change introduces a bug that improperly returns the operation_name in all cases when calling input_output_for
The following section of code is incorrect:
Fall back to the name of the binding operation
I believe it should be:
Fall back to the name of the binding operation
d079227
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, @cklatt, thanks for the feedback. That's basically how this code was prior to this commit. I'd like to discuss this more, ideally in a public way here on github, because I'm not entirely sure this was the absolute correct change to make.
Some context may help explain this from the point of view of Savon users. A year ago, @leoping issued pull request #15 where this changed, and it was merged in. Five months ago, this PR was merged in and closed and shortly afterwards a new version of Savon was released, and people started to complain about their requests erroneously having the string
Request
appended to the end of various message tags. From that point of view, it is clear that this change broke some functionality in Savon and that making this change in a minor version was probably not the correct thing to do.A short list of issues filed in Savon as a direct result of PR #15 should be
Now, I suspect we want something in between. Clearly sometimes we should use
message_type
orport_message_type
, but other times we need to fall back to the operation name. From what I can tell, the current logic is not sufficient. Further evidence for this comes from @davidsantoso who filed savonrb/savon#530 today. I verified that these changes actually broke his code, so it's clear that in some cases we do need to use the message type and not the operation name.Could you explain how you came to your conclusion, and maybe help clarify where this bug is? From the testing I've done, it's pretty clear that just reverting this to how it was a few days ago is not going to fix everything for everyone, so there must be a more subtle change needed. Do you use
Wasabi
on its own, or as part of another gem? How did you discover this was an issue?Thanks!
d079227
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @tjarratt, thanks for investigating and fixing this issue. It seems that this commit did not completely revert the original PR. If you look at this line that got removed in the original PR: https://github.com/savonrb/wasabi/pull/15/files#diff-7c3adc3042c46c5df567b221e60c3442L169
This would be the correct code to revert back to:
Thanks.
d079227
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @tjarratt, I've made #39 for the issue mentioned by @cklatt above.
I'm no wsdl expert, but I think a more thorough way to fix this is to have different fallback logic for operation input vs. output. For operation input, the fallback should be the original logic in input_for before #15, which is also what I reverted the logic to in #39.
For operation output however, it should be:
Look at this XML from a wsdl file that we're using for operation 'renewConversation' output 'impl:renewConversationResponse':
In this example:
Clearly, in this case port_message_type is a good candidate to fallback to if message_type is not found.
What do you think?
Thanks.