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

Re: using WSDL2PRG




The DIM parameter specifies the default array dimension of array elements
that have "maxOccurs" set to "unbounded". Sample:

   <xs:element name="person" maxOccurs="unbounded">

WSDL2RPG generates a DIM_A* constant for each array it encounters. You can
change that constant to any value you like except for 0. The problem is to
find the right balance between the length of strings and the number of
array elements. Usually programmers want both values sets to "unlimited"
which unfortunately is not possible in RPG. With V6 we are close to
"unlimited" because IBM increased the length of strings to 16MB. On the
other hand it may not be a good idea to declare each and every string as
16MB, isn't it?

Thomas.


>
> Thomas - what does the DIM parm do?  Can i make that smaller to avoid
> hitting the 64K limit?
>
> Larry Kleinman
> Kleinman Associates, Inc.
> 212-949-6469
> 203-255-4100
>
>
>

>              Thomas Raddatz

>              <thomas.raddatz@t

>              ools400.de>
To
>              Sent by:                  HTTPAPI and FTPAPI Projects

>              ftpapi-bounces@li         <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>

>              sts.scottklement.
cc
>              com

>
Subject
>                                        Re: using WSDL2PRG

>              03/14/2009 06:30

>              AM

>

>

>              Please respond to

>                 HTTPAPI and

>               FTPAPI Projects

>              <ftpapi@xxxxxxxxx

>               ttklement.com>

>

>

>
>
>
>
> Scott,
>
> You are absolutely right. There is nothing I could add except for that
you
> can change the default
> length for strings at the WSDL2RPG command prompt. Press F9 to see the
> additional parameters STRLEN
> and DIM. If you do that that new default length is assigned to all
strings
> and you may hit the RPG
> barrier of 64k. Due to the limitations of RPG the result data structure
> generated by WSDL2RPG can not
> exceed 64k.
>
> The other option you have is to change the *_t type definition only for
that
> specific variable. If
> that also does not work you have to have to get into the generated code
and
> replace the variable by a
> pointer and manually allocate storage and copy the value to that pointer.
> Larry, let me know if you
> hit that problem and I will try to figure out how to do that.
>
> Thomas.
>
>
> Scott Klement schrieb:
> > My understanding (and it may be wrong) is that WSDL documents don't
> > usually tell you the size of the string.  They simply say "data type is
> > String".
> >
> > In many languages, that's a non-issue.  Java, PHP, C#, etc all let you
> > declare a string, and don't ask you for a size.  they dynamically
update
> > the size as needed.  Thus, the standards being the way they are.
> >
> > But, when Thomas created WSDL2RPG, he had to pick a number, since RPG
> > requires it.  He picked 128, figuring it would be large enough for most
> > of the strings used in web services, without being too big (and thus
> > risking hitting RPG's memory limits).  He figured you could easily go
in
> > and change that 128 to something larger if you needed to.
> >
> > At least, that's my understanding.  I probably shouldn't speak for him,
> > but I think he told me that at one point :)
> >
> >
> >
> > Larry Kleinman wrote:
> >>    Hi all - I am just getting started with WSDL2RPG and my first few
> >>    simple attempts seem to work OK. I have now run into a problem -
one
> >>    of the fields that the web service expects can be very long (a few
> >>    thousand characters), but the "stub" created by WSDL2RPG is defined
as
> >>    128A varying. Can I just change this to a bigger number in the 2
> >>    places it is defined, or is there more to it? (Where did the 128
come
> >>    from in the first place?)
> >>    Larry Kleinman
> >>    Kleinman Associates, Inc.
> >>    212-949-6469
> >>    203-255-4100
> >>
> >>
> >>
> >>
------------------------------------------------------------------------
> >>
> >>
-----------------------------------------------------------------------
> >> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> >> http://www.scottklement.com/mailman/listinfo/ftpapi
> >>
-----------------------------------------------------------------------
> >
> > -----------------------------------------------------------------------
> > This is the FTPAPI mailing list.  To unsubscribe, please go to:
> > http://www.scottklement.com/mailman/listinfo/ftpapi
> > -----------------------------------------------------------------------
> >
> (See attached file: smime.p7s)
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------
> [Bild entfernt] [Bild entfernt] [Anhang "smime.p7s" gelöscht von
> Thomas Raddatz/GfD/DE] [Bild entfernt]
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------


--
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
-----------------------------------------------------------------------