users@jax-ws.java.net

Re: Can wsimport generate classes with relative wsdl path?

From: Daniel Saavedra <dsaavedra_at_visual-tools.com>
Date: Tue, 24 Apr 2007 12:00:34 +0200

Hi again,

I've tried using latest 2.1 nightly build and generated code by wsimport
has the same aspect, wsdl location in generated code is given in
absolute path (file:/home/..). Is there any way to have this location
automatically generated as relative? Using wsdllocation doesn't make it
different.

Is there any solution other than to "manually" edit the generated source
code and compile again? Relative paths, when possible, are not defined
in the specification?


Daniel Saavedra wrote:
> Hi,
>
> I'm using JAX-WS RI 2.0_01-b59-fcs to generate client classes from a
> .wsdl. The .wsdl is in a local directory in the machine where I
> compile my project.
>
> I generate the classes using ant wsimport task with no problems when
> compiling. I also have no problems when running my project in my local
> copy.
>
> However when running my project in another location from a generated
> .jar file, I've got an exception caused by Service generated class not
> finding the .wsdl file because wsimport has created WSDL_LOCATION URL
> with an absolute path to my local directory instead of the relative
> path I'd need in order to work.
>
> Is there an option I'm missing to make wsimport create WSDL_LOCATION
> relative URL? Is it a feature or I am trying to do something wrong?
>
> I've tried searching if this have been an issue in this or later
> versions of JAX-WS but I couldn't find anything. Does JAX-WS 2.1
> addresses this?
>
> Any suggestions?
>
>


-- 
Daniel Saavedra San Juan 
Proyectos Especiales 
Special Projects
--------------------------------------
V I S U A L   T O O L S
C/Isla Graciosa, 1.
28034 Madrid, Spain.
Telephone: + 34 91 729 48 44
Fax: +34 91 358 52 36
--------------------------------------
dsaavedra_at_visual-tools.com