How to invoke a service via FTP

I have a problem with invoking a service.

In the IE browser I can invoke services thru HTTP, but what I want is to invoke a service thru FTP.

Does anyone know how i can invoke a service thru FTP, this can be from the command prompt or via IE.

If somenone knows a solution please let me know.
Thanks in Advance,

Ilhan

IIhan,

U can invoke the service either from command prompt or from any FTP IDE.

For Invoking through command prompt:

H:>c:

C:>ftp
ftp> open (Give ur IS server name)
It will be connect to ur IS server ftpport ( For this u need to enable the FTP port on ur IS server)
User (IS servername:(none)): give ur user name
331 Password :. give ur password

ftp> cd /ns/Folder name/service name (this will point to ur flow service)

put C:\FTP\test.xml ( this will invoke ur service with test.xml as an input)

Thanks & Regards

Kiran Pidugu

Kiran,

Thanks for your input. I’ve enabled the FTP port, but some how i can’t log in
into the IS? Any idea why thats happening. Do I have to open other port?

Kind regards,
Ilhan

IIhan ,

What error message are you seeing when ur trying to log into IS ?

Thanks

Kiran Pidugu

Kiran,

The only message i get is that user “iyavuz” could not log in.
Do I have to login with the Wm password or the Windows pwd.

When i enter
FTP :>
open bb-rr-wmiypd01 --> then I’m logging to that win environment and not to the Wm IS.

I’ve tried also with th eport number at the end but then the connectioned is always closed by the remote host.

Are there any settings that i have to change to make use of the FTP command?

Kind regard,
Ilhan

Just for kicks I put together a demo for FTP access to IS. This scenario runs on my laptop, so it is not constrained by any organizational seccurity issues.

Use IS Administrator to add an FTP port (8021 in this case)
set the port’s access mode to “Allow by default”
Enable the FTP port

Write a sample flow service (ladson_ftp:receiveFtpFile)--------------------------------------------
(note, the input is *inFile)
invoke pub.date:getCurrentDateString (pattern=yyyy-MM-dd HH:mm:ss)
invoke pub.flow:debugLog (message=started receiveFtpFile at %now%)
invoke pub.xml:xmlNodeToDocument (*inFile----->*node)
invoke pub.xml:documentToXMLString
MAP (preset receiveFTPFileOutput=this is the XML received by receiveFtpFile= %xmldata%)
invoke pub.flow:debugLog (message=receiveFtpFileOutput)

Build a sample xml file (c:\tmp\sampleXml.xml) --------------------

this is sample xml data

Sample FTP session under DOS --------------------------------------
C:\Documents and Settings\Dick>ftp
ftp> open localhost 8021
Connected to ladson-hp.
220 ladson-hp:8021 FTP server (webMethods Integration Server version 6.5) ready.
User (ladson-hp:(none)): user Administrator
331 Password required for user Administrator.
Password:manage
230 User Administrator logged in.
ftp> pwd
257 “/” is current directory.
ftp> ls
200 PORT command successful.
150 ASCII mode data connection for /bin/ls (127.0.0.1,1750).
ns
admin
replicate
a
Administrator
226 ASCII transfer complete.
ftp: 40 bytes received in 0.00Seconds 40000.00Kbytes/sec.
ftp> cd ns
250 CWD command successful.
ftp> ls
200 PORT command successful.
150 ASCII mode data connection for /bin/ls (127.0.0.1,1751).
wm
pub
sample
omi
win32
ws
ladson_ftp
226 ASCII transfer complete.
ftp: 776 bytes received in 0.05Seconds 15.52Kbytes/sec.
ftp> cd ladson_ftp
250 CWD command successful.
ftp> ls
200 PORT command successful.
150 ASCII mode data connection for /bin/ls (127.0.0.1,1752).
receiveFtpFile

226 ASCII transfer complete.
ftp: 53 bytes received in 0.00Seconds 53000.00Kbytes/sec.
ftp> cd receiveFtpFile
250 CWD command successful.

ftp> put c:\tmp\sampleXml.xml
200 PORT command successful.
150 ASCII mode data connection for sampleXml.xml (127.0.0.1,1807).
226 ASCII transfer complete.
ftp: 45 bytes sent in 0.01Seconds 4.50Kbytes/sec.
ftp>quit

Contents of server.log ----------------------------------------------------------
12-14 08:34:49 EST [ISP.0090.0003C] started receiveFtpFile at 2006-12-14 08:34:49
12-14 08:34:49 EST [ISP.0090.0003C] this is the XML received by receiveFtpFile= <?xml version="1.0"?>

this is sample xml data