Page 1 of 1

External application development

PostPosted: Thu Jun 08, 2017 7:35 pm
by nexio
Hi everyone,

I am trying to develop an external web based application in .NET (preferred C#), which will connect to Jiwa and I am new to Jiwa. From what I understand is that we have to connect to Jiwa through business objects.

My question is how should I authenticate the connection, using API, or database authentication, or Jiwa Authentication, or is there any other mode of authentication we should use.

Also if there is any guide for how should we build our application, that would be very helpful. I tried to search, for the guide but couldn't find what I require as most only help with plugins and I need to build an external application which will interact with Jiwa, read the information and send back the information to Jiwa.

Thanks.

Re: External application development

PostPosted: Thu Jun 08, 2017 7:57 pm
by Mike.Sheen
Hi Nexio,

You can use our Assemblies to interact with the business logic from an external application - an example is provided in this post. This assumes your application has a low-latency path to the SQL server in which the database resides.

The authentication method typically would be what is known as Jiwa Authentication - you provide a username and password associated with a Jiwa user.

If you're building something truly external to the Jiwa database, you can use the REST API which is currently in beta. If that's more suited, then we have a demo instance of the REST API running at api.jiwa.com.au - and to get a feel for it without writing any code, you can interact with it via the Swagger UI. If you're keen to consume the REST API with code, then this article will get you started.

What version of Jiwa will you be initially targeting?

Mike

Re: External application development

PostPosted: Fri Jun 09, 2017 1:23 am
by nexio
Hi Mike,

Thanks for replying.

https://forums.jiwa.com.au/viewtopic.php?f=27&t=172 helped a lot.

My Jiwa target Version is 7.0.157.

Using the code on the page, I tried to convert it in C# as I am not used to programming in Visual Basic. This will take the invoice number and return the debtor account number. I used it with Jiwa admin user and password, but it is giving the following error:

The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.


For logging in I am using the code
Code: Select all
JiwaApplication.Manager.Instance.Logon("ServerIP", "DBName", JiwaFinancials.Jiwa.JiwaODBC.database.AuthenticationModes.JiwaAuthentication, "Admin", "Password");


The error points to that line in the code and user name and password are working in Jiwa.

Thanks.

Re: External application development  Topic is solved

PostPosted: Fri Jun 09, 2017 10:06 am
by Mike.Sheen
nexio wrote:The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

For logging in I am using the code
Code: Select all
JiwaApplication.Manager.Instance.Logon("ServerIP", "DBName", JiwaFinancials.Jiwa.JiwaODBC.database.AuthenticationModes.JiwaAuthentication, "Admin", "Password");


The error points to that line in the code and user name and password are working in Jiwa.

Thanks.


Hi,

The application / environment does not appear to have permission to log to the event log - you can stop JiwaApplication from logging by setting the LogEvents property to false before logging on.

e.g.:


Code: Select all
JiwaApplication.Manager.Instance.LogEvents = false;
JiwaApplication.Manager.Instance.Logon("ServerIP", "DBName", JiwaFinancials.Jiwa.JiwaODBC.database.AuthenticationModes.JiwaAuthentication, "Admin", "Password");

Re: External application development

PostPosted: Sat Jun 10, 2017 12:49 am
by nexio
Hi Mike,

Thanks for the code, solved the issue and the application works :).