feat(Server): method called with apply#1115
Closed
bruno-brant wants to merge 1 commit intovpulim:masterfrom
bruno-brant:feature/add-support-for-this
Closed
feat(Server): method called with apply#1115bruno-brant wants to merge 1 commit intovpulim:masterfrom bruno-brant:feature/add-support-for-this
bruno-brant wants to merge 1 commit intovpulim:masterfrom
bruno-brant:feature/add-support-for-this
Conversation
…being called directly, which enables access to "this".The owning object for the method is the port, therefore, that's what is being passed as "this".
jsdevel
requested changes
Jul 15, 2020
| { | ||
| "name": "soap", | ||
| "version": "0.29.0", | ||
| "version": "0.31.0", |
Collaborator
There was a problem hiding this comment.
please revert this. maintainers will bump
Contributor
There was a problem hiding this comment.
@w666 -- it appears that you guys already have the tests covering this due to the nature of the change? The only thing holding this up was that premature version bump; once removed, this should OK, no?
Collaborator
There was a problem hiding this comment.
Added to my backlog. Will look a bit later this or next week.
Collaborator
There was a problem hiding this comment.
erm, can't easily check these changes, @bruno-brant has deleted forked repo. Will return to this later when have time.
smokhov
pushed a commit
to smokhov/node-soap
that referenced
this pull request
Jul 27, 2025
Method is "applied" instead of being called directly, which enables access to "this". The owning object for the method is the port, therefore, that's what is being passed as "this". Author: Bruno Brant <1890900+bruno-brant@users.noreply.github.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When using node-soap to create a soap server, one could prefer to declare and instantiate a class and pass that as the service object (although the current documentation does instruct developers to use anonymous objects). This would allow us to create more complex service implementations by using methods, properties, etc.
However, right now, doing so results in little gain since methods are being called directly, without correctly setting the "this" variable.
The correction is very simple, though: the owning object for
methodisport; it's just a question of instead of invoking it directly, just callapplyand pass theportas it'sthisvariable.