I'm creating a server via the wsdl/schema first approach and I'm using
wsdl2java to generate the Java code.  However when it creates the
WebService annotation it uses the builds hard coded path to the wsdl file
which is never going to be right for the production server.  Using this
default value get the following error starting the server.

Exception in thread "main"
com.sun.xml.internal.ws.server.ServerRtException: [failed to localize]
cannot.load.wsdl(file: /C:/svn/.../src/main/resources/MyService.wsdl)

So how to handle this?  It could be changed to a runtime URL but that is
not known until deployment.  Ideally it seems this would be loaded as a
resource from the server code base (classpath).  But how can I configure
this since its done in the WebService annotation?

Is there a way I can set this via code instead?  What is the right way to
handle this?

Btw, my build is Maven if that matters in the way I am configuring the code
generation.

-Dave

Reply via email to