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

RE: WSDL2RPG and cookies



Hi Scott,
	I can't express how I'm grateful for your assistance.  I'm quite sure it must be the activation group.  Here is a screen from the debugging view.  I'm using program VEC010 to call serviceprogram VEC001,  As I understand this, the VEC010 get the number 00000000000000000020  QILE, but the VEC001 (service program) get the 00000000000000000043  43, not the same number or the same name.  Could that be the case?

Kjartan

       Program                                        
Rqs    or          --------Activation Group--------   
Lvl    Procedure   Number                Name         
       QCMD        00000000000000000001  *DFTACTGRP   
  1    QCMD        00000000000000000001  *DFTACTGRP   
     < PEP_VEC010  00000000000000000020  QILE         
       VEC010      00000000000000000020  QILE         
     < PEP_VEC001  00000000000000000043  43           
       VEC001      00000000000000000043  43           
       QTEVIREF    00000000000000000001  *DFTACTGRP   
       _C_pep      00000000000000000040  QTEDBGAG     
       main        00000000000000000040  QTEDBGAG     
       qtescren    00000000000000000040  QTEDBGAG     
     < gramSource  00000000000000000040  QTEDBGAG     

-----Original Message-----
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Scott Klement
Sent: 15. september 2011 22:49
To: HTTPAPI and FTPAPI Projects
Subject: Re: WSDL2RPG and cookies

hi Kjartan,

>
> How can I see the activation group situation?
>

You can see which activation groups your programs are configured to run under by running the DSPPGM command.

>
> When I debug the program I think the 3 programs that I'm using is the 
> same activation group, but I'm not sure.
>

If you want to debug this while the job is active, you can use:
DSPJOB OPTION(*PGMSTK) and then press F11 to see which programs/procedures are loaded, and which activation group they are running in.

But beware, because the debugger will be in that call stack as well... 
you'll need to use care to understand which part is the debugger, and which part is the program you're debugging.


> We're mainly using RPG III here so, some of this stuff is definatly
> new to us.

That's a frustrating predicament...  you stick with a technology 18 
years after IBM stops enhancing it.  Now, you need to to do something 
new, and you have to try to learn 18 years worth of enhancements (to RPG 
IV) all at once.


> I tried to use the cookie file, but I always get Pointer not set for
> location referenced.    -1: Pointer not set for location referenced.

Please tell me how to reproduce this error -- you definitely should not 
get a "Pointer not set" error.


> a) How to let the program know that it must send the cookies to the
> webservice which is in the memory?

If it finds the cookies, they should be sent automatically.  You don't 
have to do anything.  That's what we're trying to determine:  Why isn't 
it sending them?


> b) When I use the http_cookie_file, how do I let the program read the
> context and send it to the webservice?

At the start of all of the programs, that need to share these cookies, 
you should specify something like:

   callp http_cookie_file( '/tmp/kjartans_cookies.txt': *on);

This tells HTTPAPI that when it receives/sends data, it should work with 
the cookies in that file.  When it receives new cookies, it'll add them 
to the file.  When it sends cookies, it'll get them from that file.

You don't have to tell it to send the contents, it should do it 
automatically if it knows there's a cookie file available.  But make 
sure it's set in all of the programs, before you use HTTPAPI in any of 
them, so all HTTPAPI functions will be using the same file.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
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
-----------------------------------------------------------------------