Writing HttpService on JBoss - http

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.

Related

Container for sip servlets?

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 ;)

Kettle client to invoke EJBs deployed in JBoss

I'm just starting with Kettle (PDI).
I want to know if it is possible to deploy EJB3 in JBoss AS 5.1.0, and then invoke EJBs from a remote client through KETTLE by using the JNDI API to first lookup the bean proxy and then invoke on that proxy?
Basically, I want to extract, transform and load data that was deployed to the application server through Kettle.
Thanks
Generally speaking you'd like to implement a normal stand-alone remote EJB client. This client is to be integrated into an (open source) ETL tool.
I would be very surprised if this does not work. If you managed to have a stand-alone remote client (sometimes tough enough), there could be one problem: Conflicting libraries: Normally a JBoss clients use jboss-client.jar, and its content may conflict with libraries provided by Kettle. But Kettle is open source, so with a little effort you could resolve this as well.

Is is possible to have http service using cxf without tomcat

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.

How to connect to Tridion using core service from client machine

I am working on creating component using the Core Service to connect to Tridion 2011 SP1. I wrote the code in the server machine to create a component through the Core Service, and it worked well. The code was executed from server machine.
Now I want to execute same code from client machine.
I came to know that we can execute the code from Client machine as well.
Can any one share what all the configuration that I need to do in the client machine to make it work?
CoreService is a WCF webservice and as with any webservice there's no any difference as to where you connect to it from, provided you can connect and authenticate. All you need to do is to change app.config of your client to point to proper server, or change it in the code if you have it hardcoded. Also, you might need to add authentication to your client code in case you don't want to use default credentials.
In general, CoreService is following WCF and if you are having any problems with it - you can troubleshoot it as any other WCF service. There are plenty of answers on the internet.
Have a look at this: http://yatb.mitza.net/2012/03/core-service-client-sample-code.html
It describes several ways of connecting to the Core Service.

Camel in ServiceMix which http feature should be used?

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)

Resources