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

Reading XML with &Amp; as part of string



   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
   Regards
   Derick Venter
   Applications Developer IV

   [cid:_4_0A5D33680A5D2F68004D68ED42257C1A]

   Systems Integration
   Tel: +27 (13) 247 2816 Fax: +27 (0) 86 573 2274
   Cell: +27 (0) 83 458 6599
   Email: [1]derick.venter@xxxxxxxxxx
   [2]www.gijima.com
   From:        Antonio Nalesso <a.nalesso@xxxxxxxxxxx>
   To:        HTTPAPI and FTPAPI Projects <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
   Date:        2013/11/05 11:28 AM
   Subject:        R: HTTPAPI performance
   Sent by:        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-09.50.39.026000 http_persist_open(): entered
                   Login to remote server
   2013-11-05-09.50.41.068000 senddoc(): entered
                   My SOAP request
   2013-11-05-09.50.49.698000 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
   Antonio
   PS : I use CRTRPGMOD to rebuild HTTPUTILR4. Then I use UPDSRVPGM to
   update service program, without rebuild it from zero.
   -----Messaggio originale-----
   Da: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   [[3]mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] Per conto di Mike
   Krebs
   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()) + ' ' +
   <===mod
   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-10.23.19.696000 Setting variables
   2013-10-31-10.23.19.715000 http_url_get(): entered
   2013-10-31-10.23.19.720000 http_persist_open(): entered
   2013-10-31-10.23.19.720000 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: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   [[4]mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Antonio
   Nalesso
   Sent: Thursday, October 31, 2013 6:30 AM
   To: 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:
   [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
   -----------------------------------------------------------------------
     __________________________________________________________________

   This e-mail is subject to the Columbus Stainless [Pty] Ltd Email Legal
   Notices available at:
   [7]http://www.columbus.co.za/EmailLegalNotice.htm.
     __________________________________________________________________

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

References

   1. mailto:derick.venter@xxxxxxxxxx
   2. http://www.gijima.com/
   3. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   4. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   5. http://www.scottklement.com/mailman/listinfo/ftpapi
   6. http://www.scottklement.com/mailman/listinfo/ftpapi
   7. http://www.columbus.co.za/EmailLegalNotice.htm

PNG image

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