netbeans SOAP操作返回null,但是在SOAPUI中可以正常工作

时间:2018-11-20 09:51:53

标签: java soap netbeans

我将用于服务的wsdl文件导入到Netbeans Java项目中,并且其中一项操作无法正常工作-返回null int数组。但是在SOAPUI中一切正常enter image description here

Netbeans SOAP请求为

<?xml version="1.0" ?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><ns2:getDefectsQueueRequest xmlns:ns2="eds:DefectsService"><OrgID>600</OrgID></ns2:getDefectsQueueRequest></S:Body></S:Envelope>

Netbeans回复为

<?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><getDefectsQueueResponse xmlns=""><RegNums><RegNum>174272</RegNum><RegNum>174273</RegNum><RegNum>174274</RegNum></RegNums></getDefectsQueueResponse></soapenv:Body></soapenv:Envelope>

SOAPUI请求为

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:eds="eds:DefectsService">
   <soapenv:Header/>
   <soapenv:Body>
      <eds:getDefectsQueueRequest>
         <OrgID>600</OrgID>
      </eds:getDefectsQueueRequest>
   </soapenv:Body>
</soapenv:Envelope>

SOAPUI响应为

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <getDefectsQueueResponse>
         <RegNums>
            <RegNum>174272</RegNum>
            <RegNum>174273</RegNum>
            <RegNum>174274</RegNum>
         </RegNums>
      </getDefectsQueueResponse>
   </soapenv:Body>
</soapenv:Envelope>

响应中有正确的数据,但是dqr.getRegNums().getItem()返回null

0 个答案:

没有答案