RPC question - unexpected results.

We are running NATRPC v612 with EntireX Broker v7.2.x and the Broker Attribute (service) TRANSLATION = SAGTCHA.

We have a Java Wrapper RPC Service running as a server.
On requesting service from Java Wrapper Service using Mainframe as a client the translation seems not to be working.
For an example :-
It has this code: super.marshal.addDataA(isAllowedReturned.allowed?“X”:" ", 1);
So - it returns true, because I can see X in the stack trace.
Why then, when the control returns to natural is the logical variable false?

I do not think that this is a problem with translation/conversion.

Without having more information it is hard to guess what might go wrong here. One explanation might be that the definitions of the subprogram in the IDL file and in the Natural PDA are different.
Could you check this and in case they are identical post the IDL definition of this subprogram ?

We are basically running the same Java Wrapper Service, same Natural client ( NAT414) the difference being versions of RPC’s. We are running two sessions of Natural one with NATRPC v612 and the other NATRPC511.

We have two Natural Startup programs under complete using same set of program with same setup of the SERVER MAINTENANCE but different versions of RPC.

Thus I am thinking is a CONVERSION\TRANSLATION or maybe the compression is not the same thus fields are not mapped properly.
See the attachment…

Thank you in anticipation.
Levy.
NATRPC_v511_vs_v612.doc (60.5 KB)

Could you please post the IDL definition for this suprogram ?
NATRPC 51 and 61 use different versions of the internal RPC protocol and maybe there is an inconsistency.

This is the IDL we are using…

/* EntireX IDL file
/* Generated by the Software AG EntireX Workbench, Version 7.1.1.60
library ‘FunctionalSecurity’ is
program ‘RPC0050W’:‘isAllowed’ is
define data parameter
1 principalKey (A50) In /* REQUIRED
1 applicationId (A50) In /* REQUIRED
1 authorizationType (A50) in /* REQUIRED
1 authorization (A50) in
1 restrictionName (A50) in /* OPTIONAL
1 restrictionValue (A50) in /* OPTIONAL
1 Returned Out
2 errorMessage (A60)
2 allowed (L)
2 errorNumber (I4)
end-define

Thanks in anticipation.
Levy

There is no apparent reason for the behaviour you are describing. I’m not sure if you are using optional parameters in the Natural PDA. In case you do that might cause problems (but I’m not sure about that).

What is also a bit strange is that the Java RPC Server trace shows a library with name “Rimslib” but Natural library names are usually in upper case (and the IDL file uses a different library name).

The Java RPC Server trace shows only the reply from the server (which is identical in both situations), is the corresponding request also identical ?

From what you have in the .doc file, the v511 output looks incorrect: Authorization Type, AUthorization ID, etc are laid over the RPC buffer values rather than the data area.

Are there redefines being displayed in the debug trace? Natural RPC / IDL do not support any redefines.

As this appears to be a program problem, perhaps you should open a support request. They will want a complete trace log (not just a snip), the IDL and the Natural subprogram being called.

In short the issue was resolved by forcing Natural to send data as Input and Output through the usage of Natural Session parameters Attribute Definition when issuing a CALLNAT of the the stub.
e.g
CALLNAT stub(less) request (AD=O) response (AD=A).