473,569 Members | 2,844 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using MABLE logic engine with existing .NET applications.

Using MABLE logic engine with existing .NET applications.

MABLE web services provide an interface to MABLE business objects and logic.
Let us review some technical details of the MABLE web services.

· MABLE utilizes SOAP 1.2 protocol.
· MABLE uses AXIS 1.4 as a web service transport.
· MABLE support state-full conversations by implementing a conversation
session.

In this small article we will create a client application that use the MABLE
'Store' application

MABLE Web Service client has to maintain a state-full conversation with the
MABLE
engine. The best way to handle this is by keeping a single instance of the
MABLE web service on the client side during sequence of events. Of course,
if you are not going to use
multiple threads or MABLE applications you can create multiple instances.

Before operating and manipulating business objects and their logic and
rules, the Web Service client has to initiate the MABLE application and the
business objects that it will use:
MABLE .NET WEB SERVICE CLIENT

Here is the listing of the .NET C# console application that implements MABLE
web services. The first step we should do is to add a Web Reference to your
..NET project that is pointing to the following MABLE WSDL descriptor:

http://www.alfabdi.com/MABLEWebServi...ontroller?wsdl

Listing MABLESimpleWebS erviceClient.cs
------------------------------------------------------------------

using System;
using System.Text;
using System.Data;
using System.Configur ation;
using System.Web;
using System.Net;
using MABLESimpleWebS erviceClient.co m.alfabdi.www;

/// <summary>
/// Title: Mind Ahead Business Logic Engine - MABLE client
/// Description: MABLE Web Service
/// Copyright: (c) 2006
/// Company: AL&FA Business Data Integrity, http://www.alfabdi.com
/// Author: Alisher Fatykhov
/// </summary>

namespace MABLEClient
{
class WebServiceClien t
{
private FFrontServiceCo ntrollerService mable = new
FFrontServiceCo ntrollerService ();

public WebServiceClien t()
{
initMable();
}

private void initMable()
{
CookieContainer newCookieContai ner = new CookieContainer ();
mable.CookieCon tainer = newCookieContai ner;
mable.setEjbnam e("FFboSessionE jb");
mable.setHost(" localhost");
mable.setConfig ("store/faframework-fbo-config.xml");
mable.setDebug( "store/faframework-config.xml", "STORE");
mable.addFboSet ("FFboSessionEj b", "STORE", "PRODUCTSEARCH" , "",
"", "", "true", true);
mable.addFboSet ("FFboSessionEj b", "STORE", "PRODUCT", "", "",
"", "true", true);
}

public void getProduct()
{
mable.setParame ter("STORE", "PRODUCTSEARCH" , "STARTDATE" ,
"12/30/2005");
mable.sendActio n("STORE", "PRODUCTSEARCH" , "DATA-EVENTS",
"MAKEWHERE" );

string message = "";
if (!mable.sendAct ion("STORE", "PRODUCT",
"DATA-EVENTS","ISNEW" ))
{
message = mable.getExcept ionMessage("STO RE", "PRODUCT",
"ISNEW");
mable.sendActio n("STORE", "PRODUCT", "DATA-EVENTS",
"ROLLBACK") ;
}
else
{
mable.sendActio n("STORE", "PRODUCT", "DATA-EVENTS",
"COMMIT");
}

int size = mable.getFboSet Size("STORE", "PRODUCT");

System.Console. Write("\n\n");
System.Console. Write("\n numberProducts = " + size);
System.Console. Write("\n product = " +
mable.getParame ter("STORE", "PRODUCT", "DESCRIPTION")) ;
System.Console. Write("\n shelf = " + mable.getParame ter("STORE",
"PRODUCT", "SHELFID")) ;
System.Console. Write("\n status ="+ message);
System.Console. Write("\n\n");
}

static void Main(string[] args)
{
WebServiceClien t mableClient = new WebServiceClien t();
mableClient.get Product();
}
}
}
----------------------------------------------------------------------------------------------------

After we compile our project we run the MABLESimpleWebS erviceClient.ex e

The result will be like:
--------------------------------------------------------------------------------------
C:\...bServiceC lient\MABLESimp leWebServiceCli ent\bin\Debug>M ABLESimpleWebSe rviceClient.exe

numberProducts = 2
product = My Cat
shelf = 5
status =This business object's record is not new !
--------------------------------------------------------------------------------------

If you take a closer look at the source code of this client application you
will find a lot of similarities with the web applications we created in the
previous chapters.

Now we trace step by step what this client does first.

1. After the service object is created, it is necessary to set a
session conversation.
CookieContainer newCookieContai ner = new CookieContainer ();
mable.CookieCon tainer = newCookieContai ner;

2. Setting the MABLE EJB name by:
mable.setEjbnam e("FFboSessionE jb");

3. Setting the MABLE EJB connection parameters:
mable.setHost(" localhost");

4. Setting the MABLE application metadata location:
mable.setConfig ("store/faframework-fbo-config.xml");

5. Setting the MABLE application logging verbosity level:
mable.setDebug( "store/faframework-config.xml", "STORE");

6. Adding and initializing the MABLE business object 'PRODUCTSEARCH' :
mable.addFboSet ("FFboSessionEj b", "STORE", "PRODUCTSEARCH" , "",
"", "", "true", true);

7. Adding and initializing the MABLE business object 'PRODUCT':
mable.addFboSet ("FFboSessionEj b", "STORE", "PRODUCT", "", "",
"", "true", true);

Now we will use newly created business objects and operate with their
business logic.

8. Creating a WHERE clause for the 'PRODUCT' business object:
mable.setParame ter("STORE", "PRODUCTSEARCH" , "STARTDATE" , "12/30/2005");

This call sets the 'STARTDATE' section of the WHERE clause to the
'12/30/2005' value.

9. The client calls CCSC action 'MAKEWHERE' which will create a new
WHERE clause and repopulate the 'PRODUCT' business object.
mable.sendActio n("STORE", "PRODUCTSEARCH" , "DATA-EVENTS", "MAKEWHERE" );

10. The client checks the first business object in the stack of the
business objects if it has the 'NEW 'status.
if (!mable.sendAct ion("STORE", "PRODUCT", "DATA-EVENTS","ISNEW" ))

11. If the status of the business object is not 'NEW' than the client
gets a status message of the 'ISNEW' CCSC action.
message = mable.getExcept ionMessage("STO RE", "PRODUCT", "ISNEW");

12. Rolling back current business object transaction (In this example we
are not using MABLE auto commit feature):
mable.sendActio n("STORE", "PRODUCT", "DATA-EVENTS", "ROLLBACK") ;

More information about MABLE logic engine can be found
http://www.alfabdi.com

Al Fatykhov

Copyright (c) 2006. AL&FA Business Data Integrity. All rights reserved.
Patents pending

Mind Ahead Business Logic Engine - MABLE, Mind Ahead Web Framework and
SuperGrid are registered trademarks of AL&FA Business Data Integrity
Feb 14 '06 #1
0 1012

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
4800
by: Mark Miller | last post by:
QUESTION: Does anyone know how I can use v2.6 of the MSXML parser with .NET? BACKGROUND: I "Web to Print" process that allows our clients (newspapers) to export their data and pass it thru a custom Xslt stylesheet we have created for their print system. The idea of the whole process for them is they request the export and then they get a...
3
6004
by: Katrina | last post by:
I am trying to write a piece of code that will search through a number of different tables (current one being tableNm) to look for a specific street name that has been entered by the user and saved as Enteredstreet. If the street is found I then want to display a message box saying what table the street name is in. The code I am currently...
11
2591
by: hazz | last post by:
before I start filling up the first page of perhaps many pages of code with if/then or switch:case buckets, I wanted to step back and see if there is a better way... I will have a table with up to 300 rules in it. Maybe more... In each Score table there is a column which will refer to a domain specific table and another table column that...
0
2071
by: dtsearch | last post by:
New release expands-through a .NET Spider API, to Linux, and to OpenOffice-dtSearch's ability to index over a terabyte of text in a single index, with indexed search time typically less than a second BETHESDA, MD (January 10, 2006) dtSearch Corp., a leading supplier of enterprise and developer text retrieval software, announces Version 7.2...
0
2389
by: Al Fatykhov | last post by:
Free MABLE/Eclipse 3.1 integration plug-in can be downloaded from http://www.alfabdi.com . You can download a trial version of MABLE for JBoss. Sincerely, Al Fatykhov AL&FA Business Data Integrity www.alfabdi.com
0
1201
by: Al Fatykhov | last post by:
Using MABLE logic engine with existing .NET applications. MABLE web services provide an interface to MABLE business objects and logic. Let us review some technical details of the MABLE web services. · MABLE utilizes SOAP 1.2 protocol. · MABLE uses AXIS 1.4 as a web service transport. · MABLE support state-full conversations by...
0
1515
by: dtsearch | last post by:
A new beta build offers 64-bit developer access to dtSearch's "terabyte indexer," and preliminary MS Word 2007 and Excel 2007 support (in both 64-bit and 32-bit versions) BETHESDA, MD (July 22, 2006) dtSearch Corp., a leading supplier of enterprise and developer text retrieval software, announces a native 64-bit beta version of the...
1
1896
by: Ted | last post by:
I managed to get it installed OK, along side MS Visual Studio 2005 (with which I received it). During the install, I made sure I installed everything. I have developed a number of applications using MySQL v 5 and PostgreSQL, but I have not worked with MS SQL. Playing with it after installing it, and running through several tutorials, I...
0
2271
by: Al Fa | last post by:
MABLE Business logic engine, version 2.5 for Tomcat 5.5.x is available for download : http://www.alfabdi.com/alfabdi/download/install_linux.zip All the best ! Al http://www.alfabdi.com
5
6475
by: Dave | last post by:
I need to filter an Access 2000 result set in ASP 30 using the ADO recordset.filter. I build the filter in pieces. The first clause of the filter is this... WHERE word LIKE 'S%' ... to which other clauses are appended with AND. This all works fine as long as I provide a condition for the first clause
0
7695
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7922
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
6281
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5509
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2111
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1209
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.