Soap savon response.body不包含xml属性
我有以下savon响应:(包含注释和其他属性,如创建日期、创建用户、位置等)Soap savon response.body不包含xml属性,soap,response,savon,xml-attribute,Soap,Response,Savon,Xml Attribute,我有以下savon响应:(包含注释和其他属性,如创建日期、创建用户、位置等) 如果可能的话,我还需要在response.body中或通过任何其他可能的方式具有这些属性。有什么帮助吗?看起来像这样: <?xml version="1.0" encoding="UTF-8"?> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:rCR
如果可能的话,我还需要在response.body中或通过任何其他可能的方式具有这些属性。有什么帮助吗?看起来像这样:
<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:rCResponse xmlns:ns2="http://v2_0.customer.webservices.csx.dtv.com/">
<return ResponseCode="OK">
<CustomerID>2072</CustomerID>
<SignupDate>2013-11-13Z</SignupDate>
</LastUpdateInfo>
<Affiliation />
<Notes>
<Note createDate="2013-11-25T12:08:22.000Z" createUser="16" location="NCR">sixth note</Note>
<Note createDate="2013-11-21T08:43:42.000Z" createUser="PSTD" location="BOSSTON">second note</Note>
<Note createDate="2013-11-21T08:43:42.000Z" createUser="PSTD" location="BOSSTON">first note</Note>
<MaskData>false</MaskData>
</Notes>
<CustomerCards />
<MaskData>false</MaskData>
</return>
</ns2:rCResponse>
</S:Body>
</S:Envelope>
2072
2013-11-13Z
第六个音符
第二个音符
第一个音符
错误的
错误的
我怀疑当xml节点元素同时具有属性和值时会发生这种情况。对这种情况有什么见解吗?你的原始反应是什么样的?将response.xml打印为_xml
{: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/"}}
<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:rCResponse xmlns:ns2="http://v2_0.customer.webservices.csx.dtv.com/">
<return ResponseCode="OK">
<CustomerID>2072</CustomerID>
<SignupDate>2013-11-13Z</SignupDate>
</LastUpdateInfo>
<Affiliation />
<Notes>
<Note createDate="2013-11-25T12:08:22.000Z" createUser="16" location="NCR">sixth note</Note>
<Note createDate="2013-11-21T08:43:42.000Z" createUser="PSTD" location="BOSSTON">second note</Note>
<Note createDate="2013-11-21T08:43:42.000Z" createUser="PSTD" location="BOSSTON">first note</Note>
<MaskData>false</MaskData>
</Notes>
<CustomerCards />
<MaskData>false</MaskData>
</return>
</ns2:rCResponse>
</S:Body>
</S:Envelope>