Skip to content

How to send ssh command with Java DSL #666

@chokdee

Description

@chokdee

Citrus Version
2.7.4

Question
We want to migrate from XML to Java DSL. But I can't find the syntax for the following commands

<send endpoint="sshClient">
            <message>
               <payload>
                  <ssh-request xmlns="http://www.citrusframework.org/schema/ssh/message">
                     <command>${sshcommand}</command>
                     <stdin></stdin>
                  </ssh-request>
               </payload>
            </message>
         </send>
         <receive endpoint="sshClient">
            <message>
               <payload>
                  <ssh-response xmlns="http://www.citrusframework.org/schema/ssh/message">
                     <stdout>@contains(response from server is 'ok')@</stdout>
                     <stderr/>
                     <exit>0</exit>
                  </ssh-response>
               </payload>
            </message>
         </receive>

What I've tried so far
send(action -> action.endpoint("sshClient").payload().ssh ??

Additional information

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions