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 asp.net 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.
Chuong
Here’s the asp.net 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(“111.111.000.2:2222”)
service = New Service(broker, “RPC/SRV1/CALLNAT”)
broker.Logon(“”)
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-STUDENT-ID (A9) In
1 #IN-TERM (A6) In
1 #RGSTRTN-APPT-DT (A10) Out
1 #RGSTRTN-APPT-TM (A7) Out
1 #CREDIT-UNITS (A10) Out
1 #REGISTERED-CLASSES (N3) Out
1 #WAIT-LIST-CLASSES (N3) Out
1 #SEQ-LINE-COUNT (N3) Out
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
End-Define
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 (7.1.1.0)
**
** * * * 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 :
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,
RCTran@mtsac.eduabia