Topic
  • 2 replies
  • Latest Post - ‏2014-08-12T20:33:39Z by JohnxLong
JohnxLong
JohnxLong
63 Posts

Pinned topic WSDL2RPG Array problem not passing values to client

‏2014-08-11T13:33:56Z |

Hi,

 

I've generated the code for a web service client and its working apart from handling recurring tag sets

The definition is as follows:-

 

 D attribute_t     DS                  qualified template
 D isNil_attribute_t...
 D                                1n
 D name                                likeds(xsd_string)
 D checkInAction                   likeds(xsd_string)
 D putawayAction                  likeds(xsd_string)
 D pickingAction                    likeds(xsd_string)
 D defaultValue                     likeds(xsd_string)

 

D attribute_Array_t...
D                 DS                  qualified template
D isNil_attribute_Array_t...
D                                1n
D array                               likeds(attribute_t)
D                                        dim(20)
D size                          10i 0
D type                          10i 0

 

When I populate array.name.value = "some value", I can see it is all set in the request message, but when the client receives the request the tags aren't shown, suggesting that the values aren't set.

Just for info other values that are set that aren't in arrays are received correctly

Is there anything I need to set to indicate the number of elements in the array that are used?

Any suggestions would be appreciated.

 

Thanks in advance

 

John

  • amra1
    amra1
    54 Posts
    ACCEPTED ANSWER

    Re: WSDL2RPG Array problem not passing values to client

    ‏2014-08-12T19:07:03Z  

    Hi John,

    First, ensure before setting any fields that you clear out the data structure.

    Assuming you have done this, you do need to set the actual number of elements in the array by setting "size" field in attribute_Array_t.  In addition, you must also set the "type" field.  Since elements in array are structures, the type field would need to be set to XSDC_USER_TYPE  (value of 31).   This constant is defined in your XXXX__xsdtypes.rpgleinc file.

  • amra1
    amra1
    54 Posts

    Re: WSDL2RPG Array problem not passing values to client

    ‏2014-08-12T19:07:03Z  

    Hi John,

    First, ensure before setting any fields that you clear out the data structure.

    Assuming you have done this, you do need to set the actual number of elements in the array by setting "size" field in attribute_Array_t.  In addition, you must also set the "type" field.  Since elements in array are structures, the type field would need to be set to XSDC_USER_TYPE  (value of 31).   This constant is defined in your XXXX__xsdtypes.rpgleinc file.

  • JohnxLong
    JohnxLong
    63 Posts

    Re: WSDL2RPG Array problem not passing values to client

    ‏2014-08-12T20:33:39Z  
    • amra1
    • ‏2014-08-12T19:07:03Z

    Hi John,

    First, ensure before setting any fields that you clear out the data structure.

    Assuming you have done this, you do need to set the actual number of elements in the array by setting "size" field in attribute_Array_t.  In addition, you must also set the "type" field.  Since elements in array are structures, the type field would need to be set to XSDC_USER_TYPE  (value of 31).   This constant is defined in your XXXX__xsdtypes.rpgleinc file.


    Perfect, that's got it. Missed setting the size and type. 

     
    Thanks for the help
     
    John