This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
I am in the beginning stages of developing a java web service. As am new to this i had been searcing all over the net for a good tutorial but not able to find one. I am planning to use Eclipse Europa as my IDE and would be deploying the web service on JBoss 4.0.5 GA. Am using Java5.
Could someone suggest me when to use an EJB to expose webservice and when to use a servlet.
I would also require information on how to integrate WS-Security with SSL certificate with my web service.
The latter is a list of tutorials on Apache Rampart. Hope this helps.
Joined: Nov 20, 2007
Hi, Thank you for those url. It was useful in understanding the concepts.. but am running into problems while trying to engage rampart on the service. Am using UsernameToken authentication. The rampart 1.2.mar that i downloaded is very small and does not contain all the jars. So i added all the jars found in the lib in the samples that came along with rampart 1.2.zip. Could you please guide me on how to engage rampart 1.2 on the service for username token authentication.
this is what i get while starting the Jboss 4.0.5 GA server. I added all the jars from the lib to the classpath and also added the rampart 1.2.mar to the modules directory in my workspace.
17:33:26,362 INFO [ModuleDeployer] Deploying module: addressing-1.2 17:33:26,394 ERROR [ModuleDeployer] The rampart-1.2.mar module, which is not valid, caused org.apache.rampart.Rampart org.apache.axis2.deployment.DeploymentException: org.apache.rampart.Rampart at org.apache.axis2.deployment.repository.util.ArchiveReader.readModuleArchive(ArchiveReader.java:483) at org.apache.axis2.deployment.ModuleDeployer.deploy(ModuleDeployer.java:70) at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:587) at org.apache.axis2.deployment.RepositoryListener.init(RepositoryListener.java:200) at org.apache.axis2.deployment.RepositoryListener.init2(RepositoryListener.java:63) at org.apache.axis2.deployment.RepositoryListener.<init>(RepositoryListener.java:58)
I know that this post is sort of outdated but I just wanted to clarify a part of the original post asking for when to choose between implementing your web service as an EJB vs Servlet. My knowledge is that the choice is between EJB and a POJO( a java object--hence Plain Old Java Object). Assuming you are using JAX-WS implementation you then map the service implementation(if its a Pojo) as a servlet in web.xml (don't worry I'll provide links for tutorials)
So when or why should you choose EJB over POJO.
1. A POJO web service is packaged in a web module(you map the pojo as a servlet in web.xml while an ejb web service is packaged in an ejb-jar
2. you get the advantage of declarative transaction and security from the ejb container for your ejb web service
3. EJB web services can use additional protocols like RMI as a result of having remote interface
If you have no concerns for these three points then the choice is simply up to you.