怎么使用Ruby调用webservice时传入复杂类型

如何使用Ruby调用webservice时传入复杂类型
如题。一个C#开发的webservice,定义了比较复杂的数据类型,请问使用Ruby调用的时候,Ruby该怎么定义,比如下面的queryRingStatusEvt。

<?xml version="1.0" encoding="utf-16"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <QueryRingStatus xmlns="http://tempuri.org/">
      <queryRingStatusEvt>
        <AuthentAccount>1</AuthentAccount>
        <AuthentPwd>1</AuthentPwd>
        <OperateTypeNo>1</OperateTypeNo>
        <PhoneNumber>13000000001</PhoneNumber>
      </queryRingStatusEvt>
    </QueryRingStatus>
  </soap:Body>
</soap:Envelope>
------解决方案--------------------
引用:
 把这个xml数据作为对象框架实例化,应该怎么做呢?


目前好像没有太好的gem实现xml到对象的直接映射,不过你可以现在model里定义好数据模型,然后直接parse这个XML并赋值就好了
这里推荐一个parse XML的gem - nokorigi 速度很快,解析和生成XML都可以
这里是文档 http://nokogiri.org/

至于模型的定义,根据传入XML的标签属性来定义就行了。