我正在尝试使用来自axis2(版本1.6.1)的wsdl2
java生成一个Web服务客户端.
./wsdl2java.sh -uri http://www.ncbi.nlm.nih.gov/entrez/eutils/soap/v2.0/efetch_snp.wsdl
当我打电话给这项服务时,我得到一个例外.
org.apache.axis2.AxisFault:org.apache.axis2.databinding.ADBException:意外的子元素{http://www.ncbi.nlm.nih.gov/soap/eutils/efetch_snp}Rs
try { EFetchSnpServiceStub fetchService = new EFetchSnpServiceStub(); EFetchSnpServiceStub.EFetchRequest reqIdSnp = new EFetchSnpServiceStub.EFetchRequest(); reqIdSnp.setId("193925233"); EFetchSnpServiceStub.EFetchResult resIdSnp = fetchService.run_eFetch(reqIdSnp); } catch (Exception e) { System.out.println(e.toString()); }
<Rs rsId="193925233" snpClass="snp" snpType="notwithdrawn" molType="genomic" bitField="050000000005000000000100" taxId="3702">
我该如何解决这个异常? WSDL不在我的控制之下.