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

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
-----------------------------------------------------------------------