In the standalone client create a new package with the name "src/main/resources" and in this create a new file with the name "jboss-ejb-client.properties".
In this file copy the following text:
Usually the values to be changed are follows: host, port, username and password.
Host and port are default for local instance of Wildfly 10.1.0.Final. Username and password have been setted with add-user.bat (application user).
The following code is the client in the "src/main/java"
In the same "src/main/java" you have to put the same bean interface on the server (are the @Remote methods):