# XMLRPC serialization bug?

**URL:** <https://www.ruby-forum.com/t/xmlrpc-serialization-bug/65807>\
**Category:** Ruby\
**Created:** [August 21, 2006, 4:27pm UTC](https://www.ruby-forum.com/t/xmlrpc-serialization-bug/65807 "2006-08-21T16:27:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrewkendall](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/b77776/32.png) [@andrewkendall](https://www.ruby-forum.com/u/andrewkendall)\
**Post date:** [August 21, 2006, 4:27pm UTC](https://www.ruby-forum.com/t/xmlrpc-serialization-bug/65807/1 "2006-08-21T16:27:43Z")

</div>

serializes the name / value parts of a struct in the wrong order?

If I do a calll as below

templatevalues = [:name=\>“code”,:value=\>“thecode”},{:name=\>“name”,  
:value=\>“the name” }]

result =  
server.call(“OrangeAPI.SendSmsTemplate”,{:username=\>"",:password=\>"",:“remote-ip”=\>""},  
{  
:templateValues =\> templatevalues  
})

BUG?: it always produces after serialization - with the value first,  
rather than the name

templateValues  
  
  
  
  
  
  
value  
the code

```
				<member>
					<name>name</name>
					<value><string>code</string></value>
				</member>
			</struct>
		</value>

		<value>
			<struct>
				<member>
					<name>value</name>
					<value><string>the name</string></value>
				</member>
				<member>
					<name>name</name>
					<value><string>name</string></value>
				</member>
			</struct>
		</value>
	</data>
</array>

```

I know you’re not supposed to assume any order in XML but is there any  
way around this?

Andrew

---

<div class="post-metadata">

**Author:** ![andrewkendall](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/b77776/32.png) [@andrewkendall](https://www.ruby-forum.com/u/andrewkendall)\
**Post date:** [August 21, 2006, 5:43pm UTC](https://www.ruby-forum.com/t/xmlrpc-serialization-bug/65807/2 "2006-08-21T17:43:44Z")

</div>

You probably know that Ruby’s Hash is unordered.
