代码之家  ›  专栏  ›  技术社区  ›  Josh Kodroff

是否有一个(C#)库可以为Amazon Marketplace Web服务创建提要?

  •  13
  • Josh Kodroff  · 技术社区  · 16 年前

    换句话说,我想这样做:

            var feed = new AmazonProductFeed();
            var list = new AmazonProductList();
    
            var product1 = new AmazonProduct();
            product1.Name = "Product 1";
            list.Add(product1);
    
            var product2 = new AmazonProduct();
            product2.Name = "Product 2";
            list.Add(product2);
    
            feed.Products = list;
            // spits out XML compliant with Amazon's schema
            Console.Write(feed.ToXml());
    

    1 回复  |  直到 16 年前
        1
  •  7
  •   Josh Kodroff    16 年前

    这个 .NET XML Schema Definition Tool

    《Amazon上销售XML指南》(SOA GuideToXML.pdf)没有包含对正确XSD的引用。链接与文档中重印的XSD不一致。我以前指向正确xsd的链接不再有效。我最好的猜测是他们能找到 here

    据我所知,这个(非常长的)命令将生成所有需要的类。请注意,您需要对生成的文件进行一些小的更改。我不记得它是用哪种方式工作的,但我要么需要将某些二维阵列更改为一维阵列([]]到[]),要么相反。我记得我必须做出这些改变的地方非常明显:

    xsd xsd\amzn-base.xsd xsd\amzn-envelope.xsd xsd\amzn-header.xsd xsd\AttributeGroups.xsd xsd\AutoAccessory.xsd xsd\Beauty.xsd xsd\CameraPhoto.xsd xsd\CatPIL.xsd xsd\CE.xsd xsd\ClothingAccessories.xsd xsd\Customer.xsd xsd\CustomerAddress.xsd xsd\FoodAndBeverages.xsd xsd\FulfillmentCenter.xsd xsd\FulfillmentOrderCancellationRequest.xsd xsd\FulfillmentOrderRequest.xsd xsd\Gourmet.xsd xsd\Health.xsd xsd\Home.xsd xsd\HomeImprovement.xsd xsd\Image.xsd xsd\Inventory.xsd xsd\Item.xsd xsd\Jewelry.xsd xsd\Lighting.xsd xsd\Listings.xsd xsd\ListingSummary.xsd xsd\Loyalty.xsd xsd\MerchantListingsReport.xsd xsd\Miscellaneous.xsd xsd\MultiChannelOrderReport.xsd xsd\Music.xsd xsd\MusicalInstruments.xsd xsd\NavigationReport.xsd xsd\Offer.xsd xsd\Office.xsd xsd\OrderAcknowledgement.xsd xsd\OrderAdjustment.xsd xsd\OrderFulfillment.xsd xsd\OrderNotificationReport.xsd xsd\OrderReport.xsd xsd\Override.xsd xsd\PaymentMethod.xsd xsd\PetSupplies.xsd xsd\Price.xsd xsd\ProcessingReport.xsd xsd\Product.xsd xsd\ProductAttributes.xsd xsd\ProductClothing.xsd xsd\ProductImage.xsd xsd\Relationship.xsd xsd\ReverseFeed.xsd xsd\SettlementReport.xsd xsd\Sports.xsd xsd\Store.xsd xsd\SWVG.xsd xsd\TiresAndWheels.xsd xsd\Tools.xsd xsd\ToysBaby.xsd xsd\TypeDefinitions.xsd xsd\Video.xsd xsd\WebstoreItem.xsd xsd\Wireless.xsd  /c /n:WebLinc.Services.Amazon.Marketplace > output.txt 2>&1
    pause