【问题标题】:FTP command CitrusFTP 命令柑橘
【发布时间】:2021-03-19 10:30:05
【问题描述】:

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。​​p>

【问题讨论】:

  • 你能帮我解决这个问题吗? @kushma 会

标签: citrus-framework citrus-engine


【解决方案1】:

需要在根元素spring:beans like中声明ftp消息模式的XML命名空间

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

请同时添加架构位置。

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

【讨论】:

  • 它有效,但需要在 citrus FTP 文档中添加此架构谢谢@Christophd。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-01-30
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-01-02
相关资源
最近更新 更多