Creating a SOAP Web Services PHP Project

For each project you need to perform the following steps:

  1. Copy the PHPToolkit directory to the directory in your IDE where your project resides.

  2. Edit the NSconfig.php file, substituting your own account details.

  3. If SOAP logging is required, create a folder called nslog inside the PHPToolkit folder. See Logging SOAP Requests and Responses Using the PHP Toolkit for more details.

  4. Each solution needs to include the NetSuiteService.php file by adding the following line to the main source file:

                     require_once '../PHPToolkit/NetSuiteService.php'; 
    
                

    This step will prompt most IDEs to parse the NetSuiteService.php file for auto completion information.

  5. Instantiate a service:

             $service = new NetSuiteService(); 

        
Important:

Each time you upgrade your NetSuite endpoint, for example from WSDL version 2023.1 to 2023.2, you will also need upgrade the NetSuiteService.php class library to take advantage of any new features.

In 2016.1, token-based authentication support was added to the PHPToolkit.

The following guidelines should be followed when using token-based authentication with PHPToolkit:

For more information about token-based authentication, see Token-based Authentication (TBA).

Related Topics

PHP Toolkit Overview
Downloading the PHP Toolkit
Configuring an Environment for the PHP Toolkit
Creating and Submitting Records Using the PHP Toolkit
Logging SOAP Requests and Responses Using the PHP Toolkit
Troubleshooting PHP and SOAP Web Services

General Notices