-
-
Notifications
You must be signed in to change notification settings - Fork 27
Added the possibility to override the webservice location #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…e to load the WSDL from one place and to query a server that is different from the one specified in the WSDL
- Added tests for the location override feature
- Test for the location getter
- Renamed overrideTarget to withOverridenTarget() everywhere
…as passed a reference
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.
Thanks for digging into this and filing this PR! I like the direction this is heading!
#### withRequestTarget($requestTarget) | ||
|
||
This method allows you to change the destination of your SOAP calls. It returns a new Client instance | ||
with the specified request-target. |
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.
How does this relate to the getLocation()
method (and its name)?
This could also use some tests I suppose :-)
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 can rename to setLocation, but thought this may be confusing because getLocation and setLocation are not really getters / setter for the same thing.
This PR adds tests in tests/FunctionalTest.php.
src/Protocol/ClientEncoder.php
Outdated
@@ -35,4 +39,12 @@ public function __doRequest($request, $location, $action, $version, $one_way = 0 | |||
// do not actually block here, just pretend we're done... | |||
return ''; | |||
} | |||
|
|||
public function requestTarget($requestTarget) |
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.
How does this method name relate to the one in the Client
? It's my understanding that they should use related names?
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.
Oops. Will fix this.
d662a3c
to
340426a
Compare
ClientEncoder::requestTarget has been renamed to withRequestTarget now. |
This PR has now been open for nearly 4 months, the similar PR #7 by @floriansimon1 for over 2 1/2 years. How can I help to get this merged? |
@pascal-hofmann Thank you for your patience and thank you for looking into this! I've recently started working on this project again and I agree that it makes sense to have this feature. I will get back this PR as soon as time permits 👍 |
@floriansimon1 and @pascal-hofmann, again thank you for your patience and for working on this! I've finally(!) merged #38 which builds on top of your work and renamed this to Closed via #38 |
Allows to use a custom request-target for soap requests. Based on work from @floriansimon1 in #7.
I rebased on master, fixed the unit tests and renamed withTarget() to withRequestTarget(). I think this name is better (same name is used in PSR-7: RequestInterface::withRequestTarget()).