1
我有以下萨翁响应:(含票据和其他属性,如创建日期,创建用户,位置等)萨翁response.body不包含XML属性
<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:getSomeAPIResponse xmlns:ns2="http://v2_0.some.webservices.csx.dtv.com/">
<return type="COMMENT" createDate="2013-11-21T10:32:17.000Z" createUser="5" location="BOSTON">my fifth note</return>
<return type="COMMENT" createDate="2013-11-21T09:04:18.000Z" createUser="POSSTD" location="BOSTON">fourth note</return>
<return type="COMMENT" createDate="2013-11-21T08:49:20.000Z" createUser="POSSTD" location="BOSTON">third note</return>
<return type="COMMENT" createDate="2013-11-21T08:43:42.000Z" createUser="POSSTD" location="BOSTON">second note</return>
<return type="COMMENT" createDate="2013-11-21T08:43:42.000Z" createUser="POSSTD" location="BOSTON">first note</return>
</ns2:getSomeAPIResponse >
</S:Body>
</S:Envelope>
当我尝试获得响应。体,它包含了笔记,但不是attribures如创建用户,创建日期,地点等,这些缺失,如:
{:get_some_api_response=>
{:return=>
["my fifth note",
"fourth note",
"third note",
"second note",
"first note"],
:"@xmlns:ns2"=>"http://v2_0.some.webservices.csx.dtv.com/"}}
我需要有这些属性为好,如果可能的话,在response.body,或通过任何其他可能的手段。请帮忙吗?
你的生理反应是怎样的?打印response.to_xml –