title: Connecting to Amazon Marketplace Web Services
body: <p>I have been having some issues with creating a connection to amazon's MWS service. I have followed the API documentation contained within the samples document with no luck. The samples work on their own. The following code is the same in the samples, as well as in my code: </p>
  
  <p>I have placed the access key, merchant id etc within the code as follows (I actually specified my ID's though): </p>
  
  <pre><code>String accessKeyId = "&lt;Your Access Key Id&gt;";
  String secretAccessKey = "&lt;Your Secret Access Key&gt;";
  String merchantId = "&lt;Your Merchant Id&gt;";
  String marketplaceId = "&lt;Your Marketplace Id&gt;";
  </code></pre>
  
  <p>I have also declared the following using statements: </p>
  
  <pre><code>using System;
  using System.Xml.Serialization;
  using System.Collections.Generic;
  using MarketplaceWebServiceOrders;
  using MarketplaceWebServiceOrders.Model;
  </code></pre>
  
  <p>I instantiate the class as: </p>
  
  <pre><code>MarketplaceWebServiceOrdersConfig config = new MarketplaceWebServiceOrdersConfig();
  
  config.ServiceURL = "https://mws.amazonservices.com/Orders/2011-01-01";
  MarketplaceWebServiceOrdersClient service = new MarketplaceWebServiceOrdersClient(applicationName, applicationVersion, accessKeyId, secretAccessKey, config);
  </code></pre>
  
  <p>but I get the following errors: </p>
  
  <blockquote>
    <p>Invalid token '=' in class, struct, or interface member declaration<br>
    A field initializer cannot reference the non-static field, method, or
    property 'MarketplaceWebService..secretAccessKey'<br>
    A field initializer cannot reference the non-static field, method, or property
    'MarketplaceWebService..config'<br>
    A field initializer cannot reference the non-static field, method, or property
    'MarketplaceWebService..accessKeyId'<br>
    'MarketplaceWebService.' is a 'field' but is used like a
    'type'</p>
  </blockquote>
  
  <p>If I change the first block to: <code>string accessKeyId = ....</code> I can remove some of the errors, however the last error I have been unable to resolve. </p>