MACROMEDIA COLDFUSION 5-DEVELOPING Develop Manual page 397

Table of Contents

Advertisement

Calling CORBA Objects
Example
Here is the IDL for an object:
struct SimpleStruct
{
short s;
long l;
float d;
};
struct NestedStruct
{
SimpleStruct f;
char c;
string s;
};
typedef sequence<long, 5> BLongSequence;
interface SomeObject {
short SomeMethod( in NestedStruct inStruct,
};
Here is the applicable ColdFusion code:
<!—-- Declare a couple of structures --->
<cfset x = StructNew()>
<cfif IsStruct(x)>
<cfset temp=StructInsert(x,"s",3)>
<cfset temp=StructInsert(x,"l", 256)>
<cfset temp=StructInsert(x,"d", 93.45)>
</cfif>
<cfset NestedStruct = StructNew()>
<cfif IsStruct(NestedStruct)>
<cfset temp=StructInsert(NestedStruct,"f",x)>
<cfset temp=StructInsert(NestedStruct,"c", 'b')>
<cfset temp=StructInsert(NestedStruct,"s", " Test")>
</cfif>
<!—-- Declare a sequence --->
<cfset FixedSeq = ArrayNew(1)>
<cfloop index="LoopCount" from="1" TO="5">
<cfset FixedSeq [LoopCount] = #LoopCount#>
</cfloop>
<cfset retA=obj.SomeMethod(NestedStruct, FixedSeq)>
in BlongSequence inSeq);
377

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 5

Table of Contents