|
@@ -137,6 +137,8 @@ public class TsbShoplinkerStockJob extends TsbAbstractJob<Collection<ShoplinkerG
|
|
|
private int callGoodsRegApi(ShoplinkerGoods map, StringBuilder sbRequest, String fileNm) throws IOException {
|
|
private int callGoodsRegApi(ShoplinkerGoods map, StringBuilder sbRequest, String fileNm) throws IOException {
|
|
|
|
|
|
|
|
int succCnt = 0;
|
|
int succCnt = 0;
|
|
|
|
|
+ String xmlPath = "";
|
|
|
|
|
+ String xmlUrl = "";
|
|
|
String responseXmlData = "";
|
|
String responseXmlData = "";
|
|
|
StringBuilder xmlFileName = new StringBuilder();
|
|
StringBuilder xmlFileName = new StringBuilder();
|
|
|
com.gagaframework.shoplinker.domain.goods.result.Shoplinker shoplinkerResult;
|
|
com.gagaframework.shoplinker.domain.goods.result.Shoplinker shoplinkerResult;
|
|
@@ -148,9 +150,9 @@ public class TsbShoplinkerStockJob extends TsbAbstractJob<Collection<ShoplinkerG
|
|
|
// XML 파일 생성
|
|
// XML 파일 생성
|
|
|
xmlFileName = new StringBuilder();
|
|
xmlFileName = new StringBuilder();
|
|
|
xmlFileName.append("stock_"+fileNm).append(".xml");
|
|
xmlFileName.append("stock_"+fileNm).append(".xml");
|
|
|
- String xmlPath = GagaFileUtil.getConcatenationPath(map.getXmlPath(), xmlFileName.toString());
|
|
|
|
|
|
|
+ xmlPath = GagaFileUtil.getConcatenationPath(map.getXmlPath(), xmlFileName.toString());
|
|
|
shoplinkerUtil.makeRequestXmlFile(sbRequest.toString(), xmlPath);
|
|
shoplinkerUtil.makeRequestXmlFile(sbRequest.toString(), xmlPath);
|
|
|
- String xmlUrl = GagaFileUtil.getConcatenationPath(map.getDomainUrl(), xmlFileName.toString());
|
|
|
|
|
|
|
+ xmlUrl = GagaFileUtil.getConcatenationPath(map.getDomainUrl(), xmlFileName.toString());
|
|
|
|
|
|
|
|
// API 호출URL
|
|
// API 호출URL
|
|
|
String apiUrl = GagaShoplinkerConstants.API_DOMAIN + map.getApiSubUrl() + URLEncoder.encode(xmlUrl);
|
|
String apiUrl = GagaShoplinkerConstants.API_DOMAIN + map.getApiSubUrl() + URLEncoder.encode(xmlUrl);
|
|
@@ -175,7 +177,15 @@ public class TsbShoplinkerStockJob extends TsbAbstractJob<Collection<ShoplinkerG
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
log.error("callGoodsRegApi error", e);
|
|
log.error("callGoodsRegApi error", e);
|
|
|
- map.setXmlTxt(sbRequest.toString());
|
|
|
|
|
|
|
+
|
|
|
|
|
+ java.io.File file = new java.io.File(xmlUrl);
|
|
|
|
|
+ String errStr = "[파일존재여부] : "+file.exists();
|
|
|
|
|
+ errStr += "\n[xmlPath] : "+xmlPath;
|
|
|
|
|
+ errStr += "\n[xmlUrl] : "+xmlUrl;
|
|
|
|
|
+ errStr += "\n\n[responseXmlData] : "+responseXmlData;
|
|
|
|
|
+ errStr += "\n\n[xml] : "+sbRequest.toString();
|
|
|
|
|
+
|
|
|
|
|
+ map.setXmlTxt(errStr);
|
|
|
map.setApiResult(TscConstants.ShoplinkerApiStat.S_ERROR.value());
|
|
map.setApiResult(TscConstants.ShoplinkerApiStat.S_ERROR.value());
|
|
|
map.setApiMessage("API 오류 " +StringUtils.abbreviate(responseXmlData, 0 , 120));
|
|
map.setApiMessage("API 오류 " +StringUtils.abbreviate(responseXmlData, 0 , 120));
|
|
|
|
|
|