[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Where is my DS sub fields ?



   There is nothing more to do. All I did was to:
   a) change module WSDL2R05
   b) compile module WSDL2R05
   c) update program WSDL2RPG
   I tested it with v1.14beta10 and I backported it to v1.13.2 and tested
   it with that version. Both tests have been successful.
   I suggest to compile module WSDL2R05 with DBGVIEW(*LIST). Then you can
   add a breakpoint to procedure cbRetrictionStart() to verify whether of
   not the right code is executed:
     BREAK 11734 when type.qName.lname = 'numeric5'
     (the statement number might be different for your module)
   11732     321500     when (i_xPath =
   cWSDL_SECTION_RESTRICTION_MAXLENGTH);
   11733     321600
   11734     321700        value =
   f_val(XMLSAXParser_getAttributeValueByQName(
   11735     321800                         attrList: cXSD_ATTR_VALUE));
   11736     321900        // if (TypeDef_getLength(type) <> -1);
   11737     322000           TypeDef_setLength(type: value);
   11738     322100        // endif;
   Thomas.
   ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx schrieb am 08.07.2011 10:16:31:
   > Von: dhanushkamanjula@xxxxxxxxx
   > An: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
   > Datum: 08.07.2011 11:50
   > Betreff: Re: Where is my DS sub fields ?
   > Gesendet von: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   >
   > Hi Thomas,
   > I changed the WSDL2R05 source, compiled it & update the WSDL2RPG
   program as
   > per you.
   > Then regenerated the rpg stub for service program
   > but still my variables are something like this..
   > D n1_decimal9_6_t...
   > D                 S              9S 6 based(pDummy)
   > D n1_numeric10_t  S            128A   varying
   > D                                     based(pDummy)
   > D n1_numeric2_t   S            128A   varying
   > D                                     based(pDummy)
   > D n1_numeric3_t   S            128A   varying
   > D                                     based(pDummy)
   > D n1_numeric4_t   S            128A   varying
   > D                                     based(pDummy)
   > D n1_numeric5_t   S            128A   varying
   > D                                     based(pDummy)
   > D n1_numeric6_t   S            128A   varying
   > D                                     based(pDummy)
   > D n1_quantum13_3_t...
   > D                 S             13S 3 based(pDummy)
   >
   > are there any additional works to do?
   >
   > Thanks
   >
   > On Fri, Jul 8, 2011 at 11:49 AM, <thomas.raddatz@xxxxxx> wrote:
   >
   > >
   > >   As far as I can see the digits and fractions restrictions are
   properly
   > >   retrieved from the wsdl file for numeric values. Unfortunately
   that is
   > >   not true for the 'maxLength' restriction, which is set in module
   > >   WSDL2R05, procedure cbRestrictionStart(). Therefore the
   character
   > >   fields of your wsdl, which actually are meant to take numeric
   values
   > >   (such as "numeric5"), are generated as 128A fields which allows
   you to
   > >   specify values that are too large. Feel free to change the
   following
   > >   statements of module WSDL2R05:
   > >   when (i_xPath = cWSDL_SECTION_RESTRICTION_MAXLENGTH);
   > >      value = f_val(XMLSAXParser_getAttributeValueByQName(
   > >                       attrList: cXSD_ATTR_VALUE));
   > >      // if (TypeDef_getLength(type) <> -1);
   > >         TypeDef_setLength(type: value);
   > >      // endif;
   > >   when (i_xPath = cWSDL_SECTION_RESTRICTION_TOTAL_DIGITS);
   > >   Then compile the module and update program WSDL2RPG. Now your DS
   > >   should be generated like this:
   > >   D n1_decimal9_6_t...
   > >   D                 S              9S 6 based(pDummy)
   > >   D n1_numeric10_t  S             10A   varying
   > >   D                                     based(pDummy)
   > >   D n1_numeric2_t   S              2A   varying
   > >   D                                     based(pDummy)
   > >   D n1_numeric3_t   S              3A   varying
   > >   D                                     based(pDummy)
   > >   D n1_numeric4_t   S              4A   varying
   > >   D                                     based(pDummy)
   > >   D n1_numeric5_t   S              5A   varying
   > >   D                                     based(pDummy)
   > >   I do not think that I will backport that fix to v1.13.x. But of
   course
   > >   I will have fixed it in 1.14beta10 (coming soon).
   > >   Last but not least, please keep in mind, that so far WSDL2RPG
   does not
   > >   verify any values or enforce any special rules, such as patterns
   or
   > >   enumerations. That is the obligation of the user of WSDL2RPG.
   Frankly
   > >   I do not really want to start adding such things because I fear
   to
   > >   open Pandora's Box.
   > >   Thomas.

   --
   IMPORTANT NOTICE:
   This email is confidential, may be legally privileged, and is for the
   intended recipient only. Access, disclosure, copying, distribution, or
   reliance on any of it by anyone else is prohibited and may be a
   criminal
   offence. Please delete if obtained in error and email confirmation to
   the sender.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------