gpt4 book ai didi

java - 从 WSDL、Intellij 生成 Amazon API SOAP 代码

转载 作者:行者123 更新时间:2023-12-01 06:24:27 25 4
gpt4 key购买 nike

我从 Amazon WSDL 生成了 Java 代码,发现 here在 Intellij 中。看起来效果很好。但是,当我按照this page上找到的教程进行操作时我遇到了一个问题。 java 代码的最后一行是从 AWSECommerceServicePortType 类调用 itemSearch 方法。为该方法生成的唯一方法描述是

@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 代码?

最佳答案

您可以将 amazon-ecs.jar 用于亚马逊产品 API

关于java - 从 WSDL、Intellij 生成 Amazon API SOAP 代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15689629/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com