Savon:如何在体内添加容器标签

时间:2015-06-18 11:49:03

标签: ruby-on-rails ruby savon

我想要使用的Web服务需要一个外部标记来保存所有正文标记。

像这样:

   <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://services.api.web.cg.igfs.xxx">
   <soapenv:Header/>
   <soapenv:Body>
      <ser:Init>
         <request>
            <tid>SOME_ID</tid>

如何添加封闭的请求标记?

在Savon中,client.call(:init,message:{tid:'SOME_ID',..})生成:

   <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://services.api.web.cg.igfs.xxx">
   <soapenv:Header/>
   <soapenv:Body>
      <ser:Init>
        <tid>SOME_ID</tid>

1 个答案:

答案 0 :(得分:1)

您应该只能将其添加到哈希

的顶部
2/2/15
2/2/15
2/2/15
______
3/2/15
3/2/15