Vantiv/litle-sdk-for-java

Validation error whenever an error response is returned

Closed this issue · 1 comments

When the Litle API has an error condition, the sdk library does not handle it correctly, but instead chokes on validation of the response:

unexpected element (uri:"http://www.litle.com/schema/online", local:"litleOnlineResponse"). Expected elements are <{http://www.litle.com/schema}accountUpdater>,<{http://www.litle.com/schema}amexAggregatorData>,<{http://www.litle.com/schema}authInformation>,<{http://www.litle.com/schema}authReversal>,<{http://www.litle.com/schema}authReversalResponse>,<{http://www.litle.com/schema}authentication>,<{http://www.litle.com/schema}authorization>,<{http://www.litle.com/schema}authorizationResponse>,<{http://www.litle.com/schema}billMeLaterRequest>,<{http://www.litle.com/schema}billMeLaterResponseData>,<{http://www.litle.com/schema}billToAddress>,<{http://www.litle.com/schema}bmlProductType>,<{http://www.litle.com/schema}capture>,<{http://www.litle.com/schema}captureGivenAuth>,<{http://www.litle.com/schema}captureGivenAuthResponse>,<{http://www.litle.com/schema}captureResponse>,<{http://www.litle.com/schema}credit>,<{http://www.litle.com/schema}creditResponse>,<{http://www.litle.com/schema}customBilling>,<{http://www.litle.com/schema}customerInfo>,<{http://www.litle.com/schema}detailTax>,<{http://www.litle.com/schema}echeck>,<{http://www.litle.com/schema}echeckCredit>,<{http://www.litle.com/schema}echeckCreditResponse>,<{http://www.litle.com/schema}echeckOrEcheckToken>,<{http://www.litle.com/schema}echeckRedeposit>,<{http://www.litle.com/schema}echeckRedepositResponse>,<{http://www.litle.com/schema}echeckSale>,<{http://www.litle.com/schema}echeckSalesResponse>,<{http://www.litle.com/schema}echeckToken>,<{http://www.litle.com/schema}echeckVerification>,<{http://www.litle.com/schema}echeckVerificationResponse>,<{http://www.litle.com/schema}echeckVoid>,<{http://www.litle.com/schema}echeckVoidResponse>,<{http://www.litle.com/schema}enhancedAuthResponse>,<{http://www.litle.com/schema}enhancedData>,<{http://www.litle.com/schema}forceCapture>,<{http://www.litle.com/schema}forceCaptureResponse>,<{http://www.litle.com/schema}fraudResult>,<{http://www.litle.com/schema}healthcareAmounts>,<{http://www.litle.com/schema}healthcareIIAS>,<{http://www.litle.com/schema}lineItemData>,<{http://www.litle.com/schema}litleOnlineRequest>,<{http://www.litle.com/schema}litleOnlineResponse>,<{http://www.litle.com/schema}pos>,<{http://www.litle.com/schema}processingInstructions>,<{http://www.litle.com/schema}registerTokenRequest>,<{http://www.litle.com/schema}registerTokenResponse>,<{http://www.litle.com/schema}sale>,<{http://www.litle.com/schema}saleResponse>,<{http://www.litle.com/schema}shipToAddress>,<{http://www.litle.com/schema}transaction>,<{http://www.litle.com/schema}transactionResponse>,<{http://www.litle.com/schema}updateCardValidationNumOnToken>,<{http://www.litle.com/schema}updateCardValidationNumOnTokenResponse>,<{http://www.litle.com/schema}void>,<{http://www.litle.com/schema}voidResponse>. Stacktrace follows: javax.xml.bind.UnmarshalException: unexpected element (uri:"http://www.litle.com/schema/online", local:"litleOnlineResponse"). Expected elements are <{http://www.litle.com/schema}accountUpdater>,<{http://www.litle.com/schema}amexAggregatorData>,<{http://www.litle.com/schema}authInformation>,<{http://www.litle.com/schema}authReversal>,<{http://www.litle.com/schema}authReversalResponse>,<{http://www.litle.com/schema}authentication>,<{http://www.litle.com/schema}authorization>,<{http://www.litle.com/schema}authorizationResponse>,<{http://www.litle.com/schema}billMeLaterRequest>,<{http://www.litle.com/schema}billMeLaterResponseData>,<{http://www.litle.com/schema}billToAddress>,<{http://www.litle.com/schema}bmlProductType>,<{http://www.litle.com/schema}capture>,<{http://www.litle.com/schema}captureGivenAuth>,<{http://www.litle.com/schema}captureGivenAuthResponse>,<{http://www.litle.com/schema}captureResponse>,<{http://www.litle.com/schema}credit>,<{http://www.litle.com/schema}creditResponse>,<{http://www.litle.com/schema}customBilling>,<{http://www.litle.com/schema}customerInfo>,<{http://www.litle.com/schema}detailTax>,<{http://www.litle.com/schema}echeck>,<{http://www.litle.com/schema}echeckCredit>,<{http://www.litle.com/schema}echeckCreditResponse>,<{http://www.litle.com/schema}echeckOrEcheckToken>,<{http://www.litle.com/schema}echeckRedeposit>,<{http://www.litle.com/schema}echeckRedepositResponse>,<{http://www.litle.com/schema}echeckSale>,<{http://www.litle.com/schema}echeckSalesResponse>,<{http://www.litle.com/schema}echeckToken>,<{http://www.litle.com/schema}echeckVerification>,<{http://www.litle.com/schema}echeckVerificationResponse>,<{http://www.litle.com/schema}echeckVoid>,<{http://www.litle.com/schema}echeckVoidResponse>,<{http://www.litle.com/schema}enhancedAuthResponse>,<{http://www.litle.com/schema}enhancedData>,<{http://www.litle.com/schema}forceCapture>,<{http://www.litle.com/schema}forceCaptureResponse>,<{http://www.litle.com/schema}fraudResult>,<{http://www.litle.com/schema}healthcareAmounts>,<{http://www.litle.com/schema}healthcareIIAS>,<{http://www.litle.com/schema}lineItemData>,<{http://www.litle.com/schema}litleOnlineRequest>,<{http://www.litle.com/schema}litleOnlineResponse>,<{http://www.litle.com/schema}pos>,<{http://www.litle.com/schema}processingInstructions>,<{http://www.litle.com/schema}registerTokenRequest>,<{http://www.litle.com/schema}registerTokenResponse>,<{http://www.litle.com/schema}sale>,<{http://www.litle.com/schema}saleResponse>,<{http://www.litle.com/schema}shipToAddress>,<{http://www.litle.com/schema}transaction>,<{http://www.litle.com/schema}transactionResponse>,<{http://www.litle.com/schema}updateCardValidationNumOnToken>,<{http://www.litle.com/schema}updateCardValidationNumOnTokenResponse>,<{http://www.litle.com/schema}void>,<{http://www.litle.com/schema}voidResponse>

at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:642)
at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:254)
at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:249)
at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement(Loader.java:116)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext$DefaultRootLoader.childElement(UnmarshallingContext.java:1049)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:478)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:459)
at com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:148)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:211)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:184)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:157)
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:214)
at com.litle.sdk.LitleOnline.sendToLitle(LitleOnline.java:454)
at com.litle.sdk.LitleOnline.registerToken(LitleOnline.java:331)
at com.litle.sdk.LitleOnline.registerToken(LitleOnline.java:323)

I believe this issue is resolved. Feel free to reopen if not.