I'm trying to work with Amazon's Web Services. I have successfully used VS2008 to create the Service Reference. It auto generated the proxy Reference.cs and app.config files successfully.
When I execute this line:
AWSECommerceServicePortTyp
eClient ecs = new AWSECommerceServicePortTyp
eClient();
I get the error:
Could not find default endpoint element that references contract 'AmazonWebService.AWSEComm
erceServic
ePortType'
in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.
Here is the app.config file:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="AWSECommerceServiceB
inding" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false"
hostNameComparisonMode="St
rongWildca
rd"
maxBufferSize="65536" maxBufferPoolSize="524288"
maxReceivedMessageSize="65
536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="81
92" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="163
84" />
<security mode="None">
<transport clientCredentialType="None
" proxyCredentialType="None"
realm="" />
<message clientCredentialType="User
Name" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="
http://soap.amazon.com/onca/soap?Service=AWSECommerceService"
binding="basicHttpBinding"
bindingConfiguration="AWSE
CommerceSe
rviceBindi
ng"
contract="AmazonWebService
.AWSEComme
rceService
PortType" name="AWSECommerceServiceP
ort" />
</client>
</system.serviceModel>
I have tried putting in the full namespace in the contract field as "Rodunu.Services.Amazon.Am
azonWebSer
vice.AWSEC
ommerceSer
vicePortTy
pe" and receive the same error.
All help is appreciated.
Start Free Trial