Hi Paul,
I'd suggest a patch in a Jira issue (if it works again for you, not problem for
me)
Thanks
Jacques
From: "madppiper" <[email protected]>
Hey,
I would argue for the following slight modifications in FtpServices.java and
Framework/Common/servicedef/services.xml:
Services.xml:
Replace:
<service name="ftpInterface" engine="interface" location="" invoke="">
<attribute name="hostname" type="String" mode="IN"
optional="false"/>
<attribute name="username" type="String" mode="IN"
optional="false"/>
<attribute name="password" type="String" mode="IN"
optional="false"/>
<attribute name="localFilename" type="String" mode="IN"
optional="false"/>
<attribute name="remoteFilename" type="String" mode="IN"
optional="false"/>
<attribute name="binaryTransfer" type="Boolean" mode="IN"
optional="true"/>
<attribute name="passiveMode" type="Boolean" mode="IN"
optional="true"/>
</service>
with
<service name="ftpInterface" engine="interface" location="" invoke="">
<attribute name="hostname" type="String" mode="IN"
optional="false"/>
<attribute name="username" type="String" mode="IN"
optional="false"/>
<attribute name="password" type="String" mode="IN"
optional="false"/>
<attribute name="localFilename" type="String" mode="IN"
optional="false"/>
<attribute name="remoteFilename" type="String" mode="IN"
optional="false"/>
<attribute name="binaryTransfer" type="Boolean" mode="IN"
optional="true"/>
<attribute name="port" type="String" mode="IN" optional="true"/>
<attribute name="passiveMode" type="Boolean" mode="IN"
optional="true"/>
</service>
and in FtpServices.java:
replace line 65
ftp.connect((String) context.get("hostname"));
with
if(Integer.parseInt((String) context.get("port"))!=0 ||
context.get("port")!= null){
ftp.connect((String)
context.get("hostname"),Integer.parseInt((String) context.get("port")));
}else{
ftp.connect((String) context.get("hostname"));
}
This allows the specification of a port if needed...
--
View this message in context:
http://www.nabble.com/A-tiny-update-in-ftpservices-tp22701814p22701814.html
Sent from the OFBiz - Dev mailing list archive at Nabble.com.