I have a question about this solution.
I have a wsdl file which imports another wsdl file, which in turn imports
an xsd file. I can do the getResource on the top level wsdl file, but will
CXF be able to figure out where to get the other files, or will it just
resort
to the JVM start directory as before. It apparently goes to the JVM start
directory for those other files.
Based on what I've tried so far, it looks like there's no way to get all of
this working cleanly. That is, have everything packaged in a jar and
accessed
from there.
Is this something that there should be a JIRA written up for?
Thanks.
Thom --
dkulp wrote:
>
>
> Oh. Right. Client side uses a URL and not a string. Forgot about
> that. :-(
>
> Yea, the only real option is to pass:
> -wsdlLocation ""
> (empty string) which with 2.1.3 I think will not generate the URL at all.
> You would then need to do the getResource(...) thing yourself to find the
> appropriate URL.
>
> Dan
>
>
> On Friday 31 October 2008 1:34:40 pm sreuland wrote:
>> Hello Dan, thanks for reply, I've tried 'classpath:my.wsdl' or
>> 'classpath:/my.wsdl' as wsdlLocation param to wsdl2java. The static
>> initializer url = new java.net.URL("classpath:my.wsdl"); in generated
>> Service class throws a MalFormed exception. The only way I've managed to
>> get the URL() constructor to find my.wsdl is when i specify a 'file'
>> scheme
>> such as 'file:my.wsdl', then the URL constructor finds the file but it
>> has
>> to be relative to the starting directory of the jvm(not embedded in a
>> jar).
>> I figured if code generation in wsdl2java could recognize 'classpath:'
>> scheme in wsdlLocation param and generate url =
>> Service.class.getClassLoader().getResource("my.wsdl"); instead of try {
>> url = new URL("my.wsdl"); } catch (MalformedURLException e) { } then
>> runtime should find wsdl from classpath since java.net.URL constructor
>> won't.
>
>
>
> --
> Daniel Kulp
> [email protected]
> http://dankulp.com/blog
>
>
--
View this message in context:
http://old.nabble.com/can-I-specify-classpath-for-wsdllocation-param-to-wsdl2java--tp20258375p27760130.html
Sent from the cxf-user mailing list archive at Nabble.com.