質問編集履歴
13
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
### 前提・実現したいこと
|
1
|
+
### ### 前提・実現したいこと
|
2
2
|
|
3
3
|
お世話になっております。
|
4
4
|
|
12
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|
11
PROXY設定追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -112,6 +112,10 @@
|
|
112
112
|
|
113
113
|
MarketplaceWebServiceConfig config = new MarketplaceWebServiceConfig();
|
114
114
|
|
115
|
+
//@@@@
|
116
|
+
|
117
|
+
config.setProxyHost("http://10.10.1.3");
|
118
|
+
|
115
119
|
|
116
120
|
|
117
121
|
config.setServiceURL("https://mws.amazonservices.jp");
|
10
ソースコードコメントが取れていたのを修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -68,6 +68,40 @@
|
|
68
68
|
|
69
69
|
```ここに言語名を入力
|
70
70
|
|
71
|
+
/**
|
72
|
+
|
73
|
+
* [概 要]:リクエスト生成(ManageReportSchedule)<br>
|
74
|
+
|
75
|
+
* [説 明]:<br>
|
76
|
+
|
77
|
+
* [備 考]:
|
78
|
+
|
79
|
+
* @param accessKeyId AWSアクセスキーID
|
80
|
+
|
81
|
+
* @param secretAccessKey 秘密キー
|
82
|
+
|
83
|
+
* @param sellerDevAuthToken sellerDevAuthToken
|
84
|
+
|
85
|
+
* @param appName appName
|
86
|
+
|
87
|
+
* @param appVersion appVersion
|
88
|
+
|
89
|
+
* @param merchantId 出品者ID
|
90
|
+
|
91
|
+
* @param reportType レポートタイプ
|
92
|
+
|
93
|
+
* @param schedule
|
94
|
+
|
95
|
+
* @param ScheduledDate
|
96
|
+
|
97
|
+
* @param maketPlaceIds
|
98
|
+
|
99
|
+
* @return
|
100
|
+
|
101
|
+
*/
|
102
|
+
|
103
|
+
|
104
|
+
|
71
105
|
public static Object call(String accessKeyId, String secretAccessKey, String sellerDevAuthToken, String appName,
|
72
106
|
|
73
107
|
String appVersion, String merchantId, String reportType, String schedule, XMLGregorianCalendar ScheduledDate, String... maketPlaceIds ) {
|
9
誤字修正
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
JAVAでAmazonMWSに接続できない。
|
test
CHANGED
File without changes
|
8
書式の改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -60,6 +60,10 @@
|
|
60
60
|
|
61
61
|
... 9 more
|
62
62
|
|
63
|
+
|
64
|
+
|
65
|
+
```
|
66
|
+
|
63
67
|
### 該当のソースコード
|
64
68
|
|
65
69
|
```ここに言語名を入力
|
7
テンプレート利用
test
CHANGED
File without changes
|
test
CHANGED
@@ -62,242 +62,206 @@
|
|
62
62
|
|
63
63
|
### 該当のソースコード
|
64
64
|
|
65
|
+
```ここに言語名を入力
|
66
|
+
|
67
|
+
public static Object call(String accessKeyId, String secretAccessKey, String sellerDevAuthToken, String appName,
|
68
|
+
|
69
|
+
String appVersion, String merchantId, String reportType, String schedule, XMLGregorianCalendar ScheduledDate, String... maketPlaceIds ) {
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
MarketplaceWebServiceConfig config = new MarketplaceWebServiceConfig();
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
config.setServiceURL("https://mws.amazonservices.jp");
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
MarketplaceWebService service = new MarketplaceWebServiceClient(
|
84
|
+
|
85
|
+
accessKeyId, secretAccessKey, appName, appVersion, config);
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
ManageReportScheduleRequest request = new ManageReportScheduleRequest();
|
90
|
+
|
91
|
+
request.setMerchant(merchantId);
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
if ((!"".equals(sellerDevAuthToken))
|
96
|
+
|
97
|
+
&&(sellerDevAuthToken != null)
|
98
|
+
|
99
|
+
&&(!"nodata".equals(sellerDevAuthToken))){
|
100
|
+
|
101
|
+
request.setMWSAuthToken(sellerDevAuthToken);
|
102
|
+
|
103
|
+
}
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
request.setReportType(reportType);
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
request.setSchedule(schedule);
|
112
|
+
|
113
|
+
if (ScheduledDate!=null) {
|
114
|
+
|
115
|
+
request.setScheduleDate(ScheduledDate);
|
116
|
+
|
117
|
+
}
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
return invokeManageReportSchedule(service, request);
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
}
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
/**
|
130
|
+
|
131
|
+
* [概 要]:レスポンス取得(ManageReportSchedule)<br>
|
132
|
+
|
133
|
+
* [説 明]:<br>
|
134
|
+
|
135
|
+
* [備 考]:
|
136
|
+
|
137
|
+
* @param service
|
138
|
+
|
139
|
+
* @param request
|
140
|
+
|
141
|
+
* @return
|
142
|
+
|
143
|
+
*/
|
144
|
+
|
145
|
+
public static Object invokeManageReportSchedule(MarketplaceWebService service, ManageReportScheduleRequest request) {
|
146
|
+
|
147
|
+
try {
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
ManageReportScheduleResponse response = service.manageReportSchedule(request); ←★★★ここでエラーメッセージになってしまいます。★★★
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
SuperLogger.info ("ManageReportSchedule Action Response");
|
158
|
+
|
159
|
+
SuperLogger.info ("=============================================================================");
|
160
|
+
|
161
|
+
SuperLogger.info(" ManageReportScheduleResponse");
|
162
|
+
|
163
|
+
if (response.isSetManageReportScheduleResult()) {
|
164
|
+
|
165
|
+
SuperLogger.info(" ManageReportScheduleResult");
|
166
|
+
|
167
|
+
ManageReportScheduleResult manageReportScheduleResult = response.getManageReportScheduleResult();
|
168
|
+
|
169
|
+
if (manageReportScheduleResult.isSetCount()) {
|
170
|
+
|
171
|
+
SuperLogger.info(" Count");
|
172
|
+
|
173
|
+
SuperLogger.info(" " + manageReportScheduleResult.getCount());
|
174
|
+
|
175
|
+
}
|
176
|
+
|
177
|
+
java.util.List<ReportSchedule> reportScheduleList = manageReportScheduleResult.getReportScheduleList();
|
178
|
+
|
179
|
+
for (ReportSchedule reportSchedule : reportScheduleList) {
|
180
|
+
|
181
|
+
SuperLogger.info(" ReportSchedule");
|
182
|
+
|
183
|
+
if (reportSchedule.isSetReportType()) {
|
184
|
+
|
185
|
+
SuperLogger.info(" ReportType");
|
186
|
+
|
187
|
+
SuperLogger.info(" " + reportSchedule.getReportType());
|
188
|
+
|
189
|
+
}
|
190
|
+
|
191
|
+
if (reportSchedule.isSetSchedule()) {
|
192
|
+
|
193
|
+
SuperLogger.info(" Schedule");
|
194
|
+
|
195
|
+
SuperLogger.info(" " + reportSchedule.getSchedule());
|
196
|
+
|
197
|
+
}
|
198
|
+
|
199
|
+
if (reportSchedule.isSetScheduledDate()) {
|
200
|
+
|
201
|
+
SuperLogger.info(" ScheduledDate");
|
202
|
+
|
203
|
+
SuperLogger.info(" " + reportSchedule.getScheduledDate());
|
204
|
+
|
205
|
+
}
|
206
|
+
|
207
|
+
}
|
208
|
+
|
209
|
+
}
|
210
|
+
|
211
|
+
if (response.isSetResponseMetadata()) {
|
212
|
+
|
213
|
+
SuperLogger.info(" ResponseMetadata");
|
214
|
+
|
215
|
+
ResponseMetadata responseMetadata = response.getResponseMetadata();
|
216
|
+
|
217
|
+
if (responseMetadata.isSetRequestId()) {
|
218
|
+
|
219
|
+
SuperLogger.info(" RequestId");
|
220
|
+
|
221
|
+
SuperLogger.info(" " + responseMetadata.getRequestId());
|
222
|
+
|
223
|
+
}
|
224
|
+
|
225
|
+
}
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
SuperLogger.info(response.getResponseHeaderMetadata());
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
return response;
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
} catch (MarketplaceWebServiceException ex) {
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
SuperLogger.info("Caught Exception: " + ex.getMessage());
|
242
|
+
|
243
|
+
SuperLogger.info("Response Status Code: " + ex.getStatusCode());
|
244
|
+
|
245
|
+
SuperLogger.info("Error Code: " + ex.getErrorCode());
|
246
|
+
|
247
|
+
SuperLogger.info("Error Type: " + ex.getErrorType());
|
248
|
+
|
249
|
+
SuperLogger.info("Request ID: " + ex.getRequestId());
|
250
|
+
|
251
|
+
SuperLogger.info("XML: " + ex.getXML());
|
252
|
+
|
253
|
+
SuperLogger.info("ResponseHeaderMetadata: " + ex.getResponseHeaderMetadata());
|
254
|
+
|
255
|
+
return ex;
|
256
|
+
|
257
|
+
}
|
258
|
+
|
259
|
+
}
|
260
|
+
|
65
261
|
```
|
66
262
|
|
67
263
|
|
68
264
|
|
69
|
-
|
70
|
-
|
71
|
-
/**
|
72
|
-
|
73
|
-
* [概 要]:リクエスト生成(ManageReportSchedule)<br>
|
74
|
-
|
75
|
-
* [説 明]:<br>
|
76
|
-
|
77
|
-
* [備 考]:
|
78
|
-
|
79
|
-
* @param accessKeyId AWSアクセスキーID
|
80
|
-
|
81
|
-
* @param secretAccessKey 秘密キー
|
82
|
-
|
83
|
-
* @param sellerDevAuthToken sellerDevAuthToken
|
84
|
-
|
85
|
-
* @param appName appName
|
86
|
-
|
87
|
-
* @param appVersion appVersion
|
88
|
-
|
89
|
-
* @param merchantId 出品者ID
|
90
|
-
|
91
|
-
* @param reportType レポートタイプ
|
92
|
-
|
93
|
-
* @param schedule
|
94
|
-
|
95
|
-
* @param ScheduledDate
|
96
|
-
|
97
|
-
* @param maketPlaceIds
|
98
|
-
|
99
|
-
* @return
|
100
|
-
|
101
|
-
*/
|
102
|
-
|
103
|
-
public static Object call(String accessKeyId, String secretAccessKey, String sellerDevAuthToken, String appName,
|
104
|
-
|
105
|
-
String appVersion, String merchantId, String reportType, String schedule, XMLGregorianCalendar ScheduledDate, String... maketPlaceIds ) {
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
MarketplaceWebServiceConfig config = new MarketplaceWebServiceConfig();
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
config.setServiceURL("https://mws.amazonservices.jp");
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
MarketplaceWebService service = new MarketplaceWebServiceClient(
|
120
|
-
|
121
|
-
accessKeyId, secretAccessKey, appName, appVersion, config);
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
ManageReportScheduleRequest request = new ManageReportScheduleRequest();
|
126
|
-
|
127
|
-
request.setMerchant(merchantId);
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
if ((!"".equals(sellerDevAuthToken))
|
132
|
-
|
133
|
-
&&(sellerDevAuthToken != null)
|
134
|
-
|
135
|
-
&&(!"nodata".equals(sellerDevAuthToken))){
|
136
|
-
|
137
|
-
request.setMWSAuthToken(sellerDevAuthToken);
|
138
|
-
|
139
|
-
}
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
request.setReportType(reportType);
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
request.setSchedule(schedule);
|
148
|
-
|
149
|
-
if (ScheduledDate!=null) {
|
150
|
-
|
151
|
-
request.setScheduleDate(ScheduledDate);
|
152
|
-
|
153
|
-
}
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
return invokeManageReportSchedule(service, request);
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
}
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
/**
|
166
|
-
|
167
|
-
* [概 要]:レスポンス取得(ManageReportSchedule)<br>
|
168
|
-
|
169
|
-
* [説 明]:<br>
|
170
|
-
|
171
|
-
* [備 考]:
|
172
|
-
|
173
|
-
* @param service
|
174
|
-
|
175
|
-
* @param request
|
176
|
-
|
177
|
-
* @return
|
178
|
-
|
179
|
-
*/
|
180
|
-
|
181
|
-
public static Object invokeManageReportSchedule(MarketplaceWebService service, ManageReportScheduleRequest request) {
|
182
|
-
|
183
|
-
try {
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
ManageReportScheduleResponse response = service.manageReportSchedule(request); ←★★★ここでエラーメッセージになってしまいます。★★★
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
SuperLogger.info ("ManageReportSchedule Action Response");
|
194
|
-
|
195
|
-
SuperLogger.info ("=============================================================================");
|
196
|
-
|
197
|
-
SuperLogger.info(" ManageReportScheduleResponse");
|
198
|
-
|
199
|
-
if (response.isSetManageReportScheduleResult()) {
|
200
|
-
|
201
|
-
SuperLogger.info(" ManageReportScheduleResult");
|
202
|
-
|
203
|
-
ManageReportScheduleResult manageReportScheduleResult = response.getManageReportScheduleResult();
|
204
|
-
|
205
|
-
if (manageReportScheduleResult.isSetCount()) {
|
206
|
-
|
207
|
-
SuperLogger.info(" Count");
|
208
|
-
|
209
|
-
SuperLogger.info(" " + manageReportScheduleResult.getCount());
|
210
|
-
|
211
|
-
}
|
212
|
-
|
213
|
-
java.util.List<ReportSchedule> reportScheduleList = manageReportScheduleResult.getReportScheduleList();
|
214
|
-
|
215
|
-
for (ReportSchedule reportSchedule : reportScheduleList) {
|
216
|
-
|
217
|
-
SuperLogger.info(" ReportSchedule");
|
218
|
-
|
219
|
-
if (reportSchedule.isSetReportType()) {
|
220
|
-
|
221
|
-
SuperLogger.info(" ReportType");
|
222
|
-
|
223
|
-
SuperLogger.info(" " + reportSchedule.getReportType());
|
224
|
-
|
225
|
-
}
|
226
|
-
|
227
|
-
if (reportSchedule.isSetSchedule()) {
|
228
|
-
|
229
|
-
SuperLogger.info(" Schedule");
|
230
|
-
|
231
|
-
SuperLogger.info(" " + reportSchedule.getSchedule());
|
232
|
-
|
233
|
-
}
|
234
|
-
|
235
|
-
if (reportSchedule.isSetScheduledDate()) {
|
236
|
-
|
237
|
-
SuperLogger.info(" ScheduledDate");
|
238
|
-
|
239
|
-
SuperLogger.info(" " + reportSchedule.getScheduledDate());
|
240
|
-
|
241
|
-
}
|
242
|
-
|
243
|
-
}
|
244
|
-
|
245
|
-
}
|
246
|
-
|
247
|
-
if (response.isSetResponseMetadata()) {
|
248
|
-
|
249
|
-
SuperLogger.info(" ResponseMetadata");
|
250
|
-
|
251
|
-
ResponseMetadata responseMetadata = response.getResponseMetadata();
|
252
|
-
|
253
|
-
if (responseMetadata.isSetRequestId()) {
|
254
|
-
|
255
|
-
SuperLogger.info(" RequestId");
|
256
|
-
|
257
|
-
SuperLogger.info(" " + responseMetadata.getRequestId());
|
258
|
-
|
259
|
-
}
|
260
|
-
|
261
|
-
}
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
SuperLogger.info(response.getResponseHeaderMetadata());
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
return response;
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
} catch (MarketplaceWebServiceException ex) {
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
SuperLogger.info("Caught Exception: " + ex.getMessage());
|
278
|
-
|
279
|
-
SuperLogger.info("Response Status Code: " + ex.getStatusCode());
|
280
|
-
|
281
|
-
SuperLogger.info("Error Code: " + ex.getErrorCode());
|
282
|
-
|
283
|
-
SuperLogger.info("Error Type: " + ex.getErrorType());
|
284
|
-
|
285
|
-
SuperLogger.info("Request ID: " + ex.getRequestId());
|
286
|
-
|
287
|
-
SuperLogger.info("XML: " + ex.getXML());
|
288
|
-
|
289
|
-
SuperLogger.info("ResponseHeaderMetadata: " + ex.getResponseHeaderMetadata());
|
290
|
-
|
291
|
-
return ex;
|
292
|
-
|
293
|
-
}
|
294
|
-
|
295
|
-
}
|
296
|
-
|
297
|
-
```
|
298
|
-
|
299
|
-
|
300
|
-
|
301
265
|
### 試したこと
|
302
266
|
|
303
267
|
|
6
テンプレート利用
test
CHANGED
File without changes
|
test
CHANGED
@@ -62,7 +62,11 @@
|
|
62
62
|
|
63
63
|
### 該当のソースコード
|
64
64
|
|
65
|
-
```
|
65
|
+
```
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
|
66
70
|
|
67
71
|
/**
|
68
72
|
|
5
エラーログ/ソースコード追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -62,8 +62,6 @@
|
|
62
62
|
|
63
63
|
### 該当のソースコード
|
64
64
|
|
65
|
-
|
66
|
-
|
67
65
|
```JAVA
|
68
66
|
|
69
67
|
/**
|
4
テンプレート利用
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
### 前提・実現したいこと
|
2
2
|
|
3
|
-
|
4
|
-
|
5
3
|
お世話になっております。
|
6
4
|
|
7
5
|
JAVA1.8でAmazonAPI連携を行っておりますが、自社の環境で接続するときは
|
@@ -16,8 +14,6 @@
|
|
16
14
|
|
17
15
|
### 発生している問題・エラーメッセージ
|
18
16
|
|
19
|
-
|
20
|
-
|
21
17
|
```
|
22
18
|
|
23
19
|
エラーメッセージ/ログ
|
@@ -32,30 +28,6 @@
|
|
32
28
|
|
33
29
|
at com.amazonaws.mws.MarketplaceWebServiceClient.manageReportSchedule(MarketplaceWebServiceClient.java:1651) [MaWSJavaClientLibrary-1.1.jar:?]
|
34
30
|
|
35
|
-
at jp.co.tcc.ecs.e_asproInterface.Amazon.Report.Client.ManageReportScheduleClient.invokeManageReportSchedule(ManageReportScheduleClient.java:110) [e_aspro270Interface_1.0.jar:?]
|
36
|
-
|
37
|
-
at jp.co.tcc.ecs.e_asproInterface.Amazon.Report.Client.ManageReportScheduleClient.call(ManageReportScheduleClient.java:95) [e_aspro270Interface_1.0.jar:?]
|
38
|
-
|
39
|
-
at jp.co.tcc.ecs.e_asproInterface.Amazon.Report.Client.ManageReportScheduleClient.call(ManageReportScheduleClient.java:45) [e_aspro270Interface_1.0.jar:?]
|
40
|
-
|
41
|
-
at jp.co.tcc.ecs.e_asproInterface.RE013AmazonOrder.AmazonOrderService.doManageReportScheduleReport(AmazonOrderService.java:660) [e_aspro270Interface_1.0.jar:?]
|
42
|
-
|
43
|
-
at jp.co.tcc.ecs.e_asproInterface.RE013AmazonOrder.AmazonOrderService.doOrderRegist(AmazonOrderService.java:376) [e_aspro270Interface_1.0.jar:?]
|
44
|
-
|
45
|
-
at jp.co.tcc.ecs.e_asproInterface.RE013AmazonOrder.AmazonOrderService.registOrdersFBA(AmazonOrderService.java:1867) [e_aspro270Interface_1.0.jar:?]
|
46
|
-
|
47
|
-
at jp.co.tcc.ecs.e_asproInterface.RE013AmazonOrder.AmazonOrderServlet.main(AmazonOrderServlet.java:132) [e_aspro270Interface_1.0.jar:?]
|
48
|
-
|
49
|
-
Caused by: java.net.ConnectException: Connection timed out: connect
|
50
|
-
|
51
|
-
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) ~[?:1.8.0_102]
|
52
|
-
|
53
|
-
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85) ~[?:1.8.0_102]
|
54
|
-
|
55
|
-
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:1.8.0_102]
|
56
|
-
|
57
|
-
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:1.8.0_102]
|
58
|
-
|
59
31
|
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:1.8.0_102]
|
60
32
|
|
61
33
|
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) ~[?:1.8.0_102]
|
@@ -88,43 +60,249 @@
|
|
88
60
|
|
89
61
|
... 9 more
|
90
62
|
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
63
|
+
### 該当のソースコード
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
```JAVA
|
68
|
+
|
69
|
+
/**
|
70
|
+
|
71
|
+
* [概 要]:リクエスト生成(ManageReportSchedule)<br>
|
72
|
+
|
73
|
+
* [説 明]:<br>
|
74
|
+
|
75
|
+
* [備 考]:
|
76
|
+
|
77
|
+
* @param accessKeyId AWSアクセスキーID
|
78
|
+
|
79
|
+
* @param secretAccessKey 秘密キー
|
80
|
+
|
81
|
+
* @param sellerDevAuthToken sellerDevAuthToken
|
82
|
+
|
83
|
+
* @param appName appName
|
84
|
+
|
85
|
+
* @param appVersion appVersion
|
86
|
+
|
87
|
+
* @param merchantId 出品者ID
|
88
|
+
|
89
|
+
* @param reportType レポートタイプ
|
90
|
+
|
91
|
+
* @param schedule
|
92
|
+
|
93
|
+
* @param ScheduledDate
|
94
|
+
|
95
|
+
* @param maketPlaceIds
|
96
|
+
|
97
|
+
* @return
|
98
|
+
|
99
|
+
*/
|
100
|
+
|
101
|
+
public static Object call(String accessKeyId, String secretAccessKey, String sellerDevAuthToken, String appName,
|
102
|
+
|
103
|
+
String appVersion, String merchantId, String reportType, String schedule, XMLGregorianCalendar ScheduledDate, String... maketPlaceIds ) {
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
MarketplaceWebServiceConfig config = new MarketplaceWebServiceConfig();
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
config.setServiceURL("https://mws.amazonservices.jp");
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
MarketplaceWebService service = new MarketplaceWebServiceClient(
|
118
|
+
|
119
|
+
accessKeyId, secretAccessKey, appName, appVersion, config);
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
ManageReportScheduleRequest request = new ManageReportScheduleRequest();
|
124
|
+
|
125
|
+
request.setMerchant(merchantId);
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
if ((!"".equals(sellerDevAuthToken))
|
130
|
+
|
131
|
+
&&(sellerDevAuthToken != null)
|
132
|
+
|
133
|
+
&&(!"nodata".equals(sellerDevAuthToken))){
|
134
|
+
|
135
|
+
request.setMWSAuthToken(sellerDevAuthToken);
|
136
|
+
|
137
|
+
}
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
request.setReportType(reportType);
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
request.setSchedule(schedule);
|
146
|
+
|
147
|
+
if (ScheduledDate!=null) {
|
148
|
+
|
149
|
+
request.setScheduleDate(ScheduledDate);
|
150
|
+
|
151
|
+
}
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
return invokeManageReportSchedule(service, request);
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
}
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
/**
|
164
|
+
|
165
|
+
* [概 要]:レスポンス取得(ManageReportSchedule)<br>
|
166
|
+
|
167
|
+
* [説 明]:<br>
|
168
|
+
|
169
|
+
* [備 考]:
|
170
|
+
|
171
|
+
* @param service
|
172
|
+
|
173
|
+
* @param request
|
174
|
+
|
175
|
+
* @return
|
176
|
+
|
177
|
+
*/
|
178
|
+
|
179
|
+
public static Object invokeManageReportSchedule(MarketplaceWebService service, ManageReportScheduleRequest request) {
|
180
|
+
|
181
|
+
try {
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
ManageReportScheduleResponse response = service.manageReportSchedule(request); ←★★★ここでエラーメッセージになってしまいます。★★★
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
SuperLogger.info ("ManageReportSchedule Action Response");
|
192
|
+
|
193
|
+
SuperLogger.info ("=============================================================================");
|
194
|
+
|
195
|
+
SuperLogger.info(" ManageReportScheduleResponse");
|
196
|
+
|
197
|
+
if (response.isSetManageReportScheduleResult()) {
|
198
|
+
|
199
|
+
SuperLogger.info(" ManageReportScheduleResult");
|
200
|
+
|
201
|
+
ManageReportScheduleResult manageReportScheduleResult = response.getManageReportScheduleResult();
|
202
|
+
|
203
|
+
if (manageReportScheduleResult.isSetCount()) {
|
204
|
+
|
205
|
+
SuperLogger.info(" Count");
|
206
|
+
|
207
|
+
SuperLogger.info(" " + manageReportScheduleResult.getCount());
|
208
|
+
|
209
|
+
}
|
210
|
+
|
211
|
+
java.util.List<ReportSchedule> reportScheduleList = manageReportScheduleResult.getReportScheduleList();
|
212
|
+
|
213
|
+
for (ReportSchedule reportSchedule : reportScheduleList) {
|
214
|
+
|
215
|
+
SuperLogger.info(" ReportSchedule");
|
216
|
+
|
217
|
+
if (reportSchedule.isSetReportType()) {
|
218
|
+
|
219
|
+
SuperLogger.info(" ReportType");
|
220
|
+
|
221
|
+
SuperLogger.info(" " + reportSchedule.getReportType());
|
222
|
+
|
223
|
+
}
|
224
|
+
|
225
|
+
if (reportSchedule.isSetSchedule()) {
|
226
|
+
|
227
|
+
SuperLogger.info(" Schedule");
|
228
|
+
|
229
|
+
SuperLogger.info(" " + reportSchedule.getSchedule());
|
230
|
+
|
231
|
+
}
|
232
|
+
|
233
|
+
if (reportSchedule.isSetScheduledDate()) {
|
234
|
+
|
235
|
+
SuperLogger.info(" ScheduledDate");
|
236
|
+
|
237
|
+
SuperLogger.info(" " + reportSchedule.getScheduledDate());
|
238
|
+
|
239
|
+
}
|
240
|
+
|
241
|
+
}
|
242
|
+
|
243
|
+
}
|
244
|
+
|
245
|
+
if (response.isSetResponseMetadata()) {
|
246
|
+
|
247
|
+
SuperLogger.info(" ResponseMetadata");
|
248
|
+
|
249
|
+
ResponseMetadata responseMetadata = response.getResponseMetadata();
|
250
|
+
|
251
|
+
if (responseMetadata.isSetRequestId()) {
|
252
|
+
|
253
|
+
SuperLogger.info(" RequestId");
|
254
|
+
|
255
|
+
SuperLogger.info(" " + responseMetadata.getRequestId());
|
256
|
+
|
257
|
+
}
|
258
|
+
|
259
|
+
}
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
SuperLogger.info(response.getResponseHeaderMetadata());
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
return response;
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
} catch (MarketplaceWebServiceException ex) {
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
SuperLogger.info("Caught Exception: " + ex.getMessage());
|
276
|
+
|
277
|
+
SuperLogger.info("Response Status Code: " + ex.getStatusCode());
|
278
|
+
|
279
|
+
SuperLogger.info("Error Code: " + ex.getErrorCode());
|
280
|
+
|
281
|
+
SuperLogger.info("Error Type: " + ex.getErrorType());
|
282
|
+
|
283
|
+
SuperLogger.info("Request ID: " + ex.getRequestId());
|
284
|
+
|
285
|
+
SuperLogger.info("XML: " + ex.getXML());
|
286
|
+
|
287
|
+
SuperLogger.info("ResponseHeaderMetadata: " + ex.getResponseHeaderMetadata());
|
288
|
+
|
289
|
+
return ex;
|
290
|
+
|
291
|
+
}
|
292
|
+
|
293
|
+
}
|
106
294
|
|
107
295
|
```
|
108
296
|
|
109
297
|
|
110
298
|
|
111
|
-
### 該当のソースコード
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
```ここに言語名を入力
|
116
|
-
|
117
|
-
ソースコード
|
118
|
-
|
119
|
-
```
|
120
|
-
|
121
|
-
|
122
|
-
|
123
299
|
### 試したこと
|
124
300
|
|
125
301
|
|
126
302
|
|
303
|
+
chromeやIEなどのブラウザ経由でAMAZONのURL「https://mws.amazonservices.jp」
|
304
|
+
|
127
|
-
こ
|
305
|
+
を閲覧すると、XML形式でサイト表示はすることができます。
|
128
306
|
|
129
307
|
|
130
308
|
|
@@ -132,17 +310,11 @@
|
|
132
310
|
|
133
311
|
|
134
312
|
|
313
|
+
エラーになる環境 :Windowsserver2016 PROXY設定あり
|
314
|
+
|
315
|
+
|
316
|
+
|
135
|
-
|
317
|
+
接続可能な環境: Windows10 PROXY設定なし
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
318
|
|
147
319
|
|
148
320
|
|
@@ -153,15 +325,3 @@
|
|
153
325
|
#JAVAバージョン
|
154
326
|
|
155
327
|
1.8
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
#その他環境
|
162
|
-
|
163
|
-
エラーになる環境 :Windowsserver2016 PROXY設定あり
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
接続可能な環境: Windows10 PROXY設定なし
|
3
テンプレート利用
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
JAVAでAmazonMWSに接続できない。
|
1
|
+
てんぷれーとJAVAでAmazonMWSに接続できない。
|
test
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
### 前提・実現したいこと
|
2
|
+
|
3
|
+
|
4
|
+
|
1
5
|
お世話になっております。
|
2
6
|
|
3
7
|
JAVA1.8でAmazonAPI連携を行っておりますが、自社の環境で接続するときは
|
@@ -10,9 +14,13 @@
|
|
10
14
|
|
11
15
|
助かります。
|
12
16
|
|
17
|
+
### 発生している問題・エラーメッセージ
|
13
18
|
|
14
19
|
|
20
|
+
|
21
|
+
```
|
22
|
+
|
15
|
-
|
23
|
+
エラーメッセージ/ログ
|
16
24
|
|
17
25
|
14:45:37.126 [main] ERROR com.amazonaws.mws.MarketplaceWebServiceClient - Caught MarketplaceWebServiceException
|
18
26
|
|
@@ -96,6 +104,44 @@
|
|
96
104
|
|
97
105
|
|
98
106
|
|
107
|
+
```
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
### 該当のソースコード
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
```ここに言語名を入力
|
116
|
+
|
117
|
+
ソースコード
|
118
|
+
|
119
|
+
```
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
### 試したこと
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
ここに問題に対して試したことを記載してください。
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
### 補足情報(FW/ツールのバージョンなど)
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
ここにより詳細な情報を記載してください。
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
99
145
|
|
100
146
|
|
101
147
|
|
2
エラーログ/ソースコード追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -94,12 +94,6 @@
|
|
94
94
|
|
95
95
|
14:45:37.126 [main] INFO freamwork.logger - ResponseHeaderMetadata: null
|
96
96
|
|
97
|
-
14:45:37.126 [main] ERROR freamwork.logger - MKERR ★★★ Amazon 会:1 サ:114 ★★★★★ 異常終了 FBA注文情報取込 ManageReportSchedule
|
98
|
-
|
99
|
-
14:45:37.142 [main] ERROR freamwork.logger - MKERR ★★★★★★★★★ 異常終了 Amazon注文情報連携処理 2020/02/27 14:45:37.142 ★★★★★★★★★★
|
100
|
-
|
101
|
-
14:45:37.142 [main] ERROR freamwork.logger - エラー内容: java.lang.Exception
|
102
|
-
|
103
97
|
|
104
98
|
|
105
99
|
|
1
環境と該当ソースコードを追記しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -104,6 +104,24 @@
|
|
104
104
|
|
105
105
|
|
106
106
|
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
107
113
|
#JAVAバージョン
|
108
114
|
|
109
115
|
1.8
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
#その他環境
|
122
|
+
|
123
|
+
エラーになる環境 :Windowsserver2016 PROXY設定あり
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
接続可能な環境: Windows10 PROXY設定なし
|