简体   繁体   English

亚马逊产品广告API WCF4示例

[英]Amazon product advertising API WCF4 Example

I try to get the Amazon PAAPI C# Example to run but my ItemSearchResponse is always null. 我尝试让Amazon PAAPI C# 示例运行,但我的ItemSearchResponse始终为null。

What i did: 我做了什么:

  1. set my accessKeyId and secretKey in app.config . app.config设置我的accessKeyIdsecretKey (VS2012 gives a warning by the way that behavior has a invalid child element signingBehavior?!) (VS2012通过行为包含无效的子元素signingBehavior的方式发出警告?!)
  2. set <xs:element minOccurs="0" maxOccurs="1" name="ImageSets"> in the AWSECommerceService.wsdl 在AWSECommerceService.wsdl中设置<xs:element minOccurs="0" maxOccurs="1" name="ImageSets">
  3. run custom tool on Reverence.svcmap Reverence.svcmap上运行自定义工具
  4. corrected the namespaces in the Reference.cs 更正了Reference.cs中的名称空间
  5. in program.cs: itemSearch.AssociateTag = "myassociateTag-20"; 在program.cs中: itemSearch.AssociateTag = "myassociateTag-20";

what am i doing wrong? 我究竟做错了什么? In Fiddler it seems that i am getting the right response to my request. 在Fiddler中,看来我对我的要求得到了正确的答复。 At least i am getting search results in an xml. 至少我在xml中获取搜索结果。

the wsdl in the example seems to be not correct. 示例中的wsdl似乎不正确。

i replaced it with the one from 我用一个从

http://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl http://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl

via copy and paste and did step 2,3 and 4 again. 通过复制粘贴,然后再次执行步骤2,3和4。 Now it works 现在可以了

在Visual Studio 2012下“运行自定义工具”不可用。因此,我只能在VS2010下使它运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM