我正在使用对返回 XML 的 Java Web 服务的服务引用,如下所示:
<m_score value="3"><Explanation value="20.51">Class Count</Explanation>
<Explanation value="-15.03">NCCI Governing Industry Group</Explanation>
<Explanation value="-9.74">Combined Weighted Average Hazard Score</Explanation>
<Explanation value="4.9">Policy Weighted Average Loss Cost Relative to Governing Class Loss Cost</Explanation>
<Explanation value="-2.96">Governing Class Loss Cost</Explanation>
</m_score>
问题是当我生成代理和请求/响应对象时,说明元素中的数据没有在对象中表示。每个元素中的属性只有属性。
有没有办法让解释名称也返回?例如,'NCCI Governing Industry Group'等...
谢谢!
编辑 - WSDL 的相关部分:
<complexType name="ExplanationType">
<attribute name="value" use="required"/>
</complexType>
<complexType name="m_scoreInsuredResponseType">
<sequence>
<element maxOccurs="unbounded" minOccurs="0" name="Explanation" type="response:ExplanationType"/>
</sequence>
<attribute name="value" use="required"/>
</complexType>