简体   繁体   中英

Unexpected subelement highLevelCategoryReq, Transaction Search

When updating our .wsdl files to the latest Yodlee SOAP API (2014_Q4), errors started being thrown in the area of the code where it wasn't before. There wasn't any change in the our code dealing with transaction searches. The error being thrown is

org.apache.axis2.databinding.ADBException: Unexpected subelement highLevelCategoryReq

Which is happening on a executeUserSearchRequest call, ie

Locators.transactionSearchService.executeUserSearchRequest(userContext, transactionSearchRequest)

The setting up of the searchRequest is practically the exact same as what is shown in the sample code (latest Java SDK sample code, with the folder named Aggregation12-JavaSampleApps ). A snippet is shown below

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 up to what is relevant is as follows

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)

Is this an error we are expected to catch and deal with, or is it indicative of some bigger underlying issue?

You need to use the right SOAP version end point. Since you are using 2014Q4 WSDLs , the endpoint to all the API calls should point to 2014Q4 version.

Example -

For transaction search - https://xxx.yodlee.com/yodsoap/services/TransactionSearchService_2014Q4

So please change the service version for all the URLs and it should resolve your problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM