While working on an interface, we found a strange behaviour while dealing with multiple FTP sessions in the same thread:
Following are the sequence of steps being executed:
ftp:login
ftp:ls
loop over files
ftp:get
call child service
- do processing
- ftp:login
- ftp:rename
- ftp:logout
ftp:logout
We observed that when the logout operation in the child service is executed, it logs out the session created in parent service as well (even though the session keys were assigned to variables with different names in both the services).
However, this issue didnt occur when the child service was executed in a different thread.
The environment being used is webMethods 6.5 IS with SP2
Any pointers in this regards would be highly appreciated.
You can use the existing session id from the parent service. If at all you want to use the child service in a different scenario, where this session id can not be provided, then you can do this login, rename and logout.
Check for session id in pipeline (I also suggest to validate it using and ftp:ls service). If not valid then do login, rename and logout. otherwise, just invoke ‘rename’ and provide this session id. The parent service will logout in this case.
ftp:logout
is being used for archival (moving file form one directory to another). We are exposing this as a utility service so that other interfaces can also use it for file move operation.
What we could’nt understand is, why would it logout the session that is created in the parent service as well (even though the two session keys are stored in two distinct variables and there is no chance of the two getting mixed up)
We would like to know if somebody has faced this issue…
… trying to figure out if it is a product bug or it is something to do with the FTP server