### 前提・実現したいこと
お世話になっております。
JAVA1.8でAmazonAPI連携を行っておりますが、自社の環境で接続するときは
正常にいくのですが、お客様の環境で実施するとエラーになってしまいます。
恐れ入りますが、何かしら調査方法などご教示いただく事可能でしょうか?
申し訳ございません。不足している情報ありましたら、ご指摘いただけると
助かります。
発生している問題・エラーメッセージ
エラーメッセージ/ログ 14:45:37.126 [main] ERROR com.amazonaws.mws.MarketplaceWebServiceClient - Caught MarketplaceWebServiceException com.amazonaws.mws.MarketplaceWebServiceException: Internal Error at com.amazonaws.mws.MarketplaceWebServiceClient.invoke(MarketplaceWebServiceClient.java:2248) [MaWSJavaClientLibrary-1.1.jar:?] at com.amazonaws.mws.MarketplaceWebServiceClient.invoke(MarketplaceWebServiceClient.java:2019) [MaWSJavaClientLibrary-1.1.jar:?] at com.amazonaws.mws.MarketplaceWebServiceClient.manageReportSchedule(MarketplaceWebServiceClient.java:1651) [MaWSJavaClientLibrary-1.1.jar:?] at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:1.8.0_102] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) ~[?:1.8.0_102] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:1.8.0_102] at java.net.Socket.connect(Socket.java:589) ~[?:1.8.0_102] at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:668) ~[?:1.8.0_102] at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:524) ~[org.apache.httpcomponents.httpclient_4.3.5.jar:4.3.5] at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:403) ~[org.apache.httpcomponents.httpclient_4.3.5.jar:4.3.5] at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:177) ~[org.apache.httpcomponents.httpclient_4.3.5.jar:4.3.5] at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:304) ~[org.apache.httpcomponents.httpclient_4.3.5.jar:4.3.5] at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611) ~[org.apache.httpcomponents.httpclient_4.3.5.jar:4.3.5] at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446) ~[org.apache.httpcomponents.httpclient_4.3.5.jar:4.3.5] at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863) ~[org.apache.httpcomponents.httpclient_4.3.5.jar:4.3.5] at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) ~[org.apache.httpcomponents.httpclient_4.3.5.jar:4.3.5] at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57) ~[org.apache.httpcomponents.httpclient_4.3.5.jar:4.3.5] at com.amazonaws.mws.MarketplaceWebServiceClient.invoke(MarketplaceWebServiceClient.java:2097) ~[MaWSJavaClientLibrary-1.1.jar:?] ... 9 more
該当のソースコード
/** * [概 要]:リクエスト生成(ManageReportSchedule)<br> * [説 明]:<br> * [備 考]: * @param accessKeyId AWSアクセスキーID * @param secretAccessKey 秘密キー * @param sellerDevAuthToken sellerDevAuthToken * @param appName appName * @param appVersion appVersion * @param merchantId 出品者ID * @param reportType レポートタイプ * @param schedule * @param ScheduledDate * @param maketPlaceIds * @return */ public static Object call(String accessKeyId, String secretAccessKey, String sellerDevAuthToken, String appName, String appVersion, String merchantId, String reportType, String schedule, XMLGregorianCalendar ScheduledDate, String... maketPlaceIds ) { MarketplaceWebServiceConfig config = new MarketplaceWebServiceConfig(); //@@@@ config.setProxyHost("http://10.10.1.3"); config.setServiceURL("https://mws.amazonservices.jp"); MarketplaceWebService service = new MarketplaceWebServiceClient( accessKeyId, secretAccessKey, appName, appVersion, config); ManageReportScheduleRequest request = new ManageReportScheduleRequest(); request.setMerchant(merchantId); if ((!"".equals(sellerDevAuthToken)) &&(sellerDevAuthToken != null) &&(!"nodata".equals(sellerDevAuthToken))){ request.setMWSAuthToken(sellerDevAuthToken); } request.setReportType(reportType); request.setSchedule(schedule); if (ScheduledDate!=null) { request.setScheduleDate(ScheduledDate); } return invokeManageReportSchedule(service, request); } /** * [概 要]:レスポンス取得(ManageReportSchedule)<br> * [説 明]:<br> * [備 考]: * @param service * @param request * @return */ public static Object invokeManageReportSchedule(MarketplaceWebService service, ManageReportScheduleRequest request) { try { ManageReportScheduleResponse response = service.manageReportSchedule(request); ←★★★ここでエラーメッセージになってしまいます。★★★ SuperLogger.info ("ManageReportSchedule Action Response"); SuperLogger.info ("============================================================================="); SuperLogger.info(" ManageReportScheduleResponse"); if (response.isSetManageReportScheduleResult()) { SuperLogger.info(" ManageReportScheduleResult"); ManageReportScheduleResult manageReportScheduleResult = response.getManageReportScheduleResult(); if (manageReportScheduleResult.isSetCount()) { SuperLogger.info(" Count"); SuperLogger.info(" " + manageReportScheduleResult.getCount()); } java.util.List<ReportSchedule> reportScheduleList = manageReportScheduleResult.getReportScheduleList(); for (ReportSchedule reportSchedule : reportScheduleList) { SuperLogger.info(" ReportSchedule"); if (reportSchedule.isSetReportType()) { SuperLogger.info(" ReportType"); SuperLogger.info(" " + reportSchedule.getReportType()); } if (reportSchedule.isSetSchedule()) { SuperLogger.info(" Schedule"); SuperLogger.info(" " + reportSchedule.getSchedule()); } if (reportSchedule.isSetScheduledDate()) { SuperLogger.info(" ScheduledDate"); SuperLogger.info(" " + reportSchedule.getScheduledDate()); } } } if (response.isSetResponseMetadata()) { SuperLogger.info(" ResponseMetadata"); ResponseMetadata responseMetadata = response.getResponseMetadata(); if (responseMetadata.isSetRequestId()) { SuperLogger.info(" RequestId"); SuperLogger.info(" " + responseMetadata.getRequestId()); } } SuperLogger.info(response.getResponseHeaderMetadata()); return response; } catch (MarketplaceWebServiceException ex) { SuperLogger.info("Caught Exception: " + ex.getMessage()); SuperLogger.info("Response Status Code: " + ex.getStatusCode()); SuperLogger.info("Error Code: " + ex.getErrorCode()); SuperLogger.info("Error Type: " + ex.getErrorType()); SuperLogger.info("Request ID: " + ex.getRequestId()); SuperLogger.info("XML: " + ex.getXML()); SuperLogger.info("ResponseHeaderMetadata: " + ex.getResponseHeaderMetadata()); return ex; } }
試したこと
chromeやIEなどのブラウザ経由でAMAZONのURL「https://mws.amazonservices.jp」
を閲覧すると、XML形式でサイト表示はすることができます。
補足情報(FW/ツールのバージョンなど)
エラーになる環境 :Windowsserver2016 PROXY設定あり
接続可能な環境: Windows10 PROXY設定なし
#JAVAバージョン
1.8
あなたの回答
tips
プレビュー