Produmex WMS WebAPI
Overview
The WMS Web API enables users to extend functionality without deeper knowledge of the codebase or the database structure.
Expose WMS functionalities on a middle layer between Produmex objects and the applications using them. The value of this feature is making it possible to connect WMS with cloud platforms and the integration of third-party products like Kardex, Automated warehouse, Beas, etc.
WebAPI Functions in details: Produmex WMS WebAPI Functions
Important: It is recommended that the Produmex WMS WebAPI be managed by experienced users or programmers with advanced developer knowledge.
The installation & usage process consists of 7 steps:
- I. Install Produmex Service Broker
- II. (Optional) Configure dependency from the SBO Server Tools service on an MSSQL system
- III. Install Produmex WMS Server Module
- IV. Create a WebAPI user on WMS License configurator
- V. Go to Swagger and execute the Authentication method with the user & password
- VI. Receive the generator token from Swagger & Confirming the WebAPI
Installation & Usage guide for WMS WebAPI
To access the WebAPI components visit the Produmex download page:
http://www.produmex.name/PmxVersions.php?p=WMS
Note:The installation could be familiar for you, the WebAPI installation process is based on the Produmex Scan Fresh Installation. For any inconveniences during the installation you can check for extra information on the previously mentioned site.
I. Install Produmex Service Broker
Make sure that you do not run both the 32-bit version and the 64-bit version Service Broker on one environment. Only one service broker instance should be installed on a server at a time.
Tips & Tricks
When installing the web API, you might encounter errors due to blocked .dll files. These errors can involve different .dll files each time. To resolve this, you need to click ‘Unblock’ to use the web API.
Information
- The Service Broker establishes the connection between the company database/schema and the application on the mobile device. It queries the data from the database/schema, sends it to the mobile application, and it creates the SBO documents based on the requests from the mobile devices. The SBO documents are created with SAP DI API 32-bit version.
- The Service Broker can run as a service or from a command window. It creates threads for the different requests which are independent from each other, that is, if a thread has a problem, it can be closed and it does not influence the other threads.
- The Service Broker should be installed on the server which has access to the company database/schema.
- If the Service Broker does not run, the communication between the clients and the company database/schema is not possible.
- The Service Broker creates its log files at %ProgramData%\Boyum IT\Service Broker (for pre-2023.06 versions it is C:\ProgramData\BX\BX Service Broker\Logs). By default, the ProgramData folder is hidden and you must enable the Show hidden folders and files setting in Windows Settings or enter it directly to the address bar in Windows Explorer:
1. Extract the ProdumexServiceBrokerSetup file and run the BxServiceBroker.Setup.exe file.
2. Accept the License Agreement and click Install
.
The setup process is started, it may take some time.
3. Configure the service settings on the Produmex Service Broker Config form as follows.
- Service run as user:
In the Service run as user field set the user to be assigned to the service broker service in Windows. This must be a user who has rights to write the event log and the program data directory where the logs are created. The service broker service will also make a connection to the company database/schema and the user must have rights for that as well.
Note: Local System users usually do not have the right to use printers, therefore, it is recommended to configure a Windows user.
- Password:
In the Password for user field provide the password for the user.
- Service port:
The default port for the communication between the service broker and the clients is 50231. The installer will open the firewall for this port automatically, but if you change the port, you will have to change the firewall settings manually.
- Start mode:
In the Start mode drop-down menu set the start mode of the service to Auto or Manual. The recommended start mode is Auto. - Exit if any module loading fails:
The option is selected by default and if a module cannot be loaded, the Service Broker will not run. - Click
Next
.
4. On the Admin Page form specify a password for the Service Broker Administration web page in the Web password field and click Next
.
5. On the Database connection form provide the connection data to the database server that has access to the company database/schema as follows.
- Select the database type from the Database type drop-down menu.
- MSSQL
- Database Server:
Enter the name or the IP address of the database server to the field. If you have a named instance, you have to enter the name of the server and the named instance as well (for example SERVER\NAMEDINSTANCE). - Database Port:
Enter the database port on which the application can connect to the server. The default port is 1433. - SQL username:
Enter the name of the database user to the field. The default user is sa. - SQL password:
Enter the password of the database user to the field. - When working on SAP B1 Cloud, add the domain user name to the Domain user name field and enter the password to the Domain password field. Note: Domain user details are not stored on Produmex side. They are only required so that user databases can be accessed by Produmex. Your Domain user details are the ones set for the cloud (for designated databases), by its operator.
- Click
Next
and continue with step 6 in this section.
- HANA
- Database Server: The database server name must be added with the exact same format as it was added during the installation of the SAP Business One client.
- Single-Database: Enter the name or the IP address of the database server to the field.
- Database Port: Enter the database port on which the application can connect to the server.
- Single-Database: The default port is 30015.
- Multi-Database: The default port is 30013.
- SQL username:
Enter the name of the schema user to the field. The default user is SYSTEM. It is recommended to install the Service Broker with the SYSTEM user. - SQL password:
Enter the password of the database user to the field. - When working on SAP B1 Cloud, add the domain username to the Domain user name field and enter the password to the Domain password field. Note: Domain user details are not stored on Produmex side. They are only required so that user databases can be accessed by Produmex. Your Domain user details are the ones set for the cloud (for designated databases), by its operator.
- Click
Next
.
6. Set up the company database/schema on the Default SAP Company form as follows.
- Company: In the Company drop-down menu select your company.
- SAP username field: Enter an SAP user here which has at least an indirect access license as of SBO 9.2. PL08.
- SAP password: Enter the password of the SAP user.
- Select the language in the SAP language drop-down menu.
- Click
Next
.
Note: Only one company can be set up with this step. If you have more than one database/schema, you can add them in the Produmex Service Manager after finishing the installation (see documentation here).
7. This setting is used for configuring & select the Produmex WMS WebAPI's location. The WMS Location is required to be selected correctly!
Be aware if you click on the “Next” button you will skip the “Get location” selection part, without selecting your WMS Tools folder the WebAPI will NOT work!
Click on the “Get Location” button, after the pop-up windows appeared find your “WMS Tools” folder and select it. Standard location for “WMS Tools” folder is the following: C:\Program Files\Produmex\Produmex Tools
8. The system displays a summary about your settings. If a setting needs to be changed, click Back
and modify the necessary setting. If the data is correct, click Finish
.
When you selected the “WMS Tools” folder your summary will display the WMS location as well.
9. The installation is finished. Click Close
.
10. Open the Produmex Service Manager. It is automatically installed with the Service Broker.
11. Click the Companies
button and on the Select Companies form select your company database. Click OK
.
II. (Optional) Configure dependency from the SBO Server Tools service on an MSSQL system
If the server where Produmex Service Broker runs needs to be restarted frequently, it is recommended to configure dependency from the SBO Server Tools service.
When Produmex Service Broker starts, it tries to connect to the SAP environment. If the connection fails, Produmex Service Broker will not start. If the Produmex Service Broker is dependent on the SBO Server Tools service, it starts and connect to the SAP environment when the SBO Server Tools service is started as well.
Note: Make sure you do not set the dependency on HANA environments. The Produmex Service Broker is a Windows service, SAP HANA and Produmex Service Broker are running on separate servers. To avoid this issue, make sure that the HANA server is already running when you restart the server of the Service Broker.
To configure the dependency proceed as follows.
1. Open the Command Prompt window and enter the following:
C:\>sc config BXServiceBroker depend=B1ServerTools
2. Open the Services app, right-click on the Produmex Service Broker and select Properties. On the Dependencies tab you can see that the dependency is successfully added:
III. Install the Produmex WMS Server Module
The Produmex Service Broker works together with different Produmex add-ons and it uses the dlls of the given add-on. Install the dlls with the Produmex Service Broker Module Installer as follows.
1. Extract the ProdumexWMS_ServerSetup_2024.04.06.0062_SBO10.0_MSSQL_x64.zip file and run the WMSWebAPI_2024.04.06.0062_setup file.
2. Click Install
on the Produmex Service Broker Module Installer and when the installation is finished, click OK
on the Success form.
3. The system restarts the Service Broker. Click OK
on the Success form.
Note: The add-on and the server dlls must be for the same version. If you use different versions, error messages may be displayed. Start the installer and it will automatically copy the dlls. Then restart the Service Broker.
IV. Create a Web API user on WMS License configurator
Open the “License Configurator” to add new users.
When you open the License Configurator, the Automatic license type is checked by default and the License Configurator tries to download the licensing data from the Boyum IT portal automatically. If you wish to read more about the “License Configurator” click here.
If you have an active internet connection and the license can be downloaded, you will see the following window.
On the right side of the window a “WebAPI Users” tab can be seen. Click on that tab to open the users tab.
How to add new users?
In default state the window is empty, right click on the header of the WebAPI users table, with this action you can add new users to the system.
During the process of adding new users, you can define their names and passwords. Once you have entered the name and password, simply press “Enter” to save the user. Deleting users is just as straightforward; right-click on the selected user and choose the delete option. If you wish to retain the user but they are not currently needed in the workflow, you can simply check the “disable” box.
Do NOT forget to save your configurations & restart service before closing the License Configurator!
V. Go to Swagger and execute the Authentication method with the user & password
1. To connect the WebAPI to Swagger use the following link:
http://localhost:50231/swagger/ui/index#
Make sure you changed the localhost before visiting the link. The path to find your localhost number, open the “Produmex Service Manager” start the service, then click on the “hammer” icon. On the right side of window you will find the localhost number.
2. Open the previous link with the correct localhost
For authentication you must login with the created user & password that has been created in the “License Configurator”.
In the WMSAuthentication menu process with the login:
WMSAuthentication: /api/wms/authentication/login
VI. Receive the generator token from Swagger & Confirming the WebAPI
If the login process is successful, the following window will appear. A token will be displayed in this window, confirming that the WebAPI is functioning correctly.