Running the Simple Apache CXF Server Example on Red Hat Openshift

Today I dedicated some time to educate myself about OpenShift, the Red Hat’s Platform-As-A-Service offering. It allow us, developers, to quickly develop, deploy and provide scalable applications over the web.

To learn about it, I decided to deploy a really simple web application. I thought it would be a good idea to deploy the Simple CXF Server example on my free account. You can see it in action here. Because OpenShift documentation is quite extensive, it might be complicated for the beginner like me. So I decided to take notes of my steps while I deployed I simple Apache CXF-based application.

These are the steps I had to do:

1. Build the Simple WS Types project as described here.

2. Build the Simple CXF Server project as describe here. This step will generate a tarball file named cxf-simple-ws-server-1.0.0-SNAPSHOT-bin.tar.gz. Don’t remove it, we will need it soon.

3. Create the application container:

4. Change directories:

4. Unpack the tarball to the cxfexample directory

5. Rename the extracted directory

6. Switch to the hook directory:

7. Edit or create a file named start:

7. Edit or create a file named stop:

7. Adjust the permissions:

8. Go back to the project directory:

9. Add the files to the git repository:

10. Push them to the remote repository:

At this moment the application should have been deployed. If something goes wrong, you can try looking at the logs using the command:

Note: although the application is set to launch at port 8080, it will actually be accessible via port 80. If you have also compiled the Simple CXF Client, you can point it to your access your newly installed cloud application:



1. Accessing an server port running in OpenShift from another OpenShift image.

2. How To Run ActiveMQ in the Cloud.

3. Extending OpenShift.

Published by

Otavio Piske

Just another nerd

Leave a Reply

Your email address will not be published. Required fields are marked *