【发布时间】:2020-05-16 18:05:41
【问题描述】:
我正在尝试按照本指南中的 java 示例通过 _UPLOAD_VAT_INVOICE_ 向亚马逊 mws 发送发票: Link
pdf 文件是 85 kb 的简单发票 错误是状态码 414,即“Uri 太长”
调试亚马逊原始类 MarketplaceWebServiceClient 我看到了这个:
if( request instanceof SubmitFeedRequest ) {
// For SubmitFeed, HTTP body is reserved for the Feed Content and the function parameters
// are contained within the HTTP header
SubmitFeedRequest sfr = (SubmitFeedRequest)request;
method = new HttpPost( config.getServiceURL() + "?" + getSubmitFeedUrlParameters( parameters ) );
getSubmitFeedUrlParameters 方法获取每个参数并将其添加到查询字符串。这些参数之一是 contentMD5 来自: 字符串内容MD5 = Base64.encodeBase64String(pdfDocument); 所以有一个非常大的字符串表示作为参数传递的pdf文件。这会导致错误 414
但该类是取自 MaWSJavaClientLibrary-1.1.jar 的原始类
有人可以帮帮我吗?
谢谢
【问题讨论】:
-
我在调试后添加了一些额外的信息
标签: amazon-web-services amazon-mws