Skip to content

Testing the generated code

jrgsanchez edited this page Jan 10, 2017 · 2 revisions

Spring MVC Server

  • Extract the zip file that you have downloaded.
  • Execute the respective installation script (Unix or Windows). The JAR files will be installed in your Maven repository.
  • Import the Example project (serverSpring folder) as a Maven project in your favourite IDLE.
  • Compile it with Maven.
      mvn clean install
  • Run the main method of the Launcher class. The server will be up in the address you have defined and the endpoints will be ready to accept the requests from one of our generated clients (Typescript or JAX-RS).

JAX-RS Server

The following flavour has been tested on Apache Felix (OSGi).

  • Extract the zip file that you have downloaded.
  • Import the Example project (serverJaxrs folder) as a Maven project in your favourite IDLE.
  • Copy every JAR (compiled code) from the folders, and paste as bundles in the corresponding OSGi folder installation.
  • Check if every JAR is loaded and the REST webservice is running.
  • The server will be up in the address you have defined and the endpoints will be ready to accept the requests from one of our generated clients (Typescript or JAX-RS).

TypeScript Client

You can deploy this web client in any web server. However, we suggest to do it with Spring MVC server which has been explained before.

  • Extract the zip file that you have downloaded.
  • In your Spring MVC Example project that you have imported in your IDLE, create a folder called public under resources directory.
  • In the public folder, copy all the files that you have extracted.
  • After this, you just have to open the webpage index.html and select every REST method you would want to test that have been deployed in your Spring MVC or JAX-RS server.

JAX-RS Client

You can deploy this client in a single JVM.

  • Extract the zip file that you have downloaded.
  • Execute the respective installation script (Unix or Windows). The JAR files will be installed in your Maven repository.
  • Import the Example project (clientJaxrs folder) as a Maven project in your favourite IDLE.
  • Compile it with Maven.
      mvn clean install
  • Run the main method of the Launcher class. The client will test all the REST method you would want to test that have been deployed in your Spring MVC or JAX-RS server.

Clone this wiki locally