Web Services Natural and Arrays

Hi.
I apologize for my poor English.
I’ve a question about arrays.
Our environment is

  • EntireX XML RPC Server 7.2.1.101 Windows 2003 5.2 x86
  • Natural 4.1.4
  • AUTORPC is ON
    We call a web service with an RPC Natural Client. An extract of the idl file is
03 BEGIN
			    04 B_GEN
			      05 B_PGPOS (AV) 
			      05 B_NBREC (AV)
			      05 B_NRPG (AV)  
			    04 B_FWD
			      05 B_FWDTYP (AV)   
			      05 B_FWDSOCID (AV)  
			      05 B_FWDNAME (AV)   	 
			  03 WORKS 
			    04 WORK  (/100)  /*WORK Array delle opere	
			      05 TITLE (AV)   /*Titolo opera
			      05 TITLETYP (AV)   /*Cod tipo titolo
			      05 ISWC (AV) /*Iswc
			      05 DBKEY (AV)  /*Chiave DB
			      [...]

The web service returns the data (here is an example

<BEGIN>
		<B_GEN>
			<B_PGPOS>1</B_PGPOS>
			<B_NBREC>2</B_NBREC>
			<B_NRPG>1</B_NRPG>
		</B_GEN>
		<B_FWD>
			<B_FWDTYP>SO</B_FWDTYP>
			<B_FWDSOCID>058</B_FWDSOCID>
			<B_FWDNAME>SACEM</B_FWDNAME>
		</B_FWD>
	</BEGIN>
	<WORKS>
		<WORK>
			<TITLE>BLAH BLAH BLAH BLAH</TITLE>
			<TITLETYP>OT</TITLETYP>
			<ISWC>T345666</ISWC>
			<DBKEY>54</DBKEY>			
		</WORK>
		[...]
	)
and the RPC Natural Client works fine, but the array "WORK" is empty, while B_PGPOS and the other ones are filled!
Can someone suggest a solution for that?
If we use a fixed length for TITLE, TITLETYP, ... , we receive an error "NAT6971 Reason 5" that concerns MAXBUFF.
Why do we obtain a different behaviour?
Thanks.

Hi.
We have tested the web service call from RPC Natural with this IDL file


/* EntireX IDL file */
library 'System' is
	struct 'Struct1' is
	    define data parameter 
	    1 FIELD1 (A10)
	    1 FIELD2 (A10)
    	end-define
    
	program 'arrays' is
		define data parameter
		01 inp 	(A10) In
		01 outp       Out             
		  02 SIMPLEFIELD (A20)
		  02 Ref1 ('Struct1'/10)    
		end-define
		
** End of file

The Natural parameters are filled! It works fine.
If we use this IDL file


/* EntireX IDL file */
library 'System' is
	struct 'Struct1' is
	    define data parameter 
	    1 FIELD1 (AV)
	    1 FIELD2 (AV)
    	end-define
    
	program 'arrays' is
		define data parameter
		01 inp 	(A10) In
		01 outp       Out             
		  02 SIMPLEFIELD (A20)
		  02 Ref1 ('Struct1'/10)    
		end-define
		
** End of file

no Natural parameters FIELD1 and FIELD2 are filled!
We have a different behaviour because Natural 4.1 doesn’t accept dynamic variables within an array.
It seems that if we use fixed length elements of a structure, we will not have any problem!
But if we use this IDL file:


/* EntireX IDL file */
library 'System' is
	struct 'Struct1' is
	    define data parameter 
	    1 FIELD1 (A10)
	    1 FIELD2 (A10)
    	1 Ref2 ('Struct2'/10)
    	end-define
    
    struct 'Struct2' is
    	define data parameter
    	1 SUBFIELD1 (A10)
    	1 SUBFIELD2 (A10)
    	end-define
    
	program 'arrays' is
		define data parameter
		01 inp 	(A10) In
		01 outp       Out             
		  02 SIMPLEFIELD (A20)
		  02 Ref1 ('Struct1'/10)    
		end-define
		
** End of file

we receive an error “NAT6971 Reason 5” that concerns MAXBUFF even if we have defined fixed length!
We think that the problem exists when we define nested structure.
How can we resolve that?
Thanks.

Have you tried increasing the MAXBUFF on the server? To provide further guidance on the sizing of MAXBUFF, please indicate what versions of Natural RPC you are using, your ACIVERS, MAXBUFF and RPCSIZE settings and if you are using TCP/IP or NET (SVC).

For Natural 4.1.4, see http://servline24.softwareag.com/SecuredServices/document/java/nat414mf/parms/maxbuff_1540.htm for a description of the MAXBUFF parameter and its interaction with other parameters.