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

Using %paddr(GetInnerDoc) in http_url_post_xml and thereafter http_parse_xml_stmf



   Dear al HTTP API - users..
   This spring I started an XML-project where the content in the
   XML-respons  was packed into a loooong string. (with < + > in
   stead of < + > ).
   I found a similar project in the archive and combined with som hints
   from Scott a was able to extact the inner xml document .
   Then the project was put on hold.
   NOW the project is brought to life again and I'm struggeling to
   remember / find the code I started to make in april..
   The thing is that when I use the http_url_post_xml with the
   appropriate SOAPstring and the %addr(filename)
   I succed in getting the inner document nicely to an IFS-file
   ("filename")
   rc = http_url_post_xml(

              'http://80.69.86.148/test/sync/SkynetSync.exe/'

                      +'soap/ISkynetSynchroniser'

                     : %addr(SOAP) + 2

                     : %len(SOAP)

                     : *NULL

                     : %paddr(GetInnerDoc)

                     : %addr(filename)

                     : HTTP_TIMEOUT

                     : HTTP_USERAGENT

                     : 'text/xml'

                     : 'urn:SkynetSynchroniserIntf-ISkynetSynchroniser'

                      +'#DownloadData');

   BUT when I thereafter parse this same file  within the same  program I

   get nice values in each "name" tag, but I get only "crap" in
   corresponding "value":

   rc = http_parse_xml_stmf( filename
                          : HTTP_XML_CALC
                          : *null
                          : %paddr(Incoming)
                          : *null );
   x
      some other code...
   x
   P Incoming        B
   D Incoming        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   M_Pref        s             50a   varying
   D   M_Number      s             50a   varying
   D   M_Date        s             50a   varying

    /free
          select;
          when name = 'MastermanifestPrefix';
             M_Pref    = value;
          when name = 'MastermanifestNumber';
             M_Number  = value;
          when name = 'DateofManifest';
             M_Date    = value;
       // osv...
          endsl;
   A DEBUG  ( under name 'MastermanifestPrefix') shows :
   NAME = MastermanifestPrefix
   VALUE =

             ....5...10...15...20...25...30...35...40...45...50...55...60
        1   '      HîÌ@                                            '
       61   '  @       C¢ÿÃæ                                        '
      121   '                    ENDELEMENT        @       C¢ÿÃæ      '
      181   '    *N
   '
   BUT if I access the created IFS-file in a separate program (with the
   same "Incoming" ) the values are OK..
   Any Ideas anybody ???
   This is no big crisis - I will do it  in two steps if necessary - but
    that seems so stupid.
   PS!
   I'm quite new to HTTPAPI - used it a couple of times without really
   understanding what is happening "under the hood" .
   Med vennlig hilsen / Best regards
   Jan Ottar Valderhaug
   SYSTEMA AS
   St.Halvardsgt. 33A , 0192 Oslo
   Tel: +47 22660660   Direct: +47 22660654   Mob: +47 48052470   Fax:
   +47 22660661
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------