ASP.NET Array and EntireX

Hi Everyone,

I am new to .NET and trying to creat a program using ASP/VB.NET, EntireX/RPC and Natural (please see below for my program, c# class and idl file). When I ran this program, only the first element of the array got the result whereas four elements of the array should have got the results. This same natural program is working properly when I used Java/RPC to make the call. Furthermore, even if I changed the size of the array, for example, from OutArayobj(30) to OutArrayobj(50), the program still ran with the same result. Could someone please help to explain what i did wrong.

Thank you very much in advance for your help.


Here’s the codes:

Imports SoftwareAG.EntireX.NETWrapper.Generated.ClassSchedule

Public Class WebForm1
Inherits System.Web.UI.Page
Protected WithEvents Label1 As System.Web.UI.WebControls.Label

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here

Dim broker As Broker
Dim service As Service
broker = New Broker(“”)
service = New Service(broker, “RPC/SRV1/CALLNAT”)

Dim rpcobj2 As New SoftwareAG.EntireX.NETWrapper.Generated.ClassSchedule.Classschedule(service)

Dim OutArrayobj(30) As SoftwareAG.EntireX.NETWrapper.Generated.ClassSchedule.Groups.STS555N0.OutArray

Dim Groupobj As New SoftwareAG.EntireX.NETWrapper.Generated.ClassSchedule.Groups.STS555N0()

Dim outseq(10) As System.Text.StringBuilder
Dim outRegDt, outRegTm, outUnits As System.Text.StringBuilder

Dim outRegClasses, outWaitClasses, outSeqLineCount As Decimal

rpcobj2.STS555N0(“XXXXX”, “1111”, outRegDt, outRegTm, outUnits, outRegClasses, outWaitClasses, outSeqLineCount, OutArrayobj, outseq)

Label2.Text = OutArrayobj(0).crsId.ToString

// OutArrayobj(0) will contain a value, but OutArrayobj(1) will not
// OutArrayobj(0) to OutArrayobj(3) should contain a value.

End Sub

End Class

IDL file:

Library ‘ClassSchedule’ Is
Program ‘STS555N0’ Is
Define Data Parameter
1 #IN-TERM (A6) In
1 #OUT-ARRAY (/30) Out
2 #CLASS-TYPE (A2) Out
2 #REF-NUM-A (A6) Out
2 #OPTION (A1) Out
2 #CRS-ID (A10) Out
2 #HOURS2 (A6) Out
2 #DAYS (A9) Out
2 #BLDG (A4) Out
2 #ROOM (A6) Out
2 #TIMES (A15) Out
2 #RSN-DRP (A2) Out
2 #DATES (A21) Out
2 #INSTR-NAME (A30) Out
2 #SCHED-NOTE-1 (A250) Out
2 #SCHED-NOTE-2 (A250) Out
1 #SEQ (A10/10) Out

C# class

#region * * * P L E A S E D O N O T M O D I F Y * *
** Module name : ClassSchedule.cs
** Description : Client Stub File for .NET (
** * * * P L E A S E D O N O T M O D I F Y * * *
** Author : Generated by Software AG EntireX IDL Compiler
** Template : csharp_client.tpl for C# language
** Platform : .NET-able Platforms
** Usage :
#region parameters

** IDL File : ClassSchedule
** sanitize C#
using System;
using System.Text;
using System.Runtime.InteropServices;
using SoftwareAG.EntireX.NETWrapper.Runtime;

namespace SoftwareAG.EntireX.NETWrapper.Generated.ClassSchedule.Groups
#region Groups for LIBRARY ‘ClassSchedule’, PROGRAM ‘STS555N0’

public class STS555N0
public class OutArray
[SendAs(IdlType.A, Length=2f)]public StringBuilder classType;
[SendAs(IdlType.A, Length=6f)]public StringBuilder refNumA;
[SendAs(IdlType.A, Length=1f)]public StringBuilder option;
[SendAs(IdlType.A, Length=10f)]public StringBuilder crsId;
[SendAs(IdlType.A, Length=6f)]public StringBuilder hours2;
[SendAs(IdlType.A, Length=9f)]public StringBuilder days;
[SendAs(IdlType.A, Length=4f)]public StringBuilder bldg;
[SendAs(IdlType.A, Length=6f)]public StringBuilder room;
[SendAs(IdlType.A, Length=15f)]public StringBuilder times;
[SendAs(IdlType.A, Length=2f)]public StringBuilder rsnDrp;
[SendAs(IdlType.A, Length=21f)]public StringBuilder dates;
[SendAs(IdlType.A, Length=30f)]public StringBuilder instrName;
[SendAs(IdlType.A, Length=250f)]public StringBuilder schedNote1;
[SendAs(IdlType.A, Length=250f)]public StringBuilder schedNote2;

namespace SoftwareAG.EntireX.NETWrapper.Generated.ClassSchedule
public class Classschedule
#region Constructor(s) etc for LIBRARY ‘ClassSchedule’

public Service service;

public Classschedule(){
this.service = new Service();

public Classschedule(Broker broker){
this.service = new Service(broker);

public Classschedule(Service service){
this.service = service;

#region Properties for LIBRARY ‘ClassSchedule’

public bool Encryption{
get{ return this.service.encryption; }
set{ this.service.encryption = value; }

#region Method/Function for LIBRARY ‘ClassSchedule’ PROGRAM ‘STS555N0’

public void STS555N0(
[SendAs(IdlType.A, Length=9f)][In] string inStudentId,
[SendAs(IdlType.A, Length=6f)][In] string inTerm,
[SendAs(IdlType.A, Length=10f)][Out] out StringBuilder rgstrtnApptDt,
[SendAs(IdlType.A, Length=7f)][Out] out StringBuilder rgstrtnApptTm,
[SendAs(IdlType.A, Length=10f)][Out] out StringBuilder creditUnits,
[SendAs(IdlType.N, preDecimal=3, postDecimal=0)][Out] out decimal registeredClasses,
[SendAs(IdlType.N, preDecimal=3, postDecimal=0)][Out] out decimal waitListClasses,
[SendAs(IdlType.N, preDecimal=3, postDecimal=0)][Out] out decimal seqLineCount,
[SendAs(IdlType.Group, Dim=30f)][Out] out SoftwareAG.EntireX.NETWrapper.Generated.ClassSchedule.Groups.STS555N0.OutArray outArray,
[SendAs(IdlType.A, Length=10f, Dim=10f)][Out] out StringBuilder seq
rgstrtnApptDt = new StringBuilder();
rgstrtnApptTm = new StringBuilder();
creditUnits = new StringBuilder();
registeredClasses = 0;
waitListClasses = 0;
seqLineCount = 0;
outArray = (Groups.STS555N0.OutArray)Construction.GroupArray(typeof(Groups.STS555N0.OutArray), 30, 0, 0);
seq = new StringBuilder[10];
new Ref(ref registeredClasses),
new Ref(ref waitListClasses),
new Ref(ref seqLineCount),


Hi Chuong,

I see that you run EntireX version 7.0. I would recommend to upgrade to the latest patch. We run patch 30.

If I am not wrong, SOftware AG highly recommended at least patch 10. With Patch 10 the .NET Wrapper started to support 2 and 3 dimensional arrays. And some other array related errors are fixed too.

Hope that helps,