Skip to content
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

Support for custom converter and for using global env_namespace #172

Closed
wants to merge 2 commits into from
Closed

Conversation

walle
Copy link
Contributor

@walle walle commented Apr 1, 2011

Hello,

The commit adds support to use a custom converter when converting from symbol to action and input on the soap object in client.request. Technically the converter is a proc that gets called if the input is not a String and if Savon.converter is set.

The specs are passing and I have tried it on a project that uses CamelCase in the soap methods.

The commit does not alter any behavior, if you don't use the converter standard behavior is maintained.

Configure by setting the config.converter eg:

Savon.configure do |config|
  config.converter = proc { |input| input.to_s.camelize }
end

Here i use the camelize function in Rails.

Oops, my next commit was added here too. New to this :) Can I move it somehow?

Anyway, here the description of the last commit.

Adds support to only define env_namespace once. The spec passes and I have tested it on a project that uses the soapenv as env_namespace.

Config is the same as previous addition eg.

Savon.configure do |config|
  config.env_namespace = :soapenv
end

@rubiii
Copy link
Contributor

rubiii commented Apr 5, 2011

thank you very much for your time and work on this. i pulled the config.env_namespace commit and took your idea for the converter, but choose to implement it directly into Gyoku.

please take a look at the the changelog for more details.

oh, and it's already released: v0.9.0.

@rubiii rubiii closed this Apr 5, 2011
@ap-hunter
Copy link

Thanks for doing this. This drove me in circles for a few before I found out how to change the converter in Gyoku!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants