Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7666275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:47:33+00:00 2026-05-31T14:47:33+00:00

I have been having some issues with creating a connection to amazon’s MWS service.

  • 0

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:

I have placed the access key, merchant id etc within the code as follows (I actually specified my ID’s though):

String accessKeyId = "<Your Access Key Id>";
String secretAccessKey = "<Your Secret Access Key>";
String merchantId = "<Your Merchant Id>";
String marketplaceId = "<Your Marketplace Id>";

I have also declared the following using statements:

using System;
using System.Xml.Serialization;
using System.Collections.Generic;
using MarketplaceWebServiceOrders;
using MarketplaceWebServiceOrders.Model;

I instantiate the class as:

MarketplaceWebServiceOrdersConfig config = new MarketplaceWebServiceOrdersConfig();

config.ServiceURL = "https://mws.amazonservices.com/Orders/2011-01-01";
MarketplaceWebServiceOrdersClient service = new MarketplaceWebServiceOrdersClient(applicationName, applicationVersion, accessKeyId, secretAccessKey, config);

but I get the following errors:

Invalid token ‘=’ in class, struct, or interface member declaration
A field initializer cannot reference the non-static field, method, or
property ‘MarketplaceWebService..secretAccessKey’
A field initializer cannot reference the non-static field, method, or property
‘MarketplaceWebService..config’
A field initializer cannot reference the non-static field, method, or property
‘MarketplaceWebService..accessKeyId’
‘MarketplaceWebService.’ is a ‘field’ but is used like a
‘type’

If I change the first block to: string accessKeyId = .... I can remove some of the errors, however the last error I have been unable to resolve.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T14:47:34+00:00Added an answer on May 31, 2026 at 2:47 pm

    Turns out at 3pm I could still use more coffee lol my class instantiation was not occurring within the method, that has since been corrected and I am all good now!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been having some issues retrieving JSON data from a WCF service application
I have been having some issues with LINQ-To-SQL around memory usage. I'm using it
I have been having intermittent issues on some servers running Archlinux / php-fpm 5.3.9
I have been having some major issues with my Visual Studio 2008 Pro install.
I am having some issues installing my Windows Service. I followed Matt's instructions here
I have been having some issues with django-haystack and need some help. I run
I have some utility methods that use Microsoft.Web.Administration.ServerManager that I've been having some issues
I am having some issues with Android market statistics as they have not been
I have been having a some issues with Swing lately. I'm trying to make
I have been having some problems trying to get my PHP running. When I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.