Transfer File from server to server and send email

Hi Experts,

I’m totally newbie about WebMethod. I have been trying to explore IS 9.9.
for the first assignment, I have requirement “Transfer File from server to server and send email”.
I know Software AG designer has so much library in pub.client.sftp
But I have no idea how to combine them to meet my requirement.

Can someone guide me or give developer tutorial about transfer file and send email.

Thank you

For file transfer you can use the services in WmPublic/pub.client.ftp

For sending email you can use the service WmPublic/pub.client:smtp

You can decide whether to use ftp/sftp as per your environment and requirement. Once after succesful of previous steps use smtp to mail for each file or a single file for a group of mails. Write back for any questions.

Thanks,

Hi all,

We decide to use SFTP. I’m trying to invoke login => get => put.
I am totally have no idea about WM best practice. Can you give me some tutorial (pdf). At least as a beginner, I need to know how to use WM efficiently and how it works.

I have been trying to searching the tutorial in internet. But I can’t find the complete one.

thanks

Hi Junedi,

when source server and target server are not the same you will you have to login to both separately and map the session keys to 2 diffferent variables.

login source
login target
Try
Loop
get from source
put to target
email notify
Catch
Error handling here
Finally
logout source
logout target

Regards,
Holger

What problem exactly that you are facing?

Please follow the steps specified by Holger, its more than enough for your requirement. If you come across any hindrances kindly let us know.

Thanks,

Hi all,

I tried to move file from sharing folder to sftp server.

I’ve been trying to use file Polling. I created one file polling port then invoke my service.
File Polling works well. My files move to complete folder, but there is something wrong in my service.

how can I access my sftp folder path?
I try to fill “HOME/myFolder” either in localFile or remoteFile, but it’s not working ((The network path was not found)).

This is my service looks like.

Thanks for all the help,

You can download FileZilla or WinSCp, connect to the FTP server and you will be able check the correct ftp path (Windows, UNIX or Linux server) from Filezilla or Winscp easily

Hi Junedi,

the file pathes are either absolute ones or relatives one (relativ to the home dir of the user used for login to the sftp server)

Please check the IS Build In Services Reference for further information.
It states that localFile and contentStream should not be used in combination.

Regards,
Holger