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

Re: parsing help



   I spoke too soon. it's not working. I am not parsing anything ...back
   to square 1
     __________________________________________________________________

   From: "CXGBaldwin@xxxxxxxxxxxxx" <CXGBaldwin@xxxxxxxxxxxxx>
   To: HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
   Cc: "ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx"
   <ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>
   Sent: Monday, December 1, 2014 12:48 PM
   Subject: Re: parsing help
     I do not have to connect using Userid or password I consume the
   service
     from behind our firewall so I do not have to log on..
     Can anyone out there Help Donnie with his last question????
     Thanks,
     George A. Baldwin
     CGI Consultant
     Cell: 614-284-5679
     From:        Donnie Barrow <[1]ddbarrow@xxxxxxxxx>
     To:        HTTPAPI and FTPAPI Projects
   <[2]ftpapi@xxxxxxxxxxxxxxxxxxxxxx>,
     Cc:        "[3]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx"
     <[4]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>
     Date:        12/01/2014 12:24 PM
     Subject:        Re: parsing help
     Sent by:        [5]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
       __________________________________________________________________
     Boom Boom I got it. Last question. I have to sign on with a profile
   and
     password to the webservice.Is there a routine that will disconnect me
     from the web service?
           From: "[6]CXGBaldwin@xxxxxxxxxxxxx"
   <[7]CXGBaldwin@xxxxxxxxxxxxx>
     To: HTTPAPI and FTPAPI Projects <[8]ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
     Cc: "[9]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx"
     <[10]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>
     Sent: Monday, December 1, 2014 7:31 AM
     Subject: Re: parsing help
       Yes, when I return the XML from the web service using the command
   it
     is
       built in to call the procedure PARSERTRNXML... Code as follows:
         /////////////////////////////////////////////////////////////////
         // send and get the response, and parse it as an XML document.
         //  http_url_get_xml() will call the PARSERTRNXML procedure
         //  for each XML tag found.
         /////////////////////////////////////////////////////////////////
           rc = http_url_get_xml( uri: *null: %paddr(PARSERTRNXML):
   *null);
         //  If error on process then display message to user
           if (rc <> 1);
               @MSGID = 'CMS9898';
               @MSGFI = 'CISMSGFILE';
               @MSGDA = 'Error while processing data with server';
               $ERRMSG = 'Error while processing data with server';
       Now the  procedure in the program itself is like this:
       D PARSERTRNXML    PR
       D  userData                      *  value
       D  depth                      10I 0 value
       D  name                      1024A  varying const
       D  path                    24576A  varying const
       D  value                    65535A  varying const
       D  attrs                        *  dim(32767)
       D                                    const options(*varsize)
       P PARSERTRNXML    B
       D                PI
       D  userData                      *  value
       D  depth                      10I 0 value
       D  name                      1024A  varying const
       D  path                    24576A  varying const
       D  value                    65535A  varying const
       D  attrs                        *  dim(32767)
       D                                    const options(*varsize)
       D title          s          24576a  varying static
       D a              s            10i 0
       D attrName        s          1024a  varying
       D attrVal        s          65535a  varying
       *** Then the code I sent earlier to you as an example. ***
       NOTE: This code is similar to what is in the example program for
   the
       weather forcast (sorry I do not remember what program that was)
   that
     is
       in the examples in Scott's Package.
       Good Luck,
       George A. Baldwin
       CGI Consultant
       Cell: 614-284-5679
       From:        Donnie Barrow <[11]ddbarrow@xxxxxxxxx>
       To:        HTTPAPI and FTPAPI Projects
     <[12]ftpapi@xxxxxxxxxxxxxxxxxxxxxx>,
       Cc:        "[13]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx"
       <[14]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>
       Date:        11/26/2014 12:20 PM
       Subject:        Re: parsing help
       Sent by:        [15]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx

   __________________________________________________________________
       Hey George thanksI have this in my program except just like with
       example17 I used the embedded prototype and I don't see it working.
     the
       only exception I see is where you are using the HTTP_nextXMLAttr
   in
     a
       dowhile.  are you calling this in a routine?
             From: "[16]CXGBaldwin@xxxxxxxxxxxxx"
   <[17]CXGBaldwin@xxxxxxxxxxxxx>
       To: HTTPAPI and FTPAPI Projects <[18]ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
       Cc: [19]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
       Sent: Wednesday, November 26, 2014 11:48 AM
       Subject: Re: parsing help
         I had to do this for parsing the XML coming back from VIN look
   ups
     we
         do and here is how I done it... I think this may be what your
     looking
         for at least???
         in the D specs:
           D  name                      1024A  varying const
           D  path                    24576A  varying const
           D  value                    65535A  varying const
           D a                        s            10i 0
           D attrName        s          1024a  varying
           D attrVal              s          65535a  varying
         In the code:
         individual tags:
             //*******************************************************
             //**** Bring Back the Values when <<VIN DATA>>passed in**
             //*******************************************************
             if path = '/PolkServiceResponse/VinData';
               select;
               when name='vin';
                 eval SAVVIN = Value;
               when name='correctedVin';
                 eval SUGVIN = Value;
           // HANDLE INDIVIDUAL ATTRIBUTES IN THE VDTA RETURN XML //
               when name='fields';
                 A = 1;
                 dow HTTP_nextXmlAttr( attrs: a: attrName: attrVal );
                   select;
                   when attrVal = 'ABS_BRK_CD';
                     WK_VNDATA(1) = Value;
                   when attrVal = 'BODY_STYLE_CD';
                     WK_VNDATA(9) = Value;
         I do load this data to another array for other uses but this
   should
         give you an Idea of how to handle the tags in the XML being
     returned.
         Hope this helps you,
         George A. Baldwin
         CGI Consultant
         Cell: 614-284-5679
         From:        Donnie Barrow <[20]ddbarrow@xxxxxxxxx>
         To:        HTTPAPI and FTPAPI Projects
       <[21]ftpapi@xxxxxxxxxxxxxxxxxxxxxx>,
         Date:        11/26/2014 11:25 AM
         Subject:        parsing help
         Sent by:        [22]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
     __________________________________________________________________
         I have HTTPAPI and EXPAT loaded. I have attached a program I used
       from
         example 17. I call a web service and I am writing the return xml
   to
       the
         IFS /tmp folder. This all works YAiii!  But for some reason I am
       stuck
         trying to parse the daggone return XML to my array.[ or even a
     field]
         UGHHH!  Can someone help push me in the right direction? I looked
     at
         CHARDATA1 in the EXPAT examples and I kinda understand it
         but....hmmmmhow do I pull this in?  HeLP        Donnie
     BarrowiSeries
         Consultant 513.709.0370[attachment "pca001cnsm.txt" deleted by
     George
         Baldwin/ACIC]

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

   -----------------------------------------------------------------------
       References
         1. [2][2][24]http://www.scottklement.com/mailman/listinfo/ftpapi

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

   -----------------------------------------------------------------------

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

   -----------------------------------------------------------------------
     References
       1. [5][27]http://www.scottklement.com/mailman/listinfo/ftpapi
       2. [6][28]http://www.scottklement.com/mailman/listinfo/ftpapi
       3. [7][29]http://www.scottklement.com/mailman/listinfo/ftpapi
       4. [8][30]http://www.scottklement.com/mailman/listinfo/ftpapi

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

   -----------------------------------------------------------------------

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

   -----------------------------------------------------------------------
   References
     1. [33]http://www.scottklement.com/mailman/listinfo/ftpapi
     2. [34]http://www.scottklement.com/mailman/listinfo/ftpapi
     3. [35]http://www.scottklement.com/mailman/listinfo/ftpapi
     4. [36]http://www.scottklement.com/mailman/listinfo/ftpapi
     5. [37]http://www.scottklement.com/mailman/listinfo/ftpapi
     6. [38]http://www.scottklement.com/mailman/listinfo/ftpapi
     7. [39]http://www.scottklement.com/mailman/listinfo/ftpapi
     8. [40]http://www.scottklement.com/mailman/listinfo/ftpapi
     9. [41]http://www.scottklement.com/mailman/listinfo/ftpapi
     10. [42]http://www.scottklement.com/mailman/listinfo/ftpapi
   -----------------------------------------------------------------------
   This is the FTPAPI mailing list.  To unsubscribe, please go to:
   [43]http://www.scottklement.com/mailman/listinfo/ftpapi
   -----------------------------------------------------------------------

References

   1. mailto:ddbarrow@xxxxxxxxx
   2. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
   3. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   4. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   5. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   6. mailto:CXGBaldwin@xxxxxxxxxxxxx
   7. mailto:CXGBaldwin@xxxxxxxxxxxxx
   8. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
   9. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
  10. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
  11. mailto:ddbarrow@xxxxxxxxx
  12. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
  13. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
  14. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
  15. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
  16. mailto:CXGBaldwin@xxxxxxxxxxxxx
  17. mailto:CXGBaldwin@xxxxxxxxxxxxx
  18. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
  19. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
  20. mailto:ddbarrow@xxxxxxxxx
  21. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
  22. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
  23. http://www.scottklement.com/mailman/listinfo/ftpapi
  24. http://www.scottklement.com/mailman/listinfo/ftpapi
  25. http://www.scottklement.com/mailman/listinfo/ftpapi
  26. http://www.scottklement.com/mailman/listinfo/ftpapi
  27. http://www.scottklement.com/mailman/listinfo/ftpapi
  28. http://www.scottklement.com/mailman/listinfo/ftpapi
  29. http://www.scottklement.com/mailman/listinfo/ftpapi
  30. http://www.scottklement.com/mailman/listinfo/ftpapi
  31. http://www.scottklement.com/mailman/listinfo/ftpapi
  32. http://www.scottklement.com/mailman/listinfo/ftpapi
  33. http://www.scottklement.com/mailman/listinfo/ftpapi
  34. http://www.scottklement.com/mailman/listinfo/ftpapi
  35. http://www.scottklement.com/mailman/listinfo/ftpapi
  36. http://www.scottklement.com/mailman/listinfo/ftpapi
  37. http://www.scottklement.com/mailman/listinfo/ftpapi
  38. http://www.scottklement.com/mailman/listinfo/ftpapi
  39. http://www.scottklement.com/mailman/listinfo/ftpapi
  40. http://www.scottklement.com/mailman/listinfo/ftpapi
  41. http://www.scottklement.com/mailman/listinfo/ftpapi
  42. http://www.scottklement.com/mailman/listinfo/ftpapi
  43. 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
-----------------------------------------------------------------------