4

I am having trouble accessing the Sandbox environment through the Suitetalk web services. I am using the 2016_2 WSDL. I have tried making use of the newest version WSDL, but this did not help.

I am using this on an existing test application, which now stopped working. I can still access the NetSuite production environment through Suitetalk. The error I receive: "The underlying connection was closed: An unexpected error occurred on a send."

The error occurs on any call made to the API. So far, I haven't seen anyone else online with a similar issue.

Any help will be appreciated, thank you in advance.

Charl
  • 812
  • 1
  • 8
  • 22

3 Answers3

3

Your problem is likely TLS 1.2 but your client is only supporting TLS 1.0 or 1.1

This change was made by Netsuite and according to their release, on October 7th but I'm guessing it was moved back because a customer of mine had the issue over the weekend initially and I had to rush a patch fix.

If you are using Dotnet, try this static property:

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12
Erick Smith
  • 937
  • 7
  • 27
  • 1
    NetSuite also reached out today and mentioned that this could be the problem. I forgot to mention that I am using Dotnet. Thank you, this fixed my problem. – Charl Oct 26 '17 at 12:23
2

NetSuite recently implemented a new URL format for accessing their SuiteTalk web services. The new URL starts with your account number. Old URLs, like

https://webservices.netsuite.com/services/NetSuitePort_2016_2

continue to work, but can experience "routing issues." NetSuite recommends adopting a new format for your web reference that looks like this:

https://{your_acct_number}.suitetalk.api.netsuite.com/services/NetSuitePort_2016_2

I recently experienced problems where my SuiteTalk app could login successfully, but then could not run any web methods, like service.search() without getting an error. The errors were be very misleading, something like "connection timeout."

Once I finished my support call with NetSuite, I wrote up the correct method of connecting a SuiteTalk app using the latest URL format. You can find that article here:

https://followingnetsuite.wordpress.com/2018/05/10/suitetalk-urls-demistified/

Kevin M
  • 189
  • 2
  • 10
  • Thanks Kevin. I'm going to look into this and rework some of my projects where needed. – Charl May 12 '18 at 17:22
  • This answer solved a problem I was having that resulted in "Invalid login attempt" errors, so many thanks. I think it's interesting Google led me right here even though the question itself seems different. As far as I can tell, Sandbox accounts that are set to use the "standard" domain can only be accessed with this new scheme. – Darren Ringer Nov 19 '18 at 17:17
0

You likely need to configure the correct endpoint.

There are a couple of things to keep in mind.

If you are using the Java client you'll need to do something like:

NetSuiteServiceLocator service = new NetSuiteServiceLocator();
if(overrideEndPoint != null) service.setNetSuitePortEndpointAddress(overrideEndPoint);

The endpoint used to be easy:

e.g. like https://webservices.sandbox.netsuite.com/services/NetSuitePort_2010_2 where the date corresponds to your version of SuiteTalk

but now you need to look up the data center for your account and environment

when doing a sandbox lookup you need to run the getDataCenterURLs operation against https://webservices.sandbox.netsuite.com not against https://webservices.netsuite.com

bknights
  • 14,408
  • 2
  • 18
  • 31