I am writing a server which is used to provide service using http protocol. (The server is not designed to be accessed from broswer, it's used to provide data for iphone client) I know cxf library has good support for this. Is it possible to do this without tomcat.
If possible, a sample project or sample config file would be great.
(I think the question could also be understood as do we have to use the web container like tomcat for http protocal)
Thanks
You don't need to use tomcat. CXF has an HTTP transport that uses an embedded Jetty instance to provide HTTP server support for the case where you don't use Tomcat or other servlet engine. Almost all of the sample applications that CXF ships in the samples directory use this when you use the -Pserver maven profile.
Related
I am new to programming and working on SIP applications. I am bit confused about where to deploy SIP applications. I read about HTTP Servlets, which are deployed in servlet container, I believe Tomcat is one Servlet container.
Basically, I have few questions and understanding:
Container manages the lifecycle of the servlets and if I just get the servlets api jar and deploy it with my application it will not work?
I found SIP servlet API and there's also Mobicents SIP servlets. Are they different?
Can I deploy my SIP servlet application in Tomcat along with the API jar?
Is Mobicent a container for SIP servlets like Tomcat is for HTTP Servlets, but Mobicents also has Tomcat.
These are very naive questions but I tried to find out the answers myself and was not successful. I am not from programming background so having a difficulty to understand the things.
Thanks
I invite you to read the specification at https://jcp.org/en/jsr/detail?id=289 it's not a complex read and will give you a good idea of what you can do. SIP servlets are built off the generic servlet API provided by the Java Servlet Specification but differ from them in a number of ways notably on being asynchronous or being able to generate multiple responses to an incoming request
the SIP Servlets API is defined by the Java specification mentioned in 1. above. Mobicents SIP Servlets is an implementation of the SIP Servlets API specification. It is supported by TeleStax. This is very similar in concept to JBoss Application Server (aka Wildfly) implementing the Java EE Specifications and being supported by Red Hat.
Please download the latest version of Mobicents SIP Servlets on Tomcat. It comes with a couple SIP Servlets application by default. You can also check out the examples, that should give you a good sense of how things are working together.
the SIP Servlets specification mandates convergence of SIP and HTTP so that you can use both in your application and share data between HTTP Sessions and SIP Sessions to create converged applications leveraging both the Web and the VoIP worlds. As such Mobicents SIP Servlets extends Tomcat to provide SIP capabilities to it. So a vanilla Tomcat installation will not support SIP Servlets out of the box, you need to download the specific extended Mobicents SIP Servlets Tomcat Version to be able to use SIP Servlets.
There is no naive questions ;)
I have written http client using camel http connector. Currently JBoss is chosen as my application server. I would like to write a HttpService that should run on JBoss which can receive and process the payload from client.
Any pointers would be much appreciated.
Thanks in advance
You can have a REST service running on the Jboss server which can be easily built using jersey or resteasy frameworks. Other REST libraries can be used too.
The http service can be built using the plain servlet too. But REST libraries provide a lot of builtin support.
I'm a newbie here..I'm trying to build a simple single page web application
for now I am using apache 2 http server to serve the front end stuff(html/js/css/imgs..)
and using a jar that uses Restlet2.0 on port 8015 to provide APIS for Ajax calls from the front end
now because Apache is using port 80 and Restlet is using port 8015, I have to use absolute address in my ajax calls where all cross-domain hell breaks lose
I'm wondering how do I make Apache 2 work with Restlet? I've been googling a lot and there has not been many useful results. How can I forward all the API calls to Restlet, and still taking advantage of the nice apache 2 features
You might want to setup a reverse HTTP proxy with Apache HTTPd (recommended).
An alternative is to use the AJP protocol as Restlet supports it through its Jetty extension.
http://httpd.apache.org/docs/2.2/mod/mod_proxy_ajp.html
I am using Camel inside ServiceMix and I can see that there is a camel-http and a servicemix-http feature, are they the same?
they are different...servicemix-http is a JBI binding component that has nothing to do with Camel. If you are building a Camel based app, then you likely want camel-http to consume from external resources and/or camel-jetty to expose HTTP endpoint (web server features, etc)
Iam coding an application which needs to do some web automation to some websites from our intranet. Some are simple web services while some will be https websites. My application needs to connect to them via socks proxies.
Now httpwebrequest class does not support socks so Iam looking to code a complete HTTP wrapper using Sockets . I need suggestions from my fellow coders here on what would be a good component to use as I am not looking to re invent the wheel here, rather use some existing socket based solution, either opensource or paid components.
Any suggestions guys? I need only socket based components which support socks proxies.
SecureBlackbox includes HTTP / HTTPS components that support both HTTP proxy, HTTPS proxy and SOCKS. The components use their own socket class which can be used separately as well.