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

Request Keys Case Mismatch on Upgrade to 2.x #395

Closed
mvastola opened this issue Feb 13, 2013 · 2 comments
Closed

Request Keys Case Mismatch on Upgrade to 2.x #395

mvastola opened this issue Feb 13, 2013 · 2 comments

Comments

@mvastola
Copy link

So I'm trying to upgrade to 2.x from 1.x and I'm experiencing a forward-compatibility problem I was hoping someone could help with (I think it's a bug but I'm not 100% sure..).

Basically I have a local WSDL document that I am referencing with the new 2.x syntax, and that seems to be working fine, except the WSDL document (which hasn't changed amidst the upgrade from 1.x to 2.x) specifies operation names such as getIP4Address.

When I try to run:

response = client.call(:getIP4Address, :message => { blah })

I get the following error:

ArgumentError: Unable to find SOAP operation: :getIP4Address
Operations provided by your service: [ ...... :get_ip4_address ..... ]

So basically it seems that when the WSDL doc was parsed, the operation names were taken from camelcase and underscored. My first qualm with this is that it's not out-of-the-box forward-compatible. More frustratingly, however, there doesn't seem to be an easy way to make this work. There's a convert_request_keys_to global option, but this seems to deal with the case of the request key symbols vs. the case of the tags in the XML request.

In my case, I really should be able to skip the hassle of changing my current code (where the request key case matches both the WSDL doc as well the case that the XML request needs to be in) to match some arbitrary casing for request keys that Savon uses internally.

Alternatively, I guess I could deal (although it would be a quite unintuitive and sort of silly) if there were some way to specify a global option for convert_request_keys_for_lookup_in_savon_service_operations_array_to :underscore

Please advise if there is some sort of workaround I can employ.

Thanks!

@ryanaghdam
Copy link

I have what seems like a similar problem and a "fix" that solves it for my needs in #389. Although my fix works with the WSDL I am using for my project, the fix does break the integration tests so it's not correct.

If the two are related, perhaps you could help me fix the code in my pull request -- if it solves the problems we are having.

@tjarratt
Copy link
Contributor

tjarratt commented Apr 1, 2015

Closing due to inactivity. I'm sorry that the transition from v1 to v2 was rocky, but it feels like we're now in a world where v2 is the one true, maintained version.

@tjarratt tjarratt closed this as completed Apr 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants