【发布时间】:2014-05-07 08:28:43
【问题描述】:
我正在使用 savon 2 gem。如何将 xmlns 添加到消息标签而不是信封?
xml生成是这样的
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:tns="http://www.serviceurl.com/">
<soap:Body>
<tns:Search>
<Token>55</Token>
</tns:Search>
</soap:Body>
</soap:Envelope>
我需要这个
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Search xmlns="http://www.serviceurl.com/">
<Token>55</Token>
</Search>
</soap:Body>
</soap:Envelope>
即搜索 xmlns="http://www.serviceurl.com/"
【问题讨论】: