idempierews_dart

Last updated:

0 purchases

idempierews_dart Image
idempierews_dart Images
Add to Cart

Description:

idempierews dart

idempierewsc_dart #
Description #
iDempiere Dart WebService Client is a Soap Client for iDempiere ERP https://www.idempiere.org. It allows the programmer to abstract the generation of XML requests, making development easier. This implementation can be used in Dart and Flutter.
Features #

License: LGPL 3
Language: Dart
IDE: VSCode
Version: v1.0.9

Links #

iDempiere Web Services: https://wiki.idempiere.org/en/Web_services

Example Query data #

Source:

import 'package:idempierews_dart/idempierews.dart';

main(List<String> args) async {
LoginRequest login;
WebServiceConnection client;

login = LoginRequest();
login.setUser = 'superuser @ idempiere.com';
login.setPass = 'System';
login.setClientID = 11;
login.setRoleID = 102;
login.setOrgID = 0;
login.setStage = 2;

client = WebServiceConnection();
client.setAttempts = 3;
client.setTimeout = 5000;
client.setAttemptsTimeout = 5000;
client.setUrl = 'https://test.idempiere.org';
client.setAppName = 'Dart Test WS Client';

QueryDataRequest ws = new QueryDataRequest();
ws.setWebServiceType = 'QueryBPartnerTest';
ws.setLogin = login;
ws.setLimit = 2;
ws.setOffset = 3;

DataRow data = DataRow();
data.addField('Name', '%Store%');
ws.setDataRow = data;

try {
WindowTabDataResponse response = await client.sendRequest(ws);

if (response.getStatus == WebServiceResponseStatus.Error)
print(response.getErrorMessage);
else {
print('Total rows: ${response.getTotalRows}');
print('Num rows: ${response.getNumRows}');
print('Start row: ${response.getStartRow}');
print('');
for (int i = 0; i < response.getDataSet.getRowsCount(); i++) {
print('Row: ${i + 1}');
for (int j = 0;
j < response.getDataSet.getRow(i).getFieldsCount();
j++) {
Field field = response.getDataSet.getRow(i).getFields.elementAt(j);
print('Column: ${field.getColumn} = ${field.getValue}');
}
print('');
}
}
} catch (e) {
print(e);
}
}
copied to clipboard

Output:

Total rows: 5
Num rows: 2
Start row: 3

Row: 1
Column: C_BPartner_ID = 50008
Column: Created = 2008-09-24 14:49:39
Column: Value = Store South
Column: Name = Store South
Column: Logo_ID =

Row: 2
Column: C_BPartner_ID = 50009
Column: Created = 2008-09-24 14:50:35
Column: Value = Store West
Column: Name = Store West
Column: Logo_ID =

--------------------------
Web Service: QueryBPartnerTest
Attempts: 1
Time: 1019
--------------------------
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.