在Java中使用XStream解析SOAP XML响应

时间:2018-12-18 04:38:28

标签: java xml soap xstream

需要帮助将SOAP Response XML解析为Java Object。我想避免为父标记创建类。在示例XML下方:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
      <soapResponse success="true" xmlns="http://www.aurora-framework.org/schema">
         <RES_CNTXT>
            <VNDR>
               <records>
                  <record COMPANY="123" BUS_NUM="456" CRED_CD="789" />
                  <record COMPANY="321" BUS_NUM="654" CRED_CD="987" />
               </records>
            </VNDR>
         </RES_CNTXT>
         <RES_HDR>
            <NUM>121</NUM>
            <SEG>1</SEG>
            <COUNT>1</COUNT>
            <STATUS>SUCCESS</STATUS>
            <MESSAGE>SEND SUCCESSFULLY !</MESSAGE>
         </RES_HDR>
      </soapResponse>
   </soapenv:Body>
</soapenv:Envelope>

0 个答案:

没有答案