MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual page 785

Developing coldfusion mx applications
Table of Contents

Advertisement

Displays the value of the ret variable, Yes or No.
4
IDL
struct Person
{
}
struct Account
{
}
double loanAmountl
enum cardType {AMEX, VISA, MC, DISCOVER, DINERS};
typedef sequence<cardType> CreditCards;
interface LoanAnalyzer
{
}
CFML
<!--- Declare a "person" struct ---->
<cfset p = StructNew()>
<cfif IsStruct(p)>
</cfif>
<!---- Declare an "Account" struct --->
<cfset a = StructNew()>
<cfif IsStruct(a)>
</cfif>
<!----- Declare a "CreditCards" sequence --->
<cfset cards = ArrayNew(1)>
<cfset cards[1] = 0>
<cfset cards[2] = 2>
<cfset cards[3] = 4>
<!---- Creating a CORBA handle using the Naming Service---->
<cfset handle = CreateObject("CORBA", "FirstBostonBank/MA/Loans",
"NameService") >
<cfset ret=handle.approve(a, cards)>
<cfoutput>Account approval: #ret#</cfoutput>
long pid;
string name;
string middle;
string last_name;
Person person;
short age;
double income;
boolean approve( in Account, in CreditCards);
<cfset p.pid = 1003232>
<cfset p.name = "Eduardo">
<cfset p.middle = "R">
<cfset p.last_name = "Doe">
<cfset a.person = p>
<cfset a.age = 34>
<cfset a.income = 150120.50>
<!--- corresponds to Amex --->
<!--- corresponds to MC --->
<!--- corresponds to Diners --->
CORBA example
785

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents