This article explains How to call a NetSuite Web Service through SoapUI. This would help to validate the response that is generated in MuleSoft's NetSuite connector.
Step 1: Need to generate a nonce, timestamp, and valid Signature which are unique for each request. These can be generated using the below PHP code example. Here is the document provided by NetSuite on the same. Below is the complete PHP code that would generate nonce, timestamp, and signature respectively each in a new line). Replace the values url, tokenKey, tokenSecret, consumerKey, consumerSecret, and realm with your NetSuite authentication values. Save the code in a .php file.
<html>
<head>
<title></title>
</head>
<body>
<?php
$url = 'https://<your_netsuite_suitetalk_api_url>/services/NetSuitePort_2021_1';
//or https://123456.suitetalk.api.netsuite.com/services/NetSuitePort_2015_2 for webservices
//or https://123456.suitetalk.api.netsuite.com/services/rest/record/v1/employee/40 for REST web services
$httpMethod = 'POST'; //or $httpMethod = 'GET'; for REST Web Services
$tokenKey = '';
$tokenSecret = '';
$consumerKey = '';
$consumerSecret = '';
$signatureMethod = 'HMAC-SHA256'; //or HMAC-SHA1
$nonce = substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, 20);
echo $nonce;
echo "<br>";
$timestamp = time();
echo $timestamp;
echo "<br>";
$version = '1.0';
$realm = ''; //scompid or accountid
$baseString = rawurlencode($realm) ."&". rawurlencode($consumerKey) ."&". rawurlencode($tokenKey) ."&". rawurlencode($nonce) ."&". rawurlencode($timestamp);
$key = rawurlencode($consumerSecret) .'&'. rawurlencode($tokenSecret);
$signature = base64_encode(hash_hmac('sha256', $baseString, $key, true)); //or sha1
echo $signature;
?>
</body>
</html>
Step 2: Run the above PHP code to generate the values. For example, This is one of the ways to run the PHP code.
Step 3: Create a new soap project in SoapUI with the NetSuite account wsdl for example: https://<netsuite_suitetalk_api_url>/wsdl/v2021_1_0/netsuite.wsdl
Below screenshot on where to find the NetSuite SUITETALK (SOAP AND REST WEB SERVICES) url. On NetSuite account-> Setup -> Company -> Company Information -> Company URLs.
Step 4: The below example request is for savedSearch operation. Change based on your operation and replace the token passport authentication values with your NetSuite account authentication values. Provide nonce, timestamp, and signature values that are generated in the above Step 1. Send the request through SoapUI to see the response.
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<tokenPassport xmlns="urn:messages_2021_1.platform.webservices.netsuite.com">
<account xmlns="urn:core_2021_1.platform.webservices.netsuite.com">accountid</account>
<consumerKey xmlns="urn:core_2021_1.platform.webservices.netsuite.com">consumerkey</consumerKey>
<token xmlns="urn:core_2021_1.platform.webservices.netsuite.com">tokenid</token>
<nonce xmlns="urn:core_2021_1.platform.webservices.netsuite.com">generatednoncefromphpcode</nonce>
<timestamp xmlns="urn:core_2021_1.platform.webservices.netsuite.com">generatedtimestampfromphpcode</timestamp>
<signature xmlns="urn:core_2021_1.platform.webservices.netsuite.com" algorithm="HMAC_SHA256">generatedsignaturefromphpcode</signature>
</tokenPassport>
<searchPreferences xmlns="urn:messages_2021_1.platform.webservices.netsuite.com">
<bodyFieldsOnly>true</bodyFieldsOnly>
<returnSearchColumns>true</returnSearchColumns>
<pageSize>10</pageSize>
</searchPreferences>
<preferences xmlns="urn:messages_2021_1.platform.webservices.netsuite.com">
<warningAsError>false</warningAsError>
<disableMandatoryCustomFieldValidation>false</disableMandatoryCustomFieldValidation>
<disableSystemNotesForCustomFields>false</disableSystemNotesForCustomFields>
<ignoreReadOnlyFields>true</ignoreReadOnlyFields>
<runServerSuiteScriptAndTriggerWorkflows>true</runServerSuiteScriptAndTriggerWorkflows>
</preferences>
</soap:Header>
<soap:Body>
<ns0:search xmlns:ns0="urn:messages_2021_1.platform.webservices.netsuite.com">
<ns0:searchRecord xmlns:ns01="urn:sales_2021_1.transactions.webservices.netsuite.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns01:TransactionSearchAdvanced" savedSearchId="683"/>
</ns0:search>
</soap:Body>
</soap:Envelope>
001115587

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.