Beginner in Apache ServiceMix - java

Hello everyone,
I started few days ago Apache ServiceMix and i cant find any good tutorial.
I have a project in java and now i want to run it in ServiceMix and i dont know how to do it?
I want to know too how to connect two services, first service start and another take somethink from this first?
Please help me it is very important to me.
My java project are in REST or SOAP and they are very easy to write: HelloWorld or take values and display result.
I m using: Apache ServiceMix 5.1.2, Java 8, 1.8 JDK, maven.

The good Tutorial i found is ServiceMix Tutorial
Here are 2 examples, one JBI and one OSGI, that you can use to start you first SOAP web-service and deploy it in ServiceMix.
JBI: http://cis.ait.asia/course_offerings/49/servicemix_tutorial_4
I actually made the above example work and then I switched from ant to maven. If you try it and encounter any kind of problems I would be happy to help you. Please keep in mind that JBI is kind of obsolete.
OSGI: http://www.jakubkorab.net/2012/02/developing-web-services-in-servicemix.html
Here you will find 3 examples, one plain CXF and two with Apache Camel. The packaging is OSGI instead of JBI.

Related

How to configure jetty in eclipse?

I found this tutorial that makes my case.
But the problem is that I can not configure Eclipse to use jetty.
I imported the libraries in eclipse, but it always fails in some import.
Who can help me with simple steps to follow?
I need to integrate some servers? (For example tomcat)
Excuse me, but it is my first encounter with websocket and java, and not know where to start
thank you very much
This is a screenshot of my problem
Jetty 7 is EOL (End of Life), consider upgrading to a stable and supported version of Jetty.
org.eclipse.jetty.websocket.api is not present in Jetty 7.
That was introduced in Jetty 9.
Use Jetty 9.4.3.v20170317

SOA feature in netbeans 7.4

Ok I am doing project on web services where I plan to implement based on JAX-WS.However i have an issue which I think is about composing services. And after searching on Internet i found WS-BPEL will allow me to do that. I am using netbeans 7.4 but i do not have the SOA feature in it. So now my question is.?
Is there any other method for doing service composition?
is there any link where i can download the SOA plugin for netbeans 7.4?
Or any tutorial which can gimme information on any new technologies which i can use for service composition using existing netbeans 7.4?
Thanks in advance
As far as I can remember the SOA plugin got removed from Netbeans around the time Oracle took it over. Last time I used the SOA plugin was in release 6.5.So I suspect you might be out of luck.
I would suggest you look at Apache Camel for doing this type of work. Or look at the WSO BPEL plugin for Eclipse.

How to implement a webservice (like Jenkins) which can deploy simply in Java

I know little about Java. I want to know how Java implement an web-service which can deploy simply.
I find Jenkins can deploy without any servlet container (like as Tomcat).
It can be ran using "java -jar jenkins.war --httpPort=xxx".
I want to study the source code of Jenkins.
But it is complicated.
I can't find where Jenkins parse "httpPort" option.
who can help me to analyze the implementation of Jenkins?
Thanks.
Have a look at Jetty, which is a lightweight container you can deploy into. It's often used for unit testing where a container is needed - it starts practically immediately.
What you are looking for is probably an embeddable servlet container.
Good examples are:
Jetty: http://jetty.codehaus.org/jetty/
Grizzly: http://grizzly.java.net/
You can find a tutorial on Jetty here:
http://wiki.eclipse.org/Jetty/Tutorial/Embedding_Jetty
I believe you want to create and deploy a web service in java. If that is the case, Apache CXF would be best framework to start on. There are hundreds of tutorials and active forums are available.
Below link would help you to start developing simple webservice in CXF ( this would work even with out Tomcat container)
http://www.benmccann.com/dev-blog/web-services-tutorial-with-apache-cxf/

Apache Felix for desktop application

I work from several months with Apache Felix and Glassfish. I can create simple Web Applications. Now I have to create Java daemon based on OSGI architecture. Is there any good tutorial with example code that can help to learn Apache Felix for Java desktop applications. I also want to ask how the bundles are packaged? Is web applications they are jar files.
I'd say using webstart would be easiest. In that case you'd create a basic jar file containing Felix (and maybe some more libraries) that can start up your application, and from there the client could download additional bundles using Bundle.install. You could also combine it with Apache Felix OBR, that would give you more flexibility, at the cost of some extra infrastructue.
You can also have a look at this, but I think (please correct me if I am wrong) it is Equinox specific.
Finally, JBundle looks promising, I never tried it but it looks relevant for you.
There are many examples in Apache Felix OSGi Tutorial http://felix.apache.org/site/apache-felix-osgi-tutorial.html
Look at bndtools and bnd and any time now jpm: http://softwaresimplexity.blogspot.fr/2012/04/just-another-package-manager.html

Java SOAP Server that can be deployed in Tomcat, JBoss, Geronimo, etc. etc. etc

I'm hoping to create a Java SOAP server which I can deploy in Tomcat, or in JBoss, or in Geronimo, or in XYZ, etc. etc. etc.
Bottom line, it should have the least dependencies possible. I'm trying to avoid libraries outside of what's included in a standard java distro because of licensing/packaging/reusability issues.
Can any provide a link to where I should start looking, or some example code?
Java 1.6 introduced the possibility to create standard SOAP webservices with the standard JDK.
There are many examples on the web, for example http://weblogs.java.net/blog/2006/12/12/webservices-jdk-6
IDEs like NetBeans also call the necessary tools (apt) automatically which makes it very easy to get started.
However I did not research how well this will work across all available containers.
Apache Axis2 (http://ws.apache.org/axis2/) should provide what you're looking for, or JAX-WS (https://jax-ws.dev.java.net/) if you want more lightweight.
Wow.
http://www.w3.org/TR/soap/
There's the standard. You will be spending a lot of time on this project. You'll need to also check out the HTTP and XML specs to build those components.
Ignoring XFire and Axis2 is an very very expensive choice...
I recently used Metro 1.4 for this (an open source glassfish component) which implements the standard approach for web services.
Drop in the jars in a Java 5 web container, annotate your class and method with standard #tags, and let Metro do the rest.
I have been very pleased with performance in a Jetty container.
If you use Spring web service module you don't need Axis or XFire. I think it's a good way to go if you're already using Spring.

Categories