Troubleshooting Access

This topic is about possible steps to take when access to the Retail3000 API fails. NedFox has API example code available which tests and illustrates the correct operation.

The first thing to check is usage of the correct URL. By default, our Retail3000 production environment can't be reached from the outside world. It's required to contact us so we can agree how to setup communication and give you access. In first stage, you will get access only to a test environment. We have several of those, it depends of the customer which test environment is suitable. From that moment, you will receive the final Retail3000 API URL to use. It's then possible to test the response of the Retail3000 API server by simply pasting the received URL followed by an ASMX file to be used in a browser like Internet Explorer. If you have access, a list of webservice methods will apperar. If not, verify if the URL is correct and verify by a Telnet session if access is granted. For example: Telnet <Retail3000 URL> 443. If no connection can be created, you don't have access to the Retail3000 API server environment at all. Please contact supportNO-SPAM@nedfox.nl for further assistance.

From this stage, try to execute a ValidateUser webservice method from SecurityComponents.asmx. It should give 'LoginSuccessfull'. A lot of things can go wrong preventing this result. To communicate with Retail3000, it's required to pass a Retail3000AuthenticateToken by a Soap header. We advise to use our Api example software to try authentication. If that works fine, while a developed solution from PHP for examle doesn't, something has possibly gone wrong while creating that Soap header. A handy tool to debug this kind of problems is Fiddler and it can be downloaded for free from http://www.telerik.com/fiddler. What Fiddler does is showing web traffic from and to a website. Use Fiddler at first to see the html being sent from the NedFox Api example software. Then try it again from (for example) a PHP solution and compare the html data being sent. In most situations, this will demonstrate where the problem relies.

Test software

At http://download.nedfox.net/r3api/GenericRetail3000ApiTest.zip there is a simple test application which calls the methods WebserviceTest() and DatabaseTest() from GeneralComponents.asmx. This software contains an GenericRetail3000ApiTest.Exe.Config file. Before executing this software, please fill in the credentials in the .Config file, including the URL and API token. If that software works, it indicates that the API server can be reached. It can be of help again to use Fidller to trace the outgoing and returned data to and from this test application.

Below is an example from Wireshark which belong to the test application mentioned above. It only contains the WebserviceTest() method, but the same approach is off course for the DatabaseTest() method. Because of security issues the URL in the 'POST' header needs an instance name added, and the ApiToken content should be filled out again.

Send data:

POST https://proxy.api.retail3000.net/<Type your instance name here>/GeneralComponents.asmx HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 4.0.30319.42000)
ApiToken: <type your API token here>
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://retail3000.net/Retail3000Webservice/WebserviceGeneralComponents/WebserviceTest"
Host: proxy.api.retail3000.net
Content-Length: 343
Expect: 100-continue
Accept-Encoding: gzip
Connection: Keep-Alive
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><WebserviceTest xmlns="http://retail3000.net/Retail3000Webservice/WebserviceGeneralComponents" /></soap:Body></soap:Envelope>

Received data:

HTTP/1.1 200 OK
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=utf-8
Vary: Accept-Encoding
Server: Microsoft-IIS/8.5
Server: Microsoft-IIS/10.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
X-Powered-By: ASP.NET
Date: Mon, 05 Nov 2018 10:04:30 GMT
Content-Length: 423
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><WebserviceTestResponse xmlns="http://retail3000.net/Retail3000Webservice/WebserviceGeneralComponents"><WebserviceTestResult>WSOK</WebserviceTestResult></WebserviceTestResponse></soap:Body></soap:Envelope>

Support

If the steps mentioned above haven't given a solution for the access problem, please contact our supportdesk for further assistance.