error calling external object function putfile (wodSFTP / wodSFTP.NET / wodSFTPdll)
by ml, Friday, May 30, 2008, 11:34 (6022 days ago)
Hi,
I am calling the below from Powerbuilder 10.5.2. And I kept encoutering the error which says error calling external object function putfile I am using the demo version of wodFtpDLX.
ole_wodftp.object.Hostname = 'x.x.x.x'
ole_wodftp.object.Login = 'xxx'
ole_wodftp.object.Password = 'xxx'
ole_wodftp.object.Authentication = 1
ole_wodftp.object.TransferMode = 1
ole_wodftp.object.Blocking = false
ole_wodftp.object.protocol = 0
ole_wodftp.object.Passive =1
ole_wodftp.object.connect()
ole_wodftp.object.RemotePath= /gacsin/FROM_USA/
ole_wodftp.object.PutFile( C: emp empmytestingfile.txt , ole_wodftp.object.RemotePath)
Can you please advise?
Thank you.
Re: error calling external object function putfile
by ml, Friday, May 30, 2008, 12:13 (6022 days ago) @ ml
Hi,
The line should be:
ole_wodftp.object.PutFile( C: emp empmytestingfile.txt , ole_wodftp.object.RemotePath)
Thanks.
Re: error calling external object function putfile
by woddrazen, Friday, May 30, 2008, 12:23 (6022 days ago) @ ml
Hi,
Did you fix your issue? Does is work now?
I just want to confirm that you don't need our help with this issue.
Regards,
Drazen
Re: error calling external object function putfile
by ml, Friday, May 30, 2008, 12:38 (6022 days ago) @ woddrazen
Hi,
Nope, I still couldn't solve it.
Still having the same error error calling external object function putfile .
Look forward for your advise. Thanks.
Re: error calling external object function putfile
by woddrazen, Friday, May 30, 2008, 13:01 (6022 days ago) @ ml
Hi,
This issue is only with PutFile Method or with all other wodFtpDLX Methods (ListDir,GetFile...)?
Maybe you didn't somehow correctly import wodFtpDLX in PB.
Can you follow this guide and try it again:
http://pbdj.sys-con.com/read/220784_1.htm
Also please try this:
[code]
ole_wodftp.object.PutFile('C:\temp\temp\mytestingfile.txt','/home/something/gacsin/FROM_USA/mytestingfile.txt')
ole_wodftp.object.PutFile 'C:\temp\temp\mytestingfile.txt','/home/something/gacsin/FROM_USA/mytestingfile.txt'
[/code]
Let us know how it goes.
Regards,
Drazen
Re: error calling external object function putfile
by ml, Saturday, May 31, 2008, 04:54 (6021 days ago) @ woddrazen
Hi,
This issue is only with PutFile Method or with all other wodFtpDLX Methods (ListDir,GetFile...)?Maybe you didn't somehow correctly import wodFtpDLX in PB.
Can you follow this guide and try it again:
http://pbdj.sys-con.com/read/220784_1.htmAlso please try this:
[code]
ole_wodftp.object.PutFile('C:\temp\temp\mytestingfile.txt','/home/something/gacsin/FROM_USA/mytestingfile.txt')ole_wodftp.object.PutFile 'C:\temp\temp\mytestingfile.txt','/home/something/gacsin/FROM_USA/mytestingfile.txt'
[/code]
Let us know how it goes.
Regards,
Drazen
Hi,
I am having problems with
all other wodFtpDLX Methods (ListDir,GetFile...) except with the connect method.
Followed the guide and re-import the OLE object but I am still getting the same error.
Please advise. Thanks.
Re: error calling external object function putfile
by woddrazen, Saturday, May 31, 2008, 12:18 (6021 days ago) @ ml
Hi,
What happened when you changed Blocking Method to true?
[code]ole_wodftp.object.Blocking = 1[/code]
Drazen
Re: error calling external object function putfile
by woddrazen, Monday, June 02, 2008, 00:48 (6020 days ago) @ woddrazen
Hi,
I duplicated your issue. Issue is most probably in wrong local or remote path in your PutFile Method line.
Hare is code I use and it works for me:
[code]dlx1.object.PutFile( C:\file.txt , /home/weonlydo/file.txt ) [/code]
Please check that you are using full and right path on local and remote side. I can send you my sample if you wish.
To done that please send email to techsupport@weonlydo.com
Drazen
Re: error calling external object function putfile
by sureshsundar, Thursday, March 12, 2009, 17:12 (5736 days ago) @ woddrazen
Hi,
I am trying the evaluation version with Powerbuilder 10 and encountered the same issue as discussed here. I have verified the path and all other options discussed here, nothing works.
Also noticed that
when setting
ole_wodftp.object.Blocking = TRUE (in the forum it says 0, per document it should be boolean), the connect itself failed as error calling external function .
Any help/updates.
Thanks
Hi,
I duplicated your issue. Issue is most probably in wrong local or remote path in your PutFile Method line.Hare is code I use and it works for me:
[code]dlx1.object.PutFile( C:\file.txt , /home/weonlydo/file.txt ) [/code]
Please check that you are using full and right path on local and remote side. I can send you my sample if you wish.To done that please send email to techsupport@weonlydo.com
Drazen
Re: error calling external object function putfile
by woddrazen, Thursday, March 12, 2009, 17:19 (5736 days ago) @ sureshsundar
Hi,
Please change value in Blocking line to this:
[code]ole_wodftp.object.Blocking = 1[/code]
Can you maybe show us your PutFile line? If you are receiving error on that line in your code.
Regards,
Drazen
Re: error calling external object function putfile
by sureshsundar, Thursday, March 12, 2009, 17:47 (5736 days ago) @ woddrazen
Here it is
ole_wodftp.object.Blocking =1
ole_wodftp.object.protocol =1
ole_wodftp.object.RemotePath = /home/tvpubs-e/incoming/import/inventory
ole_wodftp.object.Connect()
//Put a directory of files to the server:
/***This does not work****/
ole_wodftp.object.PutFile( c: emp est.txt ,ole_wodftp.object.RemotePath)
/***This does not work either ****/
//ole_wodftp.object.PutFile('c: emp est.txt','/home/tvpubs-e/incoming/import/inventory/test.txt')
both ways , it did not work, attributed to same error calling external function.
Hi,
Please change value in Blocking line to this:
[code]ole_wodftp.object.Blocking = 1[/code]
Can you maybe show us your PutFile line? If you are receiving error on that line in your code.
Regards,
Drazen
Re: error calling external object function putfile
by woddrazen, Thursday, March 12, 2009, 18:17 (5736 days ago) @ sureshsundar
Hi,
Can you please try this:
[code]ole_wodftp.object.PutFile( c:\temp\test.txt , /home/tvpubs-e/incoming/import/inventory/test.txt ) [/code]
If you receive some error please send us which error your receive.
Please also try to execute your code without PutFile line, what happened?
Drazen
Re: error calling external object function putfile
by sureshsundar, Thursday, March 12, 2009, 18:40 (5736 days ago) @ woddrazen
Drazen -
No go! same error calling external function issue.
Also, when blocking is set to 1 , I am getting the same error on connect FYI.,
Is there a way to trap the return messages from function calls(like connect putfile etc.,)/ setting property success/failure value.
Suresh
Hi,
Can you please try this:
[code]ole_wodftp.object.PutFile( c:\temp\test.txt , /home/tvpubs-e/incoming/import/inventory/test.txt ) [/code]
If you receive some error please send us which error your receive.Please also try to execute your code without PutFile line, what happened?
Drazen
Re: error calling external object function putfile
by woddrazen, Thursday, March 12, 2009, 22:27 (5736 days ago) @ sureshsundar
Hi,
Sorry for slower reply I have just finished testing in PB 10.
Here is code I use and it worked for me without any problem:
[code]ole_1.object.Hostname = hostname
ole_1.object.Login = login
ole_1.object.Password = password
ole_1.object.Blocking = 1
ole_1.object.Connect
ole_1.object.PutFile( c:\test.txt , /home/weonlydo/test_pb.txt )[/code]
Can you try my code? What happened if you remove PutFile line? Did you still receive error?
Which protocol you need to us for your server?
More help about protocol you can find here in Protocol Property:
http://www.weonlydo.com/FtpDLX/Help/wodFtpDLXLib~wodFtpDLX~Protocol.html
Drazen
Re: error calling external object function putfile
by sureshsundar, Friday, March 13, 2009, 16:13 (5735 days ago) @ woddrazen
Drazen:
The protocol is 1 sftp. I exactly followed the code you have sent, but powerbuilder thinks connect without parenthesis as property and error out.
The code segment
ole_wodftp.object.Hostname = 11.22.122.133
ole_wodftp.object.port =1100
ole_wodftp.object.Login = xxxxxxxx
ole_wodftp.object.Password = xxxxxxxxxxxx
ole_wodftp.object.Protocol = 1
ole_wodftp.object.Blocking = 1
ole_wodftp.object.Connect
Error is:
Error:Error accessing external property Connect
If you have the code and a sample app can you please email me, prior to that make sure sftp protocol works in the sample.
Thanks,
Suresh
Hi,
Sorry for slower reply I have just finished testing in PB 10.
Here is code I use and it worked for me without any problem:
[code]ole_1.object.Hostname = hostname
ole_1.object.Login = login
ole_1.object.Password = password
ole_1.object.Blocking = 1
ole_1.object.Connectole_1.object.PutFile( c:\test.txt , /home/weonlydo/test_pb.txt )[/code]
Can you try my code? What happened if you remove PutFile line? Did you still receive error?Which protocol you need to us for your server?
More help about protocol you can find here in Protocol Property:
http://www.weonlydo.com/FtpDLX/Help/wodFtpDLXLib~wodFtpDLX~Protocol.html
Drazen
[img]http://[/img] [img]http://[/img] [img]http://[/img] [img]http://[/img]
Re: error calling external object function putfile
by wodDamir, Friday, March 13, 2009, 16:31 (5735 days ago) @ sureshsundar
Suresh,
From the code you posted, you are setting Port property prior to setting the Protocol property. When doing so, the Protocol property will overwrite Port property and set it to default one (Port 22).
Can you please change the code to set Protocol, and then Port?
Regards,
Damba
Re: error calling external object function putfile
by sureshsundar, Friday, March 13, 2009, 18:25 (5735 days ago) @ wodDamir
Damba:
It helped for connect, thanks. I do not get any error on connect now.
But still have same error (error calling external function) on putfile , any ideas
Suresh,
From the code you posted, you are setting Port property prior to setting the Protocol property. When doing so, the Protocol property will overwrite Port property and set it to default one (Port 22).
Can you please change the code to set Protocol, and then Port?Regards,
Damba
Re: error calling external object function putfile
by wodDamir, Friday, March 13, 2009, 19:13 (5735 days ago) @ sureshsundar
Hi Suresh,
Can you perhaps contact us on techsupport@weonlydo.com and I'll send you a sample that connects to our server and uploads a file?
Also, Are you sure you are using a correct RemotePath?
Can you check what it returns immediately after connect?
Regards,
Damba