Its because Service constructor takes a URL and unless we absolutize it
cant really work. You should use XML catalog to resolve the WSDL
location. See
https://jax-ws.dev.java.net/nonav/2.1.1rc1/docs/catalog-support.html.
You can also refer to 'catalog' sample.
-vivek.
Daniel Saavedra wrote:
> 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?
>>
>>
>
>