4

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:bar@example.com"
John Saunders
  • 160,644
  • 26
  • 247
  • 397
chuck son
  • 194
  • 2
  • 8

2 Answers2

5

If you're actually just trying to change the URL, this worked for me:

client = Savon::Client.new("example.wsdl")
client.wsdl.endpoint = URI.parse "https://example.com"

In newer versions of Savon it can be provided via configuration option:

client = Savon::Client.new(wsdl: "example.wsdl",
                           endpoint: "https://example.com")
samuil
  • 5,001
  • 1
  • 37
  • 44
RTIndy
  • 148
  • 5
0

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".

chuck son
  • 194
  • 2
  • 8