I'm tring to get a rest service running in my raspberry pi with Virgo Nano application server.
I was googling for sample code for OSGi bundle for rest service so I can play with the code and write my own rest service. But there were no specific sample for Virgo Nano.
Can some one can point me to a good sample.
Be aware that Virgo Nano doesn't include servlet container such as Tomcat or Jetty so you will need the HttpService to bind your REST services. You can try with OSGI JAX-RS Connector from EclipseSource. Check here http://eclipsesource.com/blogs/2012/01/23/an-osgi-jax-rs-connector-part-1-publishing-rest-services/
Related
I am considering to have a SOAP web service written using Apache Axis2. I can either use the Axis server or pack it as a .war and deploy it to a servlet container. My REST service is running on http-kit. Is it possible to to use http-kit with SOAP or does it support SOAP? Or should I need a separate servlet container like tomcat or Axis2? Thanks.
Update: Apache CXF instead of Axis2. I think I cannot use http-kit.
If I understand you correctly, you want to expose a SOAP-service.
I have a sample project which does that:
https://github.com/slipset/soap-box
It uses javax.ws.rs-api and runs as an uber-jar.
I wanted to check if somebody has explored the option of deploying Kitura compiled project on TomCat? Basically, is it possible to deploy the build outside IBM cloud environment?
Please note that you can run Kitura instead of Tomcat. Kitura is an embedded web server, you do not need other web server to run a Kitura application. So you can build a Kitura application on macOS/Linux and run the compiled executable on macOS/Linux. It will listen to the port you specify, receive HTTP requests and route them to the request handling code of your application.
I want to use the camunda rest api (local), but I realy can't figure out how to set up the environment... .
First I downloaded the tomcat distribution from here (V. 7.2.0) and the prepackaged eclipse with BPMN 2.0 Modeler from here.
I modelled a process, startet the server (start-camunda.bat) and deployed it (copied .war to ...camunda\server\apache-tomcat-7.0.50\webapps).
It went well on local tasklist http://localhost:8080/camunda/app/tasklist/default/#/login and cockpit http://localhost:8080/camunda/app/cockpit/default/).
I also downloaded the engine-rest from "Maven Nexus Server" (Install the REST API web application). Now, if I call the engine (http://localhost:8080/engine-rest/engine), I got the following .json: [{"name":"default"}]
What to do next? I realy don't know (I'm new in camunda...)
Your setup seems to be fine. But please note that the camunda REST API is a backend which you can access with a client. Currently there doesn't exists a camunda Java REST client. So you have to implement it by your self. If you are aware of that a good starting point is the camunda REST documentation. Besides Java there exists a Javascript SDK which you could use to access the REST API.
May I suggest an alternative: use a docker image for Camunda. It's official and works like a charm. You can set it up in 5 mins tops and then use an API client like postman to access Camunda's API via http://localhost:8080/engine-rest.
I had the same problem as yours and found a docker solution much easier than installing Camunda and all related dependencies myself only having to troubleshoot them later. Here's the link to the official docker image if you're interested:
https://hub.docker.com/r/camunda/camunda-bpm-platform
Or enter these 2 commands from terminal and you'll be golden:
docker pull camunda/camunda-bpm-platform:latest
docker run -d --name camunda -p 8080:8080 camunda/camunda-bpm-platform:latest
Open URL with browser: http://localhost:8080/camunda-welcome/index.html
username/password: admin/admin
I have a few questions about deploying my .ear file (was provided to me, the file itself should not be the problem). I set up jBoss application server jboss-6.0.0.Final and was able to run a simple hello world app to ensure the server was functioning properly.
I was told to place the .ear file in /server/default/deploy so I did. When I ran jboss (through /bin/run.bat) I got no errors related to deploying the ear file.
Question
Is this all the software I need (jBoss)? Do I also need something like Apache or tomcat?
The .ear file contains RESTful service calls that should return xml. Will these be deployed (accessible through a jQuery ajax call after the server (jboss/bin/run.bat) is executed?
Currently when I try to make the calls, the resources do not seem to exist.
Thanks in advance for taking the time to help.
JBoss AS ships with an embedded Tomcat as a servlet container so you really don't need that anymore. Apache Web Server is NOT required for your .EAR to be deployed properly.
To answer your questions
No other software is needed to deploy the EAR. You simply copy your EAR file to deploy directory (which you have rightfully done so).
If your EAR contains RESTFul services, they will be deployed and you can access them using any client including jQuery or even a simple browsers. The trick is to know the access URL to the RESTFul services.
If you have difficulty identifying the URL for accessing your RESTFul services please refer [1] for more information.
Hope this helps.
Good luck!
[1] https://docs.jboss.org/author/display/AS7/JAX-RS+Reference+Guide
I can answer the first question. You need apache if you want to serve static content or you need to isolate the traffic (say keep apache in the dmz and then use apache to proxy traffic to the internal jboss servers). tomcat is bundled along with jboss, so you do not need it.
In fact, I'm trying to see which would be the best approach to achieve play framework native support on openshift.
Play has it's own http server developed with netty. Right now you can deploy a play application to openshift, but you have to deploy it as a war, in which case play uses Servlet Container wrapper.
Being able to deploy it as a netty application would allow us to use some advanced features, like asynchronuos request.
Openshift uses jboss, so this question would also involve which would be the recommended approach to deploy a netty application on a jboss server, using netty instead of the servlet container provided by jboss.
Here is request for providing play framework native support on openshift There's more info there, and if you like it you can also add your vote ;-)
Start with creating 'raw-0.1' application.
SSH into the server and
cd $OPENSHIFT_DATA_DIR
download and install play into a directory here. $OPENSHIFT_DATA_DIR is supposed to survive redeploys of your application.
Now you can disconnect from SSH.
Clone the application repository. In the repository, there is a file .openshift/actions_hooks/start. It's task is to start the application using a framework of your choice. The file will need to contain at least (from what I know about Play)
cd $OPENSHIFT_REPO_DIR
$OPENSHIFT_DATA_DIR/play-directroy/play run --http.port=$OPENSHIFT_INTERNAL_PORT --some-other-parameters
Important
You have to bind to $OPENSHIFT_INTERNAL_IP:$OPENSHIFT_INTERNAL_PORT. Trying to bind to different interface is not allowed, also most of the ports are blocked.
To create some sort of template, save the installation steps into .openshift/action_hooks/build file. Check if play is installed, if it is do nothing, if it's not, execute the installation process.