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

Re: http_url_post Question



   Thank you very much, Scott, was my fault to miss that parameter when I
   did the code. I appreciate your help.
   Jeff

   On Wed, Apr 2, 2008 at 4:21 PM, Scott Klement
   <[1]klemscot@xxxxxxxxxxxx> wrote:

     In your call to http_url_post() you are passing %addr(SOAP) as the
     second parameter.   Change that to %addr(SOAP)+2.
     Your SOAP variable is a VARYING string in RPG.  VARYING strings
     have a
     2-byte length (as a binary integer) at the start of the string,
     2-byte
     length is maintained by RPG under the covers so you never see it --
     but
     basically it always contains the current length of your string so
     that
     when you call the %len() BIF it knows what to return, etc.
     The problem is when you reference it with a pointer (and that's
     what
     %addr(SOAP) does.. it gets a pointer to the variable) the pointer
     will
     point to the 2-byte length instead of the actual data.
     If you change your code to %addr(SOAP)+2 it will start 2 bytes
     later in
     memory, which causes it to skip over that length.

   Jeffreehy Talavera wrote:
   >    Thanks Scott,
   >    Now I'm getting "Server was unable to process request." --&gt;
   >    '&#x1;', hexadecimal value 0x01, is an invalid character. Line 1
   ,
   >    position 1.</faultstring> , I attached the program
   (JETACITPU2.TXT) ,
   >    httpapi_debug.txt. can you take a look to othem please.
   >    thank you very much.
   >
   >    On Tue, Apr 1, 2008 at 11:19 PM, Scott Klement

   >    <[1]sk@[2]scottklement.com> wrote:
   >
   >      EXAMPLE20 shows how to send a longer SOAPAction.  Take a look
   at
   >      the
   >      code for EXAMPLE20.
   >
   >    Jeffreehy Talavera wrote:
   >    >    I got an error message, because the SOAPAction is getting
   >    truncated.
   >    >    as you can see, the SOAPAction  is  greater than  64
   characters
   >    and
   >    >    it gets truncated when I execute the program, as you can see
   in
   >    the
   >    >    httpapi_debug.txt file attached
   >
   >
   -------------------------------------------------------------------
   >      ----
   >      This is the FTPAPI mailing list.  To unsubscribe, please go to:

     >      [2]http://www.scottklement.com/mailman/listinfo/ftpapi

   >
   -------------------------------------------------------------------
   >      ----
   >
   >    --
   >    Jeffreehy Talavera Díaz
   >    Consultor Especialista
   >    S390, iSeries & Open Systems
   >

     > References
     >
     >    1. mailto:[3]sk@xxxxxxxxxxxxxxxx
     >    2. [4]http://www.scottklement.com/mailman/listinfo/ftpapi
     >
     >
     >
     >
     -------------------------------------------------------------------
     -----

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

   --
   Jeffreehy Talavera Díaz
   Consultor Especialista
   S390, iSeries & Open Systems

References

   1. mailto:klemscot@xxxxxxxxxxxx
   2. http://scottklement.com/
   3. mailto:sk@xxxxxxxxxxxxxxxx
   4. http://www.scottklement.com/mailman/listinfo/ftpapi
   5. http://www.scottklement.com/mailman/listinfo/ftpapi
   6. 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
-----------------------------------------------------------------------