覆盖 WSDL 的“soap:地址位置”价值?
是否可以覆盖 WSDL 中的“地址位置”值?我需要在 URL 中提供动态用户/密码。
这当然行不通:
client = Savon::Client.new("example.wsdl")
client.http.url = "https://foo:[email protected]"
Is it possible to override the "address location" value in a WSDL? I need to supply a dynamic user/password within the URL.
This certainly doesn't work:
client = Savon::Client.new("example.wsdl")
client.http.url = "https://foo:[email protected]"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您实际上只是想更改 URL,这对我有用:
在较新版本的
Savon
中,可以通过配置选项提供:If you're actually just trying to change the URL, this worked for me:
In newer versions of
Savon
it can be provided via configuration option:以下是如何提供动态用户/密码:
client.http.auth.basic "username", "password"
确保将“soap:address location”节点值修改回“https://example.com”。
Here's how to supply a dynamic user/pw:
client.http.auth.basic "username", "password"
Make sure to modify your "soap:address location" node value back to just "https://example.com".