@Test public void testItemSearch() throws Exception { ItemSearchRequest request = new ItemSearchRequest(); request.setSearchIndex("Books"); request.setKeywords("Java"); ItemSearchResponse response = requester.itemSearch(request); assertNotNull(response); assertNotNull(response.getItems()); assertTrue(response.getItems().size() > 0); }
@Override public ItemSearchResponse itemSearch(ItemSearchRequest request) { final AWSECommerceServicePortType port = preparePort(); final ItemSearch itemSearch = prepareItemSearch(request); ItemSearchResponse response = invokeWithRetry(new WebServiceInvoker<ItemSearchResponse>() { @Override public ItemSearchResponse invoke() throws WebServiceException { return port.itemSearch(itemSearch); } }); return response; }
AwsApaRequesterImpl implements AwsApaRequester { @Override public ItemSearchResponse itemSearch(ItemSearchRequest request) { final AWSECommerceServicePortType port = preparePort(); final ItemSearch itemSearch = prepareItemSearch(request); ItemSearchResponse response = invokeWithRetry(new WebServiceInvoker<ItemSearchResponse>() { @Override public ItemSearchResponse invoke() throws WebServiceException { return port.itemSearch(itemSearch); } }); return response; } }
AwsApaRequesterImpl implements AwsApaRequester { @Override public ItemSearchResponse itemSearch(ItemSearchRequest request) { final AWSECommerceServicePortType port = preparePort(); final ItemSearch itemSearch = prepareItemSearch(request); ItemSearchResponse response = invokeWithRetry(new WebServiceInvoker<ItemSearchResponse>() { @Override public ItemSearchResponse invoke() throws WebServiceException { return port.itemSearch(itemSearch); } }); return response; } AwsApaRequesterImpl();  AwsApaRequesterImpl(String endpoint, String accessKeyId,
                               String secretAccessKey, String associateTag); }
AwsApaRequesterImpl implements AwsApaRequester { @Override public ItemSearchResponse itemSearch(ItemSearchRequest request) { final AWSECommerceServicePortType port = preparePort(); final ItemSearch itemSearch = prepareItemSearch(request); ItemSearchResponse response = invokeWithRetry(new WebServiceInvoker<ItemSearchResponse>() { @Override public ItemSearchResponse invoke() throws WebServiceException { return port.itemSearch(itemSearch); } }); return response; } AwsApaRequesterImpl();  AwsApaRequesterImpl(String endpoint, String accessKeyId,
                               String secretAccessKey, String associateTag); @Override ItemSearchResponse itemSearch(ItemSearchRequest request); @Override Response<ItemSearchResponse> itemSearchAsync(
            ItemSearchRequest request); T invokeWithRetry(WebServiceInvoker<T> invoker); @Override ItemLookupResponse itemLookup(ItemLookupRequest request); @Override Response<ItemLookupResponse> itemLookupAsync(
            ItemLookupRequest request); T getResponseWithRetry(final Response<T> res); int getRetryCount(); void setRetryCount(int retryCount); long getRetryInterval(); void setRetryInterval(long retryInterval); }
AwsApaRequesterImpl implements AwsApaRequester { @Override public ItemSearchResponse itemSearch(ItemSearchRequest request) { final AWSECommerceServicePortType port = preparePort(); final ItemSearch itemSearch = prepareItemSearch(request); ItemSearchResponse response = invokeWithRetry(new WebServiceInvoker<ItemSearchResponse>() { @Override public ItemSearchResponse invoke() throws WebServiceException { return port.itemSearch(itemSearch); } }); return response; } AwsApaRequesterImpl();  AwsApaRequesterImpl(String endpoint, String accessKeyId,
                               String secretAccessKey, String associateTag); @Override ItemSearchResponse itemSearch(ItemSearchRequest request); @Override Response<ItemSearchResponse> itemSearchAsync(
            ItemSearchRequest request); T invokeWithRetry(WebServiceInvoker<T> invoker); @Override ItemLookupResponse itemLookup(ItemLookupRequest request); @Override Response<ItemLookupResponse> itemLookupAsync(
            ItemLookupRequest request); T getResponseWithRetry(final Response<T> res); int getRetryCount(); void setRetryCount(int retryCount); long getRetryInterval(); void setRetryInterval(long retryInterval);  }