We are having trouble when we try to use Natural sub-p’s with arrays. See the info cut and pasted below. We are getting a NAT6972. We have been advised by the Software AG person to use *Error-TA to return the “real” error.
We do not know what piece to attack first. We use many Natural sub-p’s in our production environment via the Broker TOR object and a few using RPC. This is our first with arrays and have similar ones waiting to be delivered.
I need guidance on using the *error-ta not sure where I need to reference it and guidance on how to properly format the arrays…so that we do not receive the NAT6972.
EntireX 7.1.1 patch level 30
Let me know if I need to provide any other information.
Smiles,
Karen
IDL
Library ‘XXXXX’ Is
Program ‘PRGNAME’ Is
Define Data Parameter
1 #W-USER-ID (A8)
1 #X-DAT (A30)
1 TEST-COUNT (N3) Out
1 TEST-DATA (/100)
2 TST-TY (A4)
2 TST-DT (A8)
2 SUBTEST (A2)
2 SEL-SUBTEST (A1)
2 TST-SCR (N4.2)
2 MAX-SCR (N4.2)
2 CRS-PLCMNTS (A10/1:4)
1 #RETURN-CODE (N4) Out
1 #RETURN-MSG (A60) Out
End-Define
CS Wrapper
#region Groups for LIBRARY ‘XXXXX’, PROGRAM ‘PRGNAME’
public class Prgname
{
public class TestData
{
[SendAs(IdlType.A, Length=4f)]public StringBuilder tstTy;
[SendAs(IdlType.A, Length=8f)]public StringBuilder tstDt;
[SendAs(IdlType.A, Length=2f)]public StringBuilder subtest;
[SendAs(IdlType.A, Length=1f)]public StringBuilder selSubtest;
[SendAs(IdlType.N, preDecimal=4, postDecimal=2)]public decimal tstScr;
[SendAs(IdlType.N, preDecimal=4, postDecimal=2)]public decimal maxScr;
[SendAs(IdlType.A, Length=10f, Dim=4f)]public StringBuilder crsPlcmnts;
}
}
#endregion
#region Method/Function for LIBRARY ‘ORIONWEB’ PROGRAM ‘STAW14N1’
[Program(“STAW14N1”)]
public void testScores(
[SendAs(IdlType.A, Length=8f)][In, Out] ref StringBuilder wUserId,
[SendAs(IdlType.A, Length=30f)][In, Out] ref StringBuilder xDat,
[SendAs(IdlType.N, preDecimal=3, postDecimal=0)][Out] out decimal testCount,
[SendAs(IdlType.Group, Dim=100f)][In, Out] ref EntireX.Wrappers.Student.StudentBasics.Staw14n1.TestData testData,
[SendAs(IdlType.N, preDecimal=4, postDecimal=0)][Out] out decimal returnCode,
[SendAs(IdlType.A, Length=60f)][Out] out StringBuilder returnMsg
)
{
testCount = 0;
returnCode = 0;
returnMsg = new StringBuilder() ;
service.Send(
this.GetType().GetMethod(“TestScores”),
wUserId,
xDat,
new Ref(ref testCount),
testData,
new Ref(ref returnCode),
returnMsg
);
}
#endregion
}
}
Karen Goolishian Luttrell
Artemis Development Team
FCCJ
Hi Karen,
could you please provide some more information about your application scenario: what version of Natural are you using? Is the .NET app the client? (Or do you attempt to call .NET from Natural? This is not yet supported in EXX 711.).
(The C# code fragment you sent does not fully match the IDL. Seems like
there have been made modifications to the IDL or C# code after the generation step.)
Regards, Dietmar.
.Net is the Client.
Natural version 5.5.1 Pl 18 under Unix
We did modify the C# to try to make it work.
We think it is the way the array is formatted in the natural Sub-p and the way the array is being translated in the WSDL generation for C#.
I can regen the idl and use the C# code fragment without changes but the DLL will not compile.
We ran it through the Java generator without any changes and it receives the same error. All the while the other rpc calls are working.
Do you think it has to do with the way we are implementing the C# code?
I have been asked to have the Natural programmers rewrite the sub-p(s) and flatten out the arrays in order to implement the processes. Even though I think this would alleviate the the problem on the web services side it may not be the most effcient way to access the data.
FYI - We added a store to a temporary Adabas file as the first executable code in the sub-p. The record is never stored but the conversation count for the service in the Broker control center is incremented and the NAT6972 error is returned.
Smiles,
Karen
Karen Goolishian Luttrell
Artemis Development Team
FCCJ
Here is the orginal .cs with out modifications
namespace SoftwareAG.EntireX.NETWrapper.Generated.STAW14N1.Groups
{
#region Groups for LIBRARY ‘ORIONWEB’, PROGRAM ‘STAW14N1’
public class Staw14n1
{
public class TestData
{
[SendAs(IdlType.A, Length=4f)]public StringBuilder tstTy;
[SendAs(IdlType.A, Length=8f)]public StringBuilder tstDt;
[SendAs(IdlType.A, Length=2f)]public StringBuilder subtest;
[SendAs(IdlType.A, Length=1f)]public StringBuilder selSubtest;
[SendAs(IdlType.N, preDecimal=4, postDecimal=2)]public decimal tstScr;
[SendAs(IdlType.N, preDecimal=4, postDecimal=2)]public decimal maxScr;
[SendAs(IdlType.A, Length=10f, Dim=4f)]public StringBuilder crsPlcmnts;
}
}
#endregion
}
namespace SoftwareAG.EntireX.NETWrapper.Generated.STAW14N1
{
[EntireXVersion(“7.1.1.30”)]
[Library(“ORIONWEB”)]
[Broker(“207.203.47.115:1200”)]
[Service(“RPC/SRV1/CALLNAT”)]
public class Orionweb : ServiceHolder
{
#region Constructor(s) etc for LIBRARY ‘ORIONWEB’
public Orionweb() : base() {}
public Orionweb(Broker broker) : base ( broker ) {}
public Orionweb(Service service) : base ( service ) {}
#endregion
#region Method/Function for LIBRARY ‘ORIONWEB’ PROGRAM ‘STAW14N1’
[Program(“STAW14N1”)]
public void Staw14n1(
[SendAs(IdlType.A, Length=8f)][In, Out] ref StringBuilder wUserId,
[SendAs(IdlType.A, Length=30f)][In, Out] ref StringBuilder vDat,
[SendAs(IdlType.N, preDecimal=3, postDecimal=0)][Out] out decimal testCount,
[SendAs(IdlType.Group, Dim=100f)][In, Out] ref SoftwareAG.EntireX.NETWrapper.Generated.STAW14N1.Groups.Staw14n1.TestData testData,
[SendAs(IdlType.N, preDecimal=4, postDecimal=0)][Out] out decimal returnCode,
[SendAs(IdlType.A, Length=60f)][Out] out StringBuilder returnMsg
){
testCount = 0;
returnCode = 0;
returnMsg = new StringBuilder() ;
service.Send(
this.GetType().GetMethod(“Staw14n1”),
wUserId,
vDat,
new Ref(ref testCount),
testData,
new Ref(ref returnCode),
returnMsg
);
}
#endregion
}
}
Karen Goolishian Luttrell
Artemis Development Team
FCCJ