Java Classpath Issues with Webservices(CXF) and Jboss
Posted
by JohnC
on Stack Overflow
See other posts from Stack Overflow
or by JohnC
Published on 2010-03-30T13:25:02Z
Indexed on
2010/03/30
13:43 UTC
Read the original article
Hit count: 552
I am using CXF(which autogenerates my webservices in my pom.xml from my wsdl) with JBoss(eclipse ide), and I am having some trouble accessing the webservice from my web application. I found this resource: http://blog.progs.be/?p=92 but I am having a really hard time using WSDL_LOCATION = cl.getResource( "my/progam/pack/wsdl/myService.wsdl" ); to work properly in my code.
I have my wsdls located in src/main/wsdl and have added the following line to the .classpath file: classpathentry kind="src" path="src/main/wsdl"
I also created the folders my,program,pack,wsdl and dropped my wsdls into that location, so it is accessible.
However, the classloader.getResource call always returns null no matter what.
When I specify getResource( "/wsdl/myService.wsdl" ) it does not return null, but I believe it looks at the full file path and not what I need (considering part of the URL contains the path to the wsdl file all the way through the jboss server directory and includes the WEB-INF dir.
Is my .classpath file set up incorrectly or am I missing something else?
if the WSDL Location is not correct it always throws a ClassCast Exception like so:
java.lang.ClassCastException: org.apache.cxf.jaxws.ServiceImpl at javax.xml.ws.Service.(Service.java:81)
© Stack Overflow or respective owner