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

Re: Reading XML with &Amp; as part of string

   %scanrpl('&Amp;': '&': data)
   [1]Venter.Derick@xxxxxxxxxxxxxx wrote:

   Hi there
   Hope you can help me.
   I am trying to parse an XML document containing the string "&Amp;"
   My program just hangs. The parsing works when I remove the & character.
   The idea is to replace the string "&Amp;" with "&" to get my original
   string back before saving to the database.
   Please help
   Derick Venter
   Applications Developer IV


   Systems Integration
   Tel: +27 (13) 247 2816 Fax: +27 (0) 86 573 2274
   Cell: +27 (0) 83 458 6599
   Email: [[3]1]derick.venter@xxxxxxxxxx
   From:        Antonio Nalesso [4]<a.nalesso@xxxxxxxxxxx>
   To:        HTTPAPI and FTPAPI Projects [5]<ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
   Date:        2013/11/05 11:28 AM
   Subject:        R: HTTPAPI performance
   Sent by:        [6]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx

   Thanks a lot,
   I follow your suggestion so now I see in my log (related to WSS DHL for
   label request) :
   2013-11-05- http_persist_open(): entered
                   Login to remote server
   2013-11-05- senddoc(): entered
                   My SOAP request
   2013-11-05- SetError() #13: HTTP/1.1 200 OK
                   Server response
   So I have 2 seconds to login to DHL server and 8 seconds to have a
   reply !!!
   Are these times normal for a WSS service ? I have no idea ...
   Best regards
   PS : I use CRTRPGMOD to rebuild HTTPUTILR4. Then I use UPDSRVPGM to
   update service program, without rebuild it from zero.
   -----Messaggio originale-----
   Da: [7]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   [[3][8]mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] Per conto di Mike
   Inviato: giovedì 31 ottobre 2013 16:40
   A: HTTPAPI and FTPAPI Projects
   Oggetto: RE: HTTPAPI performance
   Earlier this year, I modded my version of the debug log to add
   timestamps to the debug. This catches most of the places that write to
   the debug log but not all, but it will probably give you enough
   information to look at.
   In HTTPUTILR4 you will find the http_dmsg procedure. Add the timestamp
   right in the procedure. Here is one way to do it.
   c                   eval      wwMsg = %char(%timestamp()) + ' ' +
   c                                     %trimr(peMsgTxt) + x'0d25'
   c                   eval      wwMsgLen = %len(%trimr(wwMsg))
   c                   callp     http_xlate(wwMsgLen: wwMsg: TO_ASCII)
   Re-install after making the mod by calling the install program.
   After the change, the debug log looks like this:
   HTTPAPI Ver 1.25beta2 released 2012-03-06
   OS/400 Ver V7R1M0

   2013-10-31- Setting variables
   2013-10-31- http_url_get(): entered
   2013-10-31- http_persist_open(): entered
   2013-10-31- http_long_ParseURL(): entered
   It should give you plenty of data to look at. By modding http_dmsg, it
   doesn't add timestamps to every message. If you think you have a low
   level problem, you will need to add timestamps in http_dwrite.
   http_dwrite expects ascii so don't forget to do the translation if you
   go to that level. You will see how in the procedure.
   If you are doing "other things" in your code, you might want to add
   your own debug messages. This would help to tell you that your other
   stuff is holding up.
   http_dmsg('Get system control');
   http_dmsg('This is my INCOMING procedure: ' + %trim(name));
   http_dmsg('Writing data to file MIKE');

   -----Original Message-----
   From: [9]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   [[4][10]mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Antonio
   Sent: Thursday, October 31, 2013 6:30 AM
   To: [11]ftpapi@xxxxxxxxxxxxxxxxxxxxxx
   Subject: HTTPAPI performance
   Hi ,
   I am using HTTPAPI to obtain from DHL WSS labels via web.
   The problem is that I am experiencing very long time on response (media
   11 seconds) and I want to understand where's the problem, that is, if
   it's mine or related to DHL side.
   I put a timestamp before and after the call to "http_url_post_xml" but
   I not able to understand what happens inside (I try to debug HTTPAPIR4
   but I loose myself !!!)
   There is any way to obtain the time of response from remote server ?
   For example : how much time to obtain connection, how much time to
   obtain answer, and so on ....
   I have the debug always *on, but nothing change turning it off.
   PS : I am problem in searching inside FTPAPI archives ... Search give
   me always no results, but ifI go inside the specific month I found it
   !!! Example : I search for 'DHL' : result 0 .
   If I went inside June 2012 I found "Consuming DHL Webservices" that I
   discover via Google !
   Best regards
   Nalesso Antonio
   This is the FTPAPI mailing list.  To unsubscribe, please go to:
   This is the FTPAPI mailing list.  To unsubscribe, please go to:

   This e-mail is subject to the Columbus Stainless [Pty] Ltd Email Legal
   Notices available at:

   This e-mail message has been scanned for Viruses and Content and
   cleared by MailMarshal


   1. [15]mailto:derick.venter@xxxxxxxxxx
   2. [16]http://www.gijima.com/
   3. [17]mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   4. [18]mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   5. [19]http://www.scottklement.com/mailman/listinfo/ftpapi
   6. [20]http://www.scottklement.com/mailman/listinfo/ftpapi
   7. [21]http://www.columbus.co.za/EmailLegalNotice.htm


This is the FTPAPI mailing list.  To unsubscribe, please go to:


   1. mailto:Venter.Derick@xxxxxxxxxxxxxx
   2. cid:_4_0A5D33680A5D2F68004D68ED42257C1A
   3. mailto:1]derick.venter@xxxxxxxxxx
   4. mailto:a.nalesso@xxxxxxxxxxx
   5. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
   6. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   7. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   8. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   9. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
  10. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
  11. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
  12. http://www.scottklement.com/mailman/listinfo/ftpapi
  13. http://www.scottklement.com/mailman/listinfo/ftpapi
  14. http://www.columbus.co.za/EmailLegalNotice.htm
  15. mailto:derick.venter@xxxxxxxxxx
  16. http://www.gijima.com/
  17. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
  18. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
  19. http://www.scottklement.com/mailman/listinfo/ftpapi
  20. http://www.scottklement.com/mailman/listinfo/ftpapi
  21. http://www.columbus.co.za/EmailLegalNotice.htm
  22. http://www.scottklement.com/mailman/listinfo/ftpapi
This is the FTPAPI mailing list.  To unsubscribe, please go to: