jax-ws webservice客户端只返回空对象

时间:2013-07-02 12:22:59

标签: java eclipse web-services jaxb jax-ws

我生成了一个Web服务客户端,Eclipse的助手传递了提供者Web服务的WSDL。

我在JUnit测试用例中生成要传递给Web Service的对象。

//After set properties of the request object
AbacusWebService wsAbacus = new AbacusWebService();
WebServiceResult wsResult = wsAbacus.irsValoration(requestObject);

使用Eclipse的监视器TCP-IP,我看到了请求和响应,两者都是正确的。响应返回数据:

<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>
  <irsValorationResponse xmlns="http://webServices.isban.es">
    <irsValorationReturn>
      <error xsi:nil="true"/>
      <format>dd/MM/yyyy</format>
      <pricingDate>02/09/2012</pricingDate>
      <results>
        <results>
          <bpv>-492.6493116525817</bpv>
          <cer xsi:nil="true"/>
          <chargeRunning xsi:nil="true"/>
          <chargeUpfront xsi:nil="true"/>
          <error xsi:nil="true"/>
          <gamma>0.004649336915463209</gamma>
          <gammaTotal xsi:nil="true"/>
          <minCerReturn xsi:nil="true"/>
          <name>IRS</name>
          <npv>46371.877687584296</npv>
          <payingNpv>0.0</payingNpv>
          <pricingDelta>433.0423619134596</pricingDelta>
          <receivingNpv>46371.877687584296</receivingNpv>
          <swapRate>0.9412756009346844</swapRate>
        </results>
      </results>
    </irsValorationReturn>
  </irsValorationResponse>
</soapenv:Body>

但是当我检查响应对象(wsResult)时,它们的所有属性都是null。

任何人都可以帮助我吗?

提前致谢。

0 个答案:

没有答案