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

Re: using WSDL2PRG



   Thomas - I'm getting there....and I REALLY appreciate your patience. I
   lowered the value of DIM_A1 to 10 and raised the value of TextToSay to
   8000. It compiled, and the web service appears to be working. Is the
   only thing that I have sacrificed the ability to handle more than 10
   values of VARIABLE?
   Larry Kleinman
   Kleinman Associates, Inc.
   212-949-6469
   203-255-4100
   Inactive hide details for thomas.raddatz@xxxxxx thomas.raddatz@xxxxxx

   thomas.raddatz@xxxxxx
       Sent by: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
       03/16/2009 11:43 AM

                             Please respond to
        HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>

                                                                       To

   ftpapi@xxxxxxxxxxxxxxxxxxxxxx

                                                                       cc

                                                                  Subject

   Re: using WSDL2PRG

   Larry,
   tns:NotifyPhoneBasic uses messages tns:NotifyPhoneBasicSoapIn and
   tns:NotifyPhoneBasicSoapOut.
   The parameter of tns:NotifyPhoneBasicSoapIn is tns:NotifyPhoneBasic
   which
   is a complex element made of several string elements. Each of these
   sub
   elements are defined with maxOccurs set to 1. Hence these elements are
   no
   arrays and no DIM_A* constant is generated.
   The parameter of tns:NotifyPhoneBasicSoapOut is
   tns:NotifyPhoneBasicResponse. That element contains sub element
   NotifyPhoneBasicResult of type tns:NotifyReturn which contains sub
   element
   VariableArray. VariableArray is of type tns:ArrayOfVariable. That is
   the
   point where we hit the array! tns:ArrayOfVariable contains element
   Variable
   of type tns:Variable and is defined with maxOccurs "unbounded"!
   tns:Variable is just a key/value pair and does specify "unbounded".
   So the only array used in NotifyPhoneBasic is Variable, used by
   ArrayOfVariable, used by VariableArray, etc.
   That is why there is only one DIM_A* namely DIM_A1.
   When I generate and compile the program with the default settings, the
   size
   of tns_notifyPhoneBasicResponse_t is 34040 byte. After having changed
   DIM_A1 from 128 to 32 the new size of tns_notifyPhoneBasicResponse_t
   dropped to 9080. It is up to you to decide which string size and
   number of
   elements to use.
   The _t variables are used as type definitions. All real variables are
   declared using 'like' or 'likeds' and a _t type definition as the
   reference
   field. You find all _t type definitions in the generated stub module.
   E.g:
   *
   D tns_NotifyPhoneBasicResponse_t...
   D                 DS                  based(pDummy)
   D                                     qualified
   D  NotifyPhoneBasicResult...
   D                                     likeds(tns_NotifyReturnRnmd_t)
   *
   D tns_NotifyReturnRnmd_t...
   D                 DS                  based(pDummy)
   D                                     qualified
   D  CallAnswered                   N
   D  CallComplete                   N
   D  Country                     128A   varying
   D  Demo                           N
   D  DigitsPressed               128A   varying
   D  Duration                     10I 0
   D  EndTime                        Z
   D  MachineDetection...
   D                              128A   varying
   D  MinuteRate                   31S15
   D  QueueID                      20I 0
   D  ResponseCode                 10I 0
   D  ResponseText                128A   varying
   D  StartTime                      Z
   D  TextToSay                   128A   varying
   D  TryCount                     10I 0
   D  VariableArray                      likeds(tns_ArrayOfVariable_t)
   Please notice that 'NotifyPhoneBasicResult' if defined as
   'tns_NotifyReturnRnmd_t'.
   In your programs you have to include the generated stub module as a
   copy
   book and set a compiler condition prior to that. Let us assume that
   the
   name of the stub module is PHONE. The your program have to include
   PHONE as
   shown below to get the prototype and type definitions:
   /define prototype_phone
   /copy PHONE
   Hope that helps.
   Thomas.
   ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx schrieb am 16.03.2009 15:03:06:
   >
   > Thomas - I appreciate the help so far, and apologize for my
   ignorance,
   but I
   > am having a hard time understanding what you suggest.  (All of this
   is
   very
   > new to me.)   I only see one DIM_A in the generated code - it is
   DIM_A1
   for
   > 128 bytes - not one for each array.  Also, you suggest that I try to
   change
   > the _t type definition for that one variable, but I don't know where
   to
   find
   > it or what to change.
   >
   > If this is of any help to you, the URL of the WSDL that I am using
   is
   > [1]http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx?wsdl
   >
   > the operation that I am using is
   > tns:NotifyPhoneBasic()
   >
   > and the variable that I want to be really big is
   > TextToSay
   >
   >
   >
   > Larry Kleinman
   > Kleinman Associates, Inc.
   > 212-949-6469
   > 203-255-4100
   >
   >
   >
   >              thomas.raddatz@gf
   >              d.de
   >              Sent by:
   To
   >              ftpapi-bounces@li         ftpapi@xxxxxxxxxxxxxxxxxxxxxx
   >              sts.scottklement.
   cc
   >              com
   >
   Subject
   >                                        Re: using WSDL2PRG
   >              03/16/2009 07:06
   >              AM
   >
   >
   >              Please respond to
   >                 HTTPAPI and
   >               FTPAPI Projects
   >              <ftpapi@xxxxxxxxx
   >               ttklement.com>
   >
   >
   >
   >
   >
   >
   >
   >
   > 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:
   > > >> [2]http://www.scottklement.com/mailman/listinfo/ftpapi
   > > >>
   >
   ----------------------------------------------------------------------
   -
   > > >
   > > >
   ----------------------------------------------------------------------
   -
   > > > This is the FTPAPI mailing list.  To unsubscribe, please go to:
   > > > [3]http://www.scottklement.com/mailman/listinfo/ftpapi
   > > >
   ----------------------------------------------------------------------
   -
   > > >
   > > (See attached file: smime.p7s)
   > >
   ----------------------------------------------------------------------
   -
   > > This is the FTPAPI mailing list.  To unsubscribe, please go to:
   > > [4]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:
   > > [5]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:
   > [6]http://www.scottklement.com/mailman/listinfo/ftpapi
   >
   ----------------------------------------------------------------------
   -
   > [Bild entfernt] [Bild entfernt] [Bild entfernt]
   >
   ----------------------------------------------------------------------
   -
   > This is the FTPAPI mailing list.  To unsubscribe, please go to:
   > [7]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:
   [8]http://www.scottklement.com/mailman/listinfo/ftpapi
   ----------------------------------------------------------------------
   -

References

   1. http://ws.cdyne.com/NotifyWS/PhoneNotify.asmx?wsdl
   2. http://www.scottklement.com/mailman/listinfo/ftpapi
   3. http://www.scottklement.com/mailman/listinfo/ftpapi
   4. http://www.scottklement.com/mailman/listinfo/ftpapi
   5. http://www.scottklement.com/mailman/listinfo/ftpapi
   6. http://www.scottklement.com/mailman/listinfo/ftpapi
   7. http://www.scottklement.com/mailman/listinfo/ftpapi
   8. http://www.scottklement.com/mailman/listinfo/ftpapi

GIF image

GIF image

GIF image

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------