Skip to content

Regardless of Config, All Calls Go to Wrong DataCenter #434

@imageaid

Description

@imageaid

I am attempting to update our NetSuite gem's configuration so that our requests go to the "right" data center.

However, regardless of what I enter into the initializer, all requests go to the wrong data center, using the 'generic' wsdl: https://webservices.netsuite.com/services/NetSuitePort_2017_2 as it appears to drop the na2. from the 'correct' URL (see below).

In my configuration/initializer, I have specified one of two options:

# config/initializers/netsuite.rb
NETSUITE_CONFIG = YAML.load_file(File.join(Rails.root, 'config', 'netsuite.yml'))[Rails.env].symbolize_keys

NetSuite.configure do
  reset!

  api_version   '2017_2'

  wsdl          "https://webservices.na2.netsuite.com/services/NetSuitePort_#{api_version}"
  # I have tried, with the same results, using one of the options below instead
  # wsdl          "https://OURACCT#.suitetalk.api.netsuite.com/wsdl/v#{api_version}_0/netsuite.wsdl"
  # wsdl_domain   'OURACCT#.suitetalk.api.netsuite.com'

  sandbox false
  account           NETSUITE_CONFIG[:api_account]
  consumer_key      NETSUITE_CONFIG[:consumer_key]
  consumer_secret   NETSUITE_CONFIG[:consumer_secret]
  token_id          NETSUITE_CONFIG[:token_id]
  token_secret      NETSUITE_CONFIG[:token_secret]

  read_timeout 100_000
  # let's save this stuff to its own log
  log File.join(Rails.root, 'log/netsuite.log')

  soap_header 'platformMsgs:ApplicationInfo' => {
    'platformMsgs:ignoreReadOnlyFields' => true
  }
end

The long and short is that no matter what I have in the initializer/config file, the library only makes requests to "https://webservices.netsuite.com/services/NetSuitePort_2017_2". I have even tried as wsdl "http://dumburls.com/i/hate/netsuite" as a WSDL URL and it still just goes to the URL noted above.

One final note: if I change the API Version in the config file, it DOES change the request to https://webservices.netsuite.com/services/NetSuitePort_2015_1 but still ignores whatever I have for wsdl or wsdl_domain.

Any direction or suggestions would be most appreciated and thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions