Skip to content

Commit

Permalink
add option to override URL used for calling SOAP actions
Browse files Browse the repository at this point in the history
  • Loading branch information
marinbek committed Aug 10, 2018
1 parent 1621ab7 commit 9263239
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion common.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ type Auth struct {
Password string
}
type Options struct {
HttpAuth Auth
HttpAuth Auth
OverrideActionURL string
}
7 changes: 6 additions & 1 deletion soap.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@ func (c *Client) Call(m string, p Params) (err error) {
return err
}

b, err := c.doRequest(c.Definitions.Services[0].Ports[0].SoapAddresses[0].Location)
url := c.Options.OverrideActionURL
if url == "" {
url = c.Definitions.Services[0].Ports[0].SoapAddresses[0].Location
}

b, err := c.doRequest(url)
if err != nil {
return err
}
Expand Down

0 comments on commit 9263239

Please sign in to comment.