I wrote a simple JAX-WS web service for tomcat application server on java.
I have one interface and on implementation class:
interface
@We
You can have JAX-WS insert the generated schema into your WSDL file by using the
-inlineSchemas
command line switch. [1]
If you're using Maven in your project you can configure the JAX-WS maven plugin to do the same with the inlineSchemas configuration element in your execution configuration as follows: [2]
org.jvnet.jax-ws-commons
jaxws-maven-plugin
2.2
SomeId
wsgen
prepare-package
some.class.Name
true
true
some/target/dir
true
No changes to your Java class are necessary.
[1] http://jax-ws.java.net/nonav/2.2.1/docs/wsgen.html
[2] http://jax-ws-commons.java.net/jaxws-maven-plugin/wsgen-mojo.html