2013-03-28 133 views
1

我從Intellij中的Amazon WSDL here中生成了Java代碼。它似乎運作良好。然而,當我按照在this page上發現的教程時,我遇到了一個問題。 java代碼的最後一行是從AWSECommerceServicePortType類調用方法itemSearch。這是該方法生成的唯一的方法描述是從WSDL,Intellij生成Amazon API SOAP代碼

@WebMethod(operationName = "ItemSearch", action = "http://soap.amazon.com/ItemSearch") 
      @RequestWrapper(localName = "ItemSearch", targetNamespace = "http://webservices.amazon.com/AWSECommerceService/2011-08-01", className = "com.shopit.amazon.ItemSearch") 
      @ResponseWrapper(localName = "ItemSearchResponse", targetNamespace = "http://webservices.amazon.com/AWSECommerceService/2011-08-01", className = "com.shopit.amazon.ItemSearchResponse") 
      public void itemSearch(
    @WebParam(name = "MarketplaceDomain", targetNamespace = "http://webservices.amazon.com/AWSECommerceService/2011-08-01") 
    String marketplaceDomain, 
    @WebParam(name = "AWSAccessKeyId", targetNamespace = "http://webservices.amazon.com/AWSECommerceService/2011-08-01") 
    String awsAccessKeyId, 
    @WebParam(name = "AssociateTag", targetNamespace = "http://webservices.amazon.com/AWSECommerceService/2011-08-01") 
    String associateTag, 
    @WebParam(name = "XMLEscaping", targetNamespace = "http://webservices.amazon.com/AWSECommerceService/2011-08-01") 
    String xmlEscaping, 
    @WebParam(name = "Validate", targetNamespace = "http://webservices.amazon.com/AWSECommerceService/2011-08-01") 
    String validate, 
    @WebParam(name = "Shared", targetNamespace = "http://webservices.amazon.com/AWSECommerceService/2011-08-01") 
    ItemSearchRequest shared, 
    @WebParam(name = "Request", targetNamespace = "http://webservices.amazon.com/AWSECommerceService/2011-08-01") 
    List<ItemSearchRequest> request, 
    @WebParam(name = "OperationRequest", targetNamespace = "http://webservices.amazon.com/AWSECommerceService/2011-08-01", mode = WebParam.Mode.OUT) 
    Holder<OperationRequest> operationRequest, 
    @WebParam(name = "Items", targetNamespace = "http://webservices.amazon.com/AWSECommerceService/2011-08-01", mode = WebParam.Mode.OUT) 
    Holder<List<Items>> items); 

它要求我通過很多參數不僅僅是一個它的例子,它提供了與錯誤編譯時。我是否需要使用不同的設置來生成Java代碼?

回答

-2

我認爲更好的使用AWS官方的Java SDK:http://aws.amazon.com/sdkforjava/

+0

至於我可以告訴亞馬遜SDK的Java沒有包括亞馬遜產品廣告SDK。 – mfrancis107

+0

Ooohhh,對不起,我不知道 –

0

你可以使用亞馬遜ecs.jar亞馬遜產品API