title: Amazon Product Advertising API request with Java
body: <p>Hi My code for the same is </p>
  
  <pre><code>// Initialize Web Service
              HandlerResolver handlerResolver=new AwsHandlerResolver(credentials.getAWSSecretKey());
              AWSECommerceService service = new AWSECommerceService();
              service.setHandlerResolver(handlerResolver); 
              // Create Web Service Connection
              AWSECommerceServicePortType port = service.getAWSECommerceServicePort();
  
              // Add Parameters for the Item Lookup
              ItemLookupRequest itemLookup = new ItemLookupRequest();
              itemLookup.setIdType("ASIN");
              itemLookup.getItemId().add("B000RE216U");
  
              // Wrap Request in Lookup Body 
              ItemLookup lookup = new ItemLookup();
              lookup.setAWSAccessKeyId(credentials.getAWSAccessKeyId());
              lookup.getRequest().add(itemLookup);
  
              ItemLookupResponse response = port.itemLookup(lookup);
  
              System.out.println("response: " + response.toString());
  </code></pre>
  
  <p>I keep getting the error cannot convert from Void to AWSECommerceService in the beginning. I have the AWSHandlerResolver file and codec jar installed and configured.</p>
  
  <p>Error Message:</p>
  
  <pre><code>Exception in thread "main" javax.xml.ws.WebServiceException: {http://webservices.amazon.com/AWSECommerceService/2010-11-01}AWSECommerceService is not a valid service. Valid services are: {http://webservices.amazon.com/AWSECommerceService/2011-08-01}AWSECommerceService
      at com.sun.xml.internal.ws.client.WSServiceDelegate.&lt;init&gt;(WSServiceDelegate.java:223)
      at com.sun.xml.internal.ws.client.WSServiceDelegate.&lt;init&gt;(WSServiceDelegate.java:168)
      at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:96)
      at javax.xml.ws.Service.&lt;init&gt;(Service.java:77)
      at com.ECS.client.jax.AWSECommerceService.&lt;init&gt;(AWSECommerceService.java:46) 
  </code></pre>
  
  <p>I have been searching online. I might have to change target namespace for AWSECommerceService. But cannot find how. Please help me</p>