FTP 命令柑橘

FTP command Citrus

enter image description here

<spring:beans 
xmlns="http://www.citrusframework.org/schema/testcase"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:citrus="http://www.citrusframework.org/schema/config"
xmlns:citrus-ftp="http://www.citrusframework.org/schema/ftp/config"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.citrusframework.org/schema/testcase
http://www.citrusframework.org/schema/testcase/citrus-testcase.xsd 
http://www.citrusframework.org/schema/ftp/config
http://www.citrusframework.org/schema/ftp/config/citrus-ftp-config.xsd">
<citrus-ftp:client id="ftpClient"
      host="localhost"
      port="21"
      username="ravi"
      password="admin"
      timeout="10000"/>
<template name="MyFTP">        
        <send endpoint="ftpClient" fork="true">
          <message>
            <payload>
              <ftp:command>
                <ftp:signal>MKD</ftp:signal>
                <ftp:arguments>test</ftp:arguments>
              </ftp:command>
            </payload>
          </message>
        </send>
        <receive endpoint="ftpClient">
  <message>
  <payload>
  <ftp:command-result>
  <ftp:success>true</ftp:success>
  <ftp:reply-code>257</ftp:reply-code>
  <ftp:reply-string>257 "/test" created.</ftp:reply-string>
  </ftp:command-result>
  </payload>
  </message>
</receive>
</template>    

</spring:beans>
      

我收到 FTP 命令未绑定到有效负载子项中。我需要执行 FTP 命令。谁能帮我这个? 我要测试FTP比如上传下载PWD MKD CWD.

您需要在根元素 spring:beans 中声明 ftp 消息架构的 XML 命名空间,例如

xmlns:ftp="http://www.citrusframework.org/schema/ftp/message"

还请添加架构位置。

http://www.citrusframework.org/schema/ftp/message http://www.citrusframework.org/schema/ftp/citrus-ftp-message.xsd