It's not a secret anymore!
The moose likes Web Services and the fly likes how to install a standalone axis on jboss 4.0 (failed to compile .jws) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "how to install a standalone axis on jboss 4.0 (failed to compile .jws)" Watch "how to install a standalone axis on jboss 4.0 (failed to compile .jws)" New topic

how to install a standalone axis on jboss 4.0 (failed to compile .jws)

sam joe

Joined: Jul 23, 2003
Posts: 24
I tried to install a standalone axis on jboss 4.0. I copied 'axis' folder to jboss 'deploy' folder, rename from 'axis' to 'axis.war'. Create a new file jboss-web.xml and add a context root '/axis'. Now, start the jboss server, I can view happyaxis.jsp. Everything looks fine except when I try to visit EchoHeaders.jws. The axis failed to compile by not finding javax.servlet.http.HttpServletRequest. If I copied $JBOSS_HOME/server/all/lib/javax.servlet.jar to axis.war/WEB-INF/lib. Everything works. But I don't want my web services depend on jboss and that's not the right way to do it. Is there anyway that I can config to let axis know the classpath to that jar in jboss?





Error while compiling: D:\server\jboss-4.0.2\server\default\.\deploy\axis.sar\axis.war\WEB-INF\jwsClasses\


Error compiling D:\server\jboss-4.0.2\server\default\.\deploy\axis.sar\axis.war\WEB-INF\jwsClasses\
Line 0, column 0: could not parse error message: Note: has been deprecated.
D:\server\jboss-4.0.2\server\default\.\deploy\axis.sar\axis.war\WEB-INF\jwsClasses\ Class javax.servlet.http.HttpServletRequest not found in import.
import javax.servlet.http.HttpServletRequest;


Thanks a lot!
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
This sounds odd. Axis (like any web app) needs to have access to the servlet API interfaces, because it uses those classes internally. So adding the jar file to the Axis lib directory shouldn't make a difference. JBoss may be different, but, e.g., with Tomcat it's not necessary to add the API jar.
sam joe

Joined: Jul 23, 2003
Posts: 24
You are right. Drop axis into Tomcat, everything just works.

The only explaination is that the standalone axis runtime classpath in jboss and the classpath picked by axis classloader to compile .jws are different.
Patrick Bernardina

Joined: Jul 18, 2005
Posts: 7
I have the same problem.

any solution?
Mark Kempster

Joined: Aug 29, 2006
Posts: 2
I attempted this same task today by removing jboss-4.0.4's jbossws14.sar and
adding axis.war as described on the axis install guide

The missing piece to getting the EchoHeaders.jws test script (and its dependence
on javax.servlet.http.HttpServletRequest was this text from the axis install guide:

"Java 1.4 changed the rules as to how packages beginning in java.* and javax.* get loaded. Specifically, they only get loaded from endorsed directories."

The instructions talk about jaxrpc.jar and saaj.jar, but the same seems to
apply to javax.servlet.jar. Various instructions for copying that jar into
jbossweb-tomcat55.sar/ or listing it in JBOSS_CLASSPATH didn't seem to work.
I was able to get it working by copying javax.servlet.jar into JBOSS_HOME/lib/endorsed/, and noticed an entry in boot.log that it was picked up. Alternately, I imagine you could muck with the JBOSS_ENDORSED_DIRS
variable in
sunny theonly

Joined: Apr 24, 2008
Posts: 1
Hi Mark
Thanks so much for posting that it really helped me out.
I agree. Here's the link:
subject: how to install a standalone axis on jboss 4.0 (failed to compile .jws)
It's not a secret anymore!