ebay ReviseItemCall 的一个小问题

今天在使用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还是没有了。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值