anusha
anusha

Reputation: 2135

savon httperror 302 rails 3.2

I am using savon 2.11.1 gem to get soap request and responses in my rails application. I am creating client Object using

Savon.client(wsdl: "sample_url", ssl_verify_mode: :none)

and invoking

client.call(:method_name, hash)

When I invoke call method I am getting this error from savon.

HTTPError(302)

When I tried the URL from chrome soap client extension I am getting successful response.

Can anyone please help me on fixing this.

Thanks in Advance

Upvotes: 2

Views: 414

Answers (1)

anusha
anusha

Reputation: 2135

Finally I resolved the issue and thought of posting the answer as it might help someone.

We just need to use a global option "follow_redirects: true" in Savon client object. It works like a charm.

The code is: Savon.client(wsdl: "sample_url", ssl_verify_mode: :none, follow_redirects: true)

Thank you.

Upvotes: 3

Related Questions