How to: interface with business logic using Web Services - C#.Net
Introduction
All Exact Financials Enterprise business logic can be invoked as a Web Service. This document describes how to invoke the business logic Web Services from C#.Net.
The following steps are involved:
- get entity definitions
- connect to login web service and get user object
- connect to entity web service and perform action
1. get entity definitions
The web services that have been deployed on the server can be viewed with the URL:
http://<server>:<port>/<wsa>/<wsa>/wsdl?
- server: the server on which the Apache Tomcat is running
- port: the port on which Apache Tomcat is listening (default: 8080)
- wsa: the name of the Progress OpenEdge web services adapter
This will list the web services that have been deployed:
Web Services Adapter Deployed Applications
Name |
WSDL File |
Target URL |
login |
login.wsdl |
urn:com.exact.efe:login |
exceladdin |
exceladdin.wsdl |
urn:com.exact.efe.exceladdin |
credit |
credit.wsdl |
urn:com.exact.efe:credit |
mcomp |
mcomp.wsdl |
urn:com.exact.efe:mcomp |
Clicking on the WSDL file shows the WSDL. Add the WSDL as web service reference to your C# project in Visual Studio.
The basic actions available for most entities are:
- assign
- create
- delete
- find
- search
- update
2. connect to login web service and get user object
The login web service (login.wsdl), when passed a valid user and password returns a user object.
Note that the user must have 'login: web service' enabled in maintenance users.
3. connect to entity web service and perform action
mcomp.pi_dscontext6ItmpMcomp context6 = new mcomp.pi_dscontext6ItmpMcomp();
context6.adm_nr = 621;
context6.adm_nrSpecified = true;
context6.record_to_handle = true;
mcomp.pi_dscontext6ItmpMcomp[] array;
array = new mcomp.pi_dscontext6ItmpMcomp[1];
array[0] = context6;
mcomp.mcompObjClient obj = new mcomp.mcompObjClient();
mcomp.po_dscontext3 context3 = new mcomp.po_dscontext3();
bool? boolresult;
string text = obj.search("ADAADAAAAA etc", array, out context3, out boolresult);
The result is then available in:
context3.otmpMcomp;
That's all.
Additional parameters
The input dataset can contain an additional temp-table 'ttvariables'. This temp-table can contain the following fields:
- test_mode
- warnings_allowed
- field_list
- header_only
1. test mode
Can be used in create, update, delete and assign actions to check if the action will succeed. All checks are performed, the record is written to the database and if succesful the transaction is rolled back.
2. warnings allowed
Can be used in create, update, delete and assign actions to ignore functional warnings, for example when a cost center is filled but not used.
3. field list
Can be used in assign, find, update actions to only check or retrieve a limited set of fields. Note that the entity temp-tables also have a field_list field which will be used if the main field list is empty.
4. header_only
Can be used in find and update actions to indicate that any browse / line tables should be ignored. Note that this should only be used in combination with a field list of fields that do not depend on browse / line fields.
Start page Exact Financials Enterprise >
Connectivity > How to: interface with business logic using Web Services
Main Category: |
Attachments & notes |
Document Type: |
Online help main |
Category: |
|
Security level: |
All - 0 |
Sub category: |
|
Document ID: |
23.704.965 |
Assortment: |
Exact Financials
|
Date: |
11-08-2023 |
Release: |
7.03 |
Attachment: |
|
Disclaimer |