tags:

views:

591

answers:

1

I use the ant task from jax-ws - wsimport to generate my dto's.

What I'm wanting to know is what assumptions does wsimport make? for example, w.r.t to the service endpoint and the location of the wsdl, where does it expect these to be and what if they're not there. Wsimport generates the code with the wsdl being loaded from the location specified when invoking wsimport, which is on the file system in my case. This won't do and I'm looking for how to change this. At the moment I have to go in afterwards and change the generated code.

I don't pull the wsdl from the runtime end point, I have it locally. How do I handle this? AFAIK, catalog.xml can help in this regard, but I don't know how.

+1  A: 

Okay, looks like I solved the problem.

I specified a "wsdlLocation" directive in my wsimport invocation - this then set the wsdlLocation in the generated code to be that. This wsdl location is valid and the application now picks up the default wsdl from this location. I set the wsdlLocation to be "WEB-INF/wsdl/.wsdl". Thus if I put the wsdl file there then no modification of generated code is necessary.

Michael Wiles