Amazon MWS Getting Started

I recently looked at Amazon MWS and wanted to develop one for it. I have a seller account and uploaded data for java. I turned on all .jars and opened ListOrderItemsSample.java. There I install sellerId, mwsAuthTokenand amazonOrderId. Going into the code, I also copied MarketplaceWebServiceOrdersSampleConfig.javainto my project and installed all the necessary lines there. I have not changed anything. The problem is that the program throws an exception.

After console exit, where is the Test.javafile ListOrderItemsSample.java:

Service Exception:Exception in thread "main" 
Message: null
StatusCode: 0
ErrorCode: null
ErrorType: null
com.amazonservices.mws.orders._2013_09_01.MarketplaceWebServiceOrdersException
    at com.amazonservices.mws.orders._2013_09_01.MarketplaceWebServiceOrdersClient$RequestType.wrapException(MarketplaceWebServiceOrdersClient.java:143)
    at com.amazonservices.mws.client.MwsConnection.call(MwsConnection.java:429)
    at com.amazonservices.mws.orders._2013_09_01.MarketplaceWebServiceOrdersClient.listOrderItems(MarketplaceWebServiceOrdersClient.java:75)
    at Test.invokeListOrderItems(Test.java:44)
    at Test.main(Test.java:89)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    at java.lang.String.substring(String.java:1967)
    at com.amazonservices.mws.client.MwsConnection$ServiceEndpoint.<init>(MwsConnection.java:102)
    at com.amazonservices.mws.client.MwsConnection.getServiceEndpoint(MwsConnection.java:398)
    at com.amazonservices.mws.client.MwsConnection.newCall(MwsConnection.java:687)
    at com.amazonservices.mws.client.MwsConnection.call(MwsConnection.java:420)
    ... 3 more

Did I skip to install something or what's wrong in my code? I hope you help me.

+4
source share
1 answer

, , , .

API , , , .

MWS Scratchpad, , API.

0

Source: https://habr.com/ru/post/1687897/


All Articles