Link to home
Start Free TrialLog in
Avatar of Theo Kouwenhoven
Theo KouwenhovenFlag for Netherlands

asked on

using the IBM "wsdl2rpg.sh" tool (part 2)

Hi Experts,

I have Generate the sources for a webservice with the default string length of 128.
In the service there is one element that have  to contain  base64 data so 128 pos it to small,
So I like to set the the size of only 1 field to 16384 (or even more).

Therefore I tried to copy the  xsd_string definition to a  xsd_Lstring definition and changed the value entry to a larger number.
After that I changes all required likeds(xsd_string) into xsd_Lstring  (I think i did, but probably I missed one or more)
Then recreated the Service-program.
I understand what is wrong, but can't find where to change that.

Whatever I try I keep the error:

Message RNQ0202
The call to stub_op_M1 ended in error (C G D F).
Cause . . . . . :   RPG procedure TRNS001R in program KWNPGM61/TRNS001R at    
  statement 3456 called program or procedure stub_op_M1, which ended in error.
  If the name is *N, the call was a bound call by procedure pointer.          
Recovery  . . . :   Check the job log for more information on the cause of the
  error and contact the person responsible for program maintenance.          

more info (f10)

Message: RNX0115
Message . . . . :   Length of varying length variable is out of range.      
Cause . . . . . :   The length of a varying length character or DBCS variable
  is less than 0 or greater than its declared maximum length in RPG procedure
  XSD_STRING in program KWNPGM61/TRANSUS01.                                  
Recovery  . . . :   Contact the person responsible for program maintenance to
  determine the cause of the problem.
Avatar of Gary Patterson, CISSP
Gary Patterson, CISSP
Flag of United States of America image

Need to see your code.
Ok, good.  I see where the call is happening.  Also need a formatted dump of TRNSR001R when the error occurs, and also stub_op_M1 - so we can see variable values.
Avatar of Theo Kouwenhoven

ASKER

Hi Gary,

Attached the sources again, changed with the xsd_Lstring definition
I also added the xsd_LstringCopyIn_ AND xsd_LstringCopyOut_
zip. Including Dump and compiler listing (if required)

It keep telling me that XSD_STRING is out of range I thought that I replaced them (where required) with the XSD_LSTRING version.
not clear what I skipped.... :(

(hours later.... still no clue)
I foud out that the problem is (probably) in a C program My C knowledgr is *zero.

In Source WebConnectSoap_util.rpgle Line 6 is causing the problem  "strlen_ = %LEN(in_.value);" (still no clue)
// Set C field(s) - C strings are null-terminated pointers.

if (in_.isNil = *ON);                                      
  out_ = *NULL;                                            
else;                                                      
  strlen_ = %LEN(in_.value);                              
  if (strlen_ >= MAX_STRING_LEN);                          
    pNullChar_ = %addr(in_.reserved);                      
  else;                                                    
    pNullChar_ = %addr(in_.value) + VARYING_LEN + strlen_; 
  endif;                                                   
                                                           
  nullChar_ = X'00';                                       
  out_ = %addr(in_.value) + VARYING_LEN;                   
endif; 

Open in new window



Regenerate the web-service with -md16384 will help to get a working version, but that is a workarond.
For now it could work, because the 3 web-service has a maximum of 3 elements each.
But in future web-services, with massive XML structures, this is not the solution, help still wanted?
ASKER CERTIFIED SOLUTION
Avatar of Theo Kouwenhoven
Theo Kouwenhoven
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial