FTP'ing an EDI file.

Hi there,

I got a problem FTP’ing a file. i am not sure how to use FTP. Actually i am sending an edi document to trading networks using FTP. In the service in i am not sure dirpath, localfile and remotefile.

I initialized the filed values as:

dirpath: cd \ns\wm\tn\receive.
localfile - x12_810 ( this is the name of the field that holds my edi data in the pipeline )
remotefile - x12_810.

Hope the way i have initialized localfile and remotefile are correct.

I got the following error after executing the service:

" The service failed with the following meesage: 550 ‘cd \ns\wm\tn\receive’: No such file or directory. "

could someone please tell me what went wrong with dirpath and whether i have intialized localfile and remotefile correctly.

Thanks in advance,
Veera.

Are you trying to send the file to another IS instance?

If so, drop the “cd” part of the dirpath string. Just specify the path to the service. Use localfile only if the data is in a file on the local IS disk. If it is just a string variable in the pipeline, use the content input instead.

If you’re not sending the document to another IS/TN instance and you’re just trying to submit the document to TN, just call the receive service.

Hi Rob,

Thank you so much for the detailed information.

but, i am still getting an error. could you please have a look at the following HTML view of the service and could you please let me know what’s going wrong with the inputs. the following case was just sending the document to my TN instance and i have the input data in the variable “edidata”.

the error was:

" com.wm.lang.flow.FlowException: The service failed with the following meesage: 550 ‘wm.tn:receive’: No such file or directory."

       [FONT=&quot][IMG]file:///C:/DOCUME%7E1/RAMARA%7E1/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.gif[/IMG][/font][FONT=&quot][/font]
     [B][FONT=&quot]Server:[/font][/b][FONT=&quot]

localhost:5555 [/font]

Package:
W3G_Training


Folder:
W3G_Training.EDI


sendEDI_810_FTP

Flow Overview
1
main: SEQUENCE
1.1 try: SEQUENCE
1.11 MAP
1.12 INVOKE ftp
1.2 catch: SEQUENCE
1.21 INVOKE getLastError
1.22
INVOKE debugLog[FONT=&quot]
1.23 EXIT ‘$flow’

[/FONT]

Flow Detail

1 main: SEQUENCE

exit on success
1.1 try: SEQUENCE

exit on failure
[FONT=&quot] 1.11 MAP

[/font]
Source

Destination


edidata "ISA00 00 01045426558002 01027537596 0403171135U00401* 80P*: GSIN0454265580020275375962004031711352X004010 ST810171135295 BIG20040315032633200402191-641294DI NTEAPU032633_04_19 CURSEUSD REFBM847636 REFCO1-641294 REFCN47636 N1OB92000 N34402 20TH ST E N4TACOMAWA98424US ITD01302.002004031920040329280.03NET 30 DAYS DTM01120040228 FOBPP IT100112.00PK*91.3994400000VP PIDFPII 1/2X47 X100 391.6PERMACOTE II IT100220.00PK81.5517700000**VP PIDFPII 1 X35 X100 291.6PERMACOTE II IT10035.00PK54.7593900000VP PIDFRC 1 X47 X 50 195.8LINACOUSTIC RC IT100430.00PK*137.4857700000VP PIDFPII 1 X59 X100 491.6PERMACOTE II IT100510.00PK137.4857700000**VP PIDFRC 1 X59 X100 491.6LINACOUSTIC RC IT10065.00PK64.4625500000VP PIDFRC 1-1/2X35 X 50 145.8LINACOUSTIC RC IT100710.00PK*141.5291800000VP PIDFPII 2 X59 X 50 245.8PERMACOTE II IT10095.00PK82.7263900000**VP PIDFRC 1 X35-1/2X100 295.8LINACOUSTIC RC IT10101.00EA75.0000000000VP PIDFMECH TAILGATE CHARGE IT10111.00EA*0.0000000000VP PIDFMECH. 1/3 STOP-OFF CHARGE IT101425.00PK112.7396800000**VP PIDFPII 2 X47 X 50 195.8PERMACOTE II IT10156.00PK88.4260000000VP PIDF*PII 1-1/2X48 X50 200.0PERMACOTE II TDS14076341400134 CAD***U S XPRESS ENTERPRISES SACC75.0002 SACC0.0002 ISS130.0EA6479.750LB CTT12130.0 SE44171135295 GE12 IEA1 8 "
[FONT=&quot] 1.12 INVOKE pub.client:ftp

[/font]

Pipeline In

Service In
edidata

content


command “put”


password “****”


username “Administrator”


serverport “8888”


serverhost “192.168.1.105”


dirpath “wm.tn:receive”


remotefile " x12_810;application:EDIstream"
1.2 catch: SEQUENCE

exit on done
[FONT=&quot] 1.21 INVOKE pub.flow:getLastError
1.22 INVOKE pub.flow:debugLog

[/font]

Pipeline In

Service In


message “The service failed with the following meesage: %lastError/localizedError%”
[FONT=&quot] 1.23 EXIT ‘$flow’

[/font]

Generated by webMethods Developer: April 12, 2010 11:18:57 AM PDT

Use /ns/wm/tn/receive as the dir path. Don’t put “cd” in front of that and don’t use the IS service name syntax.

Hi Rob,

Thank you so much. I achieved it :)…sorry i have messed up the previous post.

Thank you,
Veera.