NAME
Config.pl - A perl script that created the configuration file for the NetSuite module.
SYNOPSIS
bash> ./Config.pl
DESCRIPTION
This module reads the WSDL file for NetSuite and produces a configuration file that is used by the NetSuite module to ensure fields are being properly mapped to their respective values. It should only need to be run everytime there is an upgrade.
USAGE
This script accepts a total of __two__ variables:
$wsdl; # the URL to the WSDL file to parse
$searchCommon; # the URL to the common xsd file
HOW IT WORKS
This module begins by traversing the common XSD file looking for ComplexTypes. Where there is a ComplexType there is a different type of __search__. Because the common XSD file contains a mapping of all potential search values, we want to make sure we know everything we can search for. When run you will see each search it reviews and the fields it processes.
After reviewing the common XSD file the module downloads the WSDL file and begins parsing the various namespaces. Each namespace is converted to a common name. For example:
Namespace: urn:accounting_2008_1.lists.webservices.netsuite.com
Converts to: accounting
Namespace: urn:types.accounting_2008_1.lists.webservices.netsuite.com
Converts to: accountingTypes
This namespace conversion and cataloging is two-tiered. Meaning it reviews each of the namespaces in the WSDL file, then follows the schema locations to the individual XSD files, and then once again looks for namespaces it hasn't yet included in the mapping. When run, you will see each namespace and then its conversion to a proper name.
After compiling a list of schemas the module traverses each XSD file (excluding core, faults, messages, and commmon) and assembles a list of names and types for each value in a record. In essence, it stores the schema of each NetSuite record to the configuration file. This way we know what values __should__ be associated with each record type.
AUTHOR
Jonathan Lloyd, mailto:webmaster@lifegames.org