When using metro 2 (with JAXWS 2.2) the wsgen process does not create the
correct set of files (wsdl and *schema?.xsd files).
The expected resulting set of files should include the wsdl file containing the
service definition and the schema imports for: 1) the service operations and 2)
any other classes residing in other namespaces different from the service target
Instead, the resulting set only includes the wsdl file and a single schema1.xsd
file with all service operations and classes mixed into the same weg service
This poses a big problem when trying to generate the correct service client
classes using wsimport with the wsdl created by wsgen.
However if the webservice is deployed, the wsdl generated dynamically by the app
server (I'm using glassfish 2.1 and 3), is the correct one, meaning all ?xsd=1,
?xsd=2, ... return the correct objects in their corresponding namespaces.
To illustrate this issue, I'm posting below a URL to a simple application using
Netbeans 6.8 and glassfish 3. Please look at the files generated by wsgen @
WEB-INF/wsdl/localhost_8080 and compare with the wsdl returned dynamically by
the GF server after deployment