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

Setting an attribute on an element? #35

Closed
scottru opened this issue Feb 10, 2010 · 10 comments
Closed

Setting an attribute on an element? #35

scottru opened this issue Feb 10, 2010 · 10 comments

Comments

@scottru
Copy link

scottru commented Feb 10, 2010

I'm trying to pass an array, so I need to set a soapenc:arrayType attribute - i.e. the XML needs to look like

<level_one_tag_ids soapenc:arrayType="xsd:int[]">
    <level_one_tag_id>143</level_one_tag_id>
    <level_one_tag_id>118</level_one_tag_id>
</level_one_tag_ids>

I'm trying to find a way to do this with passing a hash rather than raw XML, but I can't seem to figure out how to set the attribute on the level_one_tag_ids element - I can nest, but I can't set the soapenc. Am I missing the syntax for this, or is this not possible?

Thanks!

@rubiii
Copy link
Contributor

rubiii commented Feb 10, 2010

setting an attribute on the request hash is not yet supported. but it's already on my todo list and will be supported in the next release. i'll leave this issue open until it's released.

@scottru
Copy link
Author

scottru commented Feb 10, 2010

Thanks. Is there any other way to create a typed array? If not, any estimate on the next release? Hoping to avoid using a different method. :) Thanks!

@rubiii
Copy link
Contributor

rubiii commented Feb 11, 2010

you can expect a new version incl. this feature by monday. it was requested several times already and i really need to implement it.

@scottru
Copy link
Author

scottru commented Feb 11, 2010

Excellent! Look forward to it.

@rubiii
Copy link
Contributor

rubiii commented Feb 14, 2010

fix delayed until tuesday/wednesday.

@csmuc
Copy link

csmuc commented Feb 19, 2010

need the attribute feature, too. Any news? Otherwise I'm going to implement a quick hack for the time being. Thx.

@rubiii
Copy link
Contributor

rubiii commented Feb 19, 2010

released version 0.7.5 including this feature.

please take a look at:
http://github.com/rubiii/savon/blob/master/lib/savon/core_ext/hash.rb#L11
http://github.com/rubiii/savon/blob/master/spec/savon/core_ext/hash_spec.rb#L107

i'm currently improving the documentation, so this is the only documentation right now.
hope this works for you.

@csmuc
Copy link

csmuc commented Feb 19, 2010

thx. diffs look good so far. werde es am Montag dann ausprobieren :)

@rubiii
Copy link
Contributor

rubiii commented Feb 19, 2010

great. feedback ist willkommen :)

@rubiii
Copy link
Contributor

rubiii commented Feb 22, 2010

should be closed with 0.7.5

calamitas pushed a commit to calamitas/savon that referenced this issue Jun 7, 2011
…rt for setting an attribute on any XML tag (issue savonrb#35) via :attributes!
This issue was closed.
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