将.wsdl文件更新为最新的Yodlee SOAP API(2014_Q4)时,错误开始在代码区域中抛出,而不是之前的错误。处理交易搜索的代码没有任何变化。抛出的错误是
org.apache.axis2.databinding.ADBException: Unexpected subelement highLevelCategoryReq
在executeUserSearchRequest
电话中发生了这种情况,即
Locators.transactionSearchService.executeUserSearchRequest(userContext, transactionSearchRequest)
searchRequest的设置几乎与示例代码中显示的完全相同(最新的Java SDK示例代码,名为Aggregation12-JavaSampleApps
的文件夹)。一个片段如下所示
val transactionSearchRange = new TransactionSearchResultRange()
transactionSearchRange.setStartNumber(startRange)
transactionSearchRange.setEndNumber(endRange)
val transactionSearchRequest = new TransactionSearchRequest()
val transactionSearchFilter = new TransactionSearchFilter
transactionSearchFilter.setTransactionSplitType(TransactionSplitType.ALL_TRANSACTION)
val itemAccountId = new ItemAccountId()
itemAccountId.setIdentifier(bankData.getItemAccountId)
transactionSearchFilter.setItemAccountId(itemAccountId)
transactionSearchRequest.setSearchFilter(transactionSearchFilter)
transactionSearchRequest.setIgnorePaymentTransactions(false)
transactionSearchRequest.setIncludeAggregatedTransactions(true)
transactionSearchRequest.setResultRange(transactionSearchRange)
transactionSearchRequest.setContainerType("all")
transactionSearchRequest.setSearchClients(TransactionSearchClients.DEFAULT_SERVICE_CLIENT)
transactionSearchRequest.setIgnoreUserInput(true)
Locators.transactionSearchService.executeUserSearchRequest(userContext, transactionSearchRequest)
Stacktrace到相关的内容如下
org.apache.axis2.databinding.ADBException: Unexpected subelement highLevelCategoryReq
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2973)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:333)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.yodlee.soap.core.transactionsearch.transactionsearchservice.TransactionSearchServiceSoapBindingStub.executeUserSearchRequest(TransactionSearchServiceSoapBindingStub.java:1019)
这是一个我们应该捕捉和处理的错误,还是表明一些更大的潜在问题?
答案 0 :(得分:2)
您需要使用正确的SOAP版本端点。由于您使用的是2014Q4 WSDL,因此所有API调用的端点都应指向2014Q4版本。
示例 -
对于交易搜索 - https://xxx.yodlee.com/yodsoap/services/TransactionSearchService_2014Q4
因此,请更改所有网址的服务版本,它应该可以解决您的问题。