-
Notifications
You must be signed in to change notification settings - Fork 616
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
Savon 2.0.2 basic auth problem #367
Comments
that's pretty hard to debug without access to the server. request = HTTPI::Request.new
request.url = "http://some.valid.wsdl.url?wsdl"
request.auth.basic("login", "pass")
response = HTTPI.get(request) |
Thank you for such a quick response. Your above code is working and I confirm I get a wsdl document having substituted string for my valid ones. But my |
|
I have encountered this as well. It seems that the HTTP authentication credentials are not being passed into the WSDLRequest methods. If your WSDL requires HTTP authentication in order to retrieve it then it will fail. I have a small patch which seems to fix it for me. I'm opening a pull request now. |
+1. Thank you. I was on the trail of the same problem. Have access working with savon 1 but can't fetch wsdl in savon 2 because it's behind basic auth. |
Hmm. You might want a separate global for wsdl authorization e.g. :wsdl_basic_auth, than for request authorization :basic_auth, so that users who need basic auth for requests but not for wsdl aren't sending credentials during the wsdl fetch. Or just keep code as is in savon-2.0.2 and document that :basic auth is ignored by wsdl fetch, and the way to do it is |
I would vote for this issue to be solved. Having the same problem, luckilly I have a local WDSL as well to keep working with, but I prefer using the remote one. Credentials in my case are the same but I can imagine they differ in some situations. |
i would like to get this resolved as well, but i'm not sure about the best solution. is it save to apply basic auth for all wsdl requests or does this need to be another option like @DrXyzzy suggested? i'm really missing some kind of concept for this and i'm open for suggestions! |
related: #378 |
I'm not too experienced with SOAP nor savon, but in case my opinion is interesting for someone: For the two services I use in production, the same auth schema applies to WSDL and calls. So you could merge this patch and should there be a demand to run a different scheme for WSDL, you still can introduce new :wsdl_* style options that overwrite the other options for the WSDL request. |
+1 what @larskanis suggests. Try it and see. Maybe we don't need the complication of separate wsdl_ settings after all. My use case uses the same basic auth for wsdl and SOAP requests. |
I'll admit to being partial to the patch as-is, but I think it would be highly unusual to require different auth credentials between the WSDL and SOAP requests. I vote proceed with this as it solves a real problem a number of us are really experiencing. If an actual use-case for more independent settings for the WSDL arise then at that time it will hopefully be clearer what the implementation should look like (as far as which options need to be duplicated and supported, etc.) |
Ditto Christopher Mullins |
thanks for sharing your use cases. i just merged #369 and pushed to master. let me know if this works for you. |
I just tested with the master and a remote wdsl, and the merge is working for me! Thanks |
released v2.1.0. please refer to the updated changelog and documentation for details. let me know how it works! |
Hi Daniel, For me release 2.1 works fine! Thanks for all the work. Javinto Op 3 feb 2013, om 13:38 heeft Daniel Harrington het volgende geschreven:
|
thanks @javinto. you're welcome! |
Below is the HTTPI response produced by the above Savon request. I've printed it having added
require 'pp'; pp response
line to Wasabi::Resolver#load_from_remote method.I swear I do get a wsdl document in a browser having reached the wsdl url and having provided same basic auth credentials.
The text was updated successfully, but these errors were encountered: