IBM Support

webMethods Knowlegebase : Variable array producing unexpected results in .NET environment (1765694)

Troubleshooting


Problem

When using IDL-generated C# code to call a Natural method with a 1:v variable length array, with the buffer pre-populated with 10 elements, some values of the response object are not populated (i.e. they are empty strings). On inspecting the output from the Natural method, the values are present. On inspecting the network traffic, the expected value is somewhere else in the buffer. Compared to the same IDL-generated C# code where 1:v is changed to 1:10, the values are populated as expected.

The Original IDL snippet that produces the unexpected results:

3 ptrList (/1:v)

Modified IDL that produces normal results:

3 ptrList (/1:10)

System:

• EntireX mini-runtime version: 9.7.0.0

• Consumer: .NET 4.5

• EntireX mainframe - version 9.7.0.08

The C# code difference that is generated is constrained to this line for fixed:

[SendAs(IdlType.Group, Id = 1, Dim = 10f)]public PtrListItem[] PtrList = (PtrListItem[])Construction.GroupArray(typeof(PtrListItem), 10, 0, 0);

This line for variable:

[SendAs(IdlType.Group, Id = 1, Dim = 0f, Unbounded = true, Dimensions = 1)]public PtrListItem[] PtrList = (PtrListItem[])Construction.GroupArray(typeof(PtrListItem), 1, 0, 0);

And they are called through a method that looks like:

[Program("ABC123N1")]

public void Abc123n1([SendAs(IdlType.Group)][In, Out] ref Abc123n1.Abc123 abc123) {

service.Send(this.GetType().GetMethod("Abc123n1"), abc123);

}

This is all auto-generated by the EntireX visual studio plugin.

Document Location

Worldwide

[{"Line of Business":{"code":"LOB70","label":"Z TPS"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSO27W6","label":"IBM EntireX"},"ARM Category":[{"code":"a8mKe00000000AQIAY","label":"EntireX (EXX)"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Windows Server 2008"}],"Version":"9.7"}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
20 March 2025

UID

ibm17217042