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

R: HTTPAPI performance

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: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [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- 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: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [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:
This is the FTPAPI mailing list.  To unsubscribe, please go to: