在我的 Rails(3.1) 应用程序中实现 SOAP 服务时,wash_out (0.9.0) 非常有帮助。我面临的一个小问题是,对于 SOAP 正文中的 XML 有效负载, < >
正在被替换为
< >
这是我的代码片段
render :soap => "<person><firstname>larry</firstname></person>"
输出是
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://www.w3.org/2001/12/soap-envelope">
<soap:Body>
<tns:index_response>
<value xsi:type="xsd:string"><person><firstname>larry</firstname></person></value>
</tns:index_response>
</soap:Body>
</soap:Envelope>
这是一个错误还是我可以通过一些配置或附加代码来解决这个问题。请帮忙。