请你帮我把以下的SOAP请求数据转换成java Collection,我试过但没有得到预期的结果。您可以在下面的第二部分中看到我已经从Java转换为SOAP请求的参考。
function foo(baz) {
baz(["A", "B"]);
}
var x = ["C"];
foo(function(bar) {
x = bar;
});
从java生成的以下xml如下所述。
<multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:Map" xmlns:ns2="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<item>
<key xsi:type="soapenc:string">orderIncrementId</key>
<value xsi:type="soapenc:string">ORD-4426</value>
</item>
<multiRef href="#id3"/>
</multiRef>
<multiRef id="id3" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:Map" xmlns:ns3="http://xml.apache.org/xml-soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<item>
<key xsi:type="soapenc:string">order_item_id</key>
<value xsi:type="soapenc:string">1229</value>
</item>
<item>
<key xsi:type="soapenc:string">qty</key>
<value xsi:type="soapenc:string">1</value>
</item>
</multiRef>
答案 0 :(得分:0)
我认为您的问题没有直接的答案 但是你可以尝试使用Jaxb(因为multi ref是一个xml)。您应该能够转换为java对象,并从那里提取任何所需的对象。