Re: Sample code configurations

binhanpham
Regular Visitor

Sample code configurations

I am using the MerchantLocatorApi, after configuring basic HTTP basic authorization, I failed the test using "mvn test". The error is : 

"Tests in error:
postmerchantLocatorTest(com.visa.developer.sample.merchant_locator_api.api.MerchantLocatorApiTest): Can not deserialize instance of java.lang.String out of START_ARRAY token(..) "

 

2 REPLIES 2
API_Products
Visa Developer Support Specialist

Re: Sample code configurations

Hey @binhanpham,

 

I'm happy to help you resolve the issue. To continue, please provide the following information:

1. Endpoint
2. Request Header
3. Request Body
4. Response Header (include the x-correlation-id)
5. Response Body

Using SoapUI, you can find the x-correlation-id in the Raw Tab of the response header.

 




Thanks,

Diana H.



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.

binhanpham
Regular Visitor

Re: Sample code configurations

I think I should clarify the issue I am facing, so I am still able to test the connection correctly through Visa Developer Playground. However when I am trying to issue the "mvn test" command with maven, it failed and pointed back to this statement in MerchantLocatorApiTest.java :
 
String jsonPayload = transformPayload("{\"responseAttrList\": [\"GNLOCATOR\"], \"header\": {\"messageDateTime\"\"2016-04-12T22:41:17.903\"\"startIndex\"\"0\"\"requestMessageId\"\"Request_001\"}, \"searchOptions\": {\"matchScore\"\"true\"\"maxRecords\"\"5\"\"matchIndicators\"\"true\"}, \"searchAttrList\": {\"distance\"\"2\"\"merchantName\"\"Starbucks\"\"longitude\"\"-121.929163\"\"merchantCountryCode\"\"840\"\"distanceUnit\"\"M\"\"latitude\"\"37.363922\"}}");