今天在使用ebay的ReviseItemCall的时候出现一个很奇怪的问题。
业务: 将一些ebay上的Ads的Startprice进行更新。
核心代码:
ItemType item = new ItemType();
AmountType start = new AmountType();
start.setValue(startPrice);
item.setStartPrice(start);
item.setItemID(ebayItemNumber);
ReviseItemCall call = new ReviseItemCall(); call.setApiContext(apiContext);
call.setItemToBeRevised(item);
call.reviseItem();
out.println(call.getRequestXml());
out.println("--------");
out.println(call.getResponseXml());
出现能够将Startprice进行更新。但是ReturnPolicy中的Detail被清空了
因此使用:call.getRequestXml()和call.getResponseXMl()来查看
信息如下:
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Header>
<ebl:RequesterCredentials xmlns:ebl="urn:ebay:apis:eBLBaseComponents" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:mustUnderstand="0">
<ebl:eBayAuthToken>XXXXXXXXXXXXXXXXXXXXXXX</ebl:eBayAuthToken>
</ebl:RequesterCredentials>
</S:Header>
<S:Body>
<ReviseItemRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<Version>747</Version>
<Item>
<ItemID>180931471196</ItemID>
<StartPrice>334.01</StartPrice>
</Item>
</ReviseItemRequest>
</S:Body>
</S:Envelope>
--------
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header/>
<soapenv:Body>
<ReviseItemResponse xmlns="urn:ebay:apis:eBLBaseComponents">
<Timestamp>2012-07-23T02:46:32.208Z</Timestamp>
<Ack>Success</Ack>
<Version>783</Version>
<Build>E783_CORE_BUNDLED_15095068_R1</Build>
<ItemID>180931471196</ItemID>
<StartTime>2012-07-17T22:06:33.000Z</StartTime>
<EndTime>2012-07-24T22:06:33.000Z</EndTime>
<Fees>
<Fee>
<Name>AuctionLengthFee</Name>
<Fee currencyID="USD">0.0</Fee>
</Fee>
<Fee>
<Name>BoldFee</Name>
<Fee currencyID="USD">0.0</Fee>
</Fee>
<Fee>
<Name>BuyItNowFee</Name>
<Fee currencyID="USD">0.0</Fee>
</Fee>
<Fee>
<Name>CategoryFeaturedFee</Name>
<Fee currencyID="USD">0.0</Fee>
</Fee>
<Fee>
<Name>FeaturedFee</Name>
<Fee currencyID="USD">0.0</Fee>
</Fee>
<Fee>
<Name>GalleryPlusFee</Name>
<Fee currencyID="USD">0.0</Fee>
</Fee>
<Fee>
<Name>FeaturedGalleryFee</Name>
<Fee currencyID="USD">0.0</Fee>
</Fee>
<Fee>
<Name>FixedPriceDurationFee</Name>
<Fee currencyID="USD">0.0</Fee>
</Fee>
<Fee>
<Name>GalleryFee</Name>
<Fee currencyID="USD">0.0</Fee>
</Fee>
<Fee>
<Name>GiftIconFee</Name>
<Fee currencyID="USD">0.0</Fee>
</Fee>
<Fee>
<Name>HighLightFee</Name>
<Fee currencyID="USD">0.0</Fee>
</Fee>
<Fee>
<Name>InsertionFee</Name>
<Fee currencyID="USD">0.0</Fee>
</Fee>
<Fee>
<Name>InternationalInsertionFee</Name>
<Fee currencyID="USD">0.0</Fee>
</Fee>
<Fee>
<Name>ListingDesignerFee</Name>
<Fee currencyID="USD">0.0</Fee>
</Fee>
<Fee>
<Name>ListingFee</Name>
<Fee currencyID="USD">0.0</Fee>
</Fee>
<Fee>
<Name>PhotoDisplayFee</Name>
<Fee currencyID="USD">0.0</Fee>
</Fee>
<Fee>
<Name>PhotoFee</Name>
<Fee currencyID="USD">0.0</Fee>
</Fee>
<Fee>
<Name>ReserveFee</Name>
<Fee currencyID="USD">0.0</Fee>
</Fee>
<Fee>
<Name>SchedulingFee</Name>
<Fee currencyID="USD">0.0</Fee>
</Fee>
<Fee>
<Name>SubtitleFee</Name>
<Fee currencyID="USD">0.0</Fee>
</Fee>
<Fee>
<Name>BorderFee</Name>
<Fee currencyID="USD">0.0</Fee>
</Fee>
<Fee>
<Name>ProPackBundleFee</Name>
<Fee currencyID="USD">0.0</Fee>
</Fee>
<Fee>
<Name>BasicUpgradePackBundleFee</Name>
<Fee currencyID="USD">0.0</Fee>
</Fee>
<Fee>
<Name>ValuePackBundleFee</Name>
<Fee currencyID="USD">0.0</Fee>
</Fee>
<Fee>
<Name>PrivateListingFee</Name>
<Fee currencyID="USD">0.0</Fee>
</Fee>
<Fee>
<Name>ProPackPlusBundleFee</Name>
<Fee currencyID="USD">0.0</Fee>
</Fee>
<Fee>
<Name>MotorsGermanySearchFee</Name>
<Fee currencyID="USD">0.0</Fee>
</Fee>
</Fees>
</ReviseItemResponse>
</soapenv:Body>
</soapenv:Envelope>
通过Request和Response没有发现问题。因此在ReviseItem中干脆将ReturnPolicy重新封装上去ebay源码如下:
public ReturnPolicyType getReturnPolicy() {
ReturnPolicyType returnPolicy = new ReturnPolicyType();
ReturnsAcceptedOptionsCodeType returnsAcceptedOption = ReturnsAcceptedOptionsCodeType.RETURNS_ACCEPTED;
returnPolicy.setReturnsAcceptedOption(returnsAcceptedOption.value());
//set refund
RefundOptionsCodeType refundOption = RefundOptionsCodeType.EXCHANGE;
returnPolicy.setRefundOption(refundOption.value());
//set with in
ReturnsWithinOptionsCodeType returnsWithinOption = ReturnsWithinOptionsCodeType.DAYS_14;
returnPolicy.setReturnsWithinOption(returnsWithinOption.value());
//set return ship cost by
returnPolicy.setShippingCostPaidByOption("Buyer");
//set return detail (description)
returnPolicy.setDescription("XXXXXX");
return returnPolicy;
}
但是上传至ebay,startPrint可以更新,但是ReturnPolicy detail还是没有了。
分享到:
相关推荐
EBAY教程eBAY教程eBAY教程eBAY教程eBAY教程eBAY教程eBAY教程eBAY教程eBAY教程eBAY教程
eBay简化收费结构 基本取消上架费挑战亚马逊 eBay简化收费结构 基本取消上架费挑战亚马逊
1.5. eBay架构之一:集市(Marketplaces) 1.6. eBay架构之二:支付(Payments) 1.7. eBay架构之三:电商代运营(GSI) 1.8. eBay架构之四:开发网络(Developer Networks) 2.eBay发展情况介绍 2.1. eBay整体发展...
请勿用于商业目的,请在下载后24小时内删除,如果喜欢,请购买正版。
ebay架构原则,架构演变历史及ebay的自动化
关于eBay 基础知识的考试 对于eBay卖家有极大的参考作用
2007年4月,ebaypet小爬虫1.0版推出 ,该软件只要输入ebay账户名就可以把该用户的整个店铺商品信息全部爬下来,操作简单,傻瓜式流程操作,仅需几分钟就可以让你的店铺大搬家.
ebay账户注册申请ebay账户认证美国ebay账户ebay电商服务
支持自定数据库及多帐号 http://ebayapi.uhostnet.com 这里提供免费下载 ebay 的本地数据库自动同步软件 ...下一个版本将会提供 物流追踪码的上传同步 和在线产品下载同步的 功能上 欢迎任何查询连系QQ (1208455662)
eBay架构
Ebay,克隆源码,测试可以用,php代码写
ebay SDK 747 包含了ebay.service、源代码、还有例子Samples
eBay成功者的秘密 请在下载后24小时内删除,勿用于商业目的,如果喜欢,请购买正版!
了解Ebay的架构发展和开发流程。是读者清晰的使用Ebay的架构在实践中。
nodejs-ebay-api, 用于 node.js的[No longer maintained] ... 如果有人有一个活动的fork,并且感兴趣的话,请告诉我,我将转移,项目。 介绍这个 MODULE 目的是支持 ebay ( 交易。购物。查找。销售等)的所有 api,并
批量更改发货状态或扫描发货,一键更新到eBay,可节省一个以上人工发货员! 自动给买家留下好评,上传跟踪码! 物流方式自动识别归类,降低人工核查,贵重物品自动挂号或发快递! 统计售出产品数据,好不好卖,一...
EBay运营方案.pdf
The big data system for eBay Paid Social Ads_黄毅铭@eBay.pdf
Laravel开发-ebay-legacy 此包是易趣交易API的一个层,使与易趣的交互更加容易。
需要接入ebay支付服务的必备SDK核心工具包