[jboss-user] [JBoss Web Services] - wsprovide, Error: Could not load class
djabba74
do-not-reply at jboss.com
Thu Aug 16 11:24:26 EDT 2012
djabba74 [https://community.jboss.org/people/djabba74] created the discussion
"wsprovide, Error: Could not load class"
To view the discussion, visit: https://community.jboss.org/message/754053#754053
--------------------------------------------------------------
Hi
Something is missing in the guidelines of wsprovide at these pages. The example with the Echo.java, wsprovide will throw an "Error: Could not load class"...
https://community.jboss.org/docs/DOC-13544#BottomUp_Using_wsprovide https://community.jboss.org/wiki/JBossWS-JAX-WSTools#BottomUp_Using_wsprovide
https://community.jboss.org/docs/DOC-13543 https://community.jboss.org/docs/DOC-13543
That's the suggested Echo.java
package echo;
@javax.jws.WebService
public class Echo
{
public String echo(String input)
{
return input;
}
}
That's the suggested compile and wsprovide command
[root at rhel6 test_wsprovide]# javac -d . -classpath jboss-jaxws.jar Echo.java
[root at rhel6 test_wsprovide]# find .
.
./echo
./echo/Echo.class
./Echo.java
[root at rhel6 test_wsprovide]# /usr/share/jbossas/bin/wsprovide.sh -w echo.Echo
Error: Could not load class [echo.Echo]. Did you specify a valid --classpath?
This one works (note: no -classpath jboss-jaxws.jar for javac, but a --classpath=. for wsprovide.sh):
[root at rhel6 test_wsprovide]# javac -d . Echo.java
[root at rhel6 test_wsprovide]# /usr/share/jbossas/bin/wsprovide.sh -w --classpath=. echo.Echo
Could not find log4j.xml configuration, logging to console.
java2ws -s /tmp/test_wsprovide/output -classdir /tmp/test_wsprovide/output -d /tmp/test_wsprovide/output -verbose -wsdl -cp /tmp/test_wsprovide/./: -wrapperbean -createxsdimports echo.Echo
java2ws - Apache CXF 2.4.6-redhat-1
IMHO, the documentation needs to be fixed, or wsprovide should have a default classpath of "."
regards
Leo
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/754053#754053]
Start a new discussion in JBoss Web Services at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120816/4407108c/attachment.html
More information about the jboss-user
mailing list