cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jim ma" <mail2ji...@gmail.com>
Subject Re: wsdl location during runtime
Date Mon, 20 Oct 2008 13:16:08 GMT
Use -wsdlLocation flag to specify the wsdlLocation annotation value :
wsdl2java.java -wsdlLocation SessionCreate.wsdl
c:\java\myproject\wsdl\SessionCreate.wsdl
Does this help ?

Jim.

On Sun, Oct 19, 2008 at 2:03 AM, Christopher Cheng <
christopher.sw.cheng@gmail.com> wrote:

> By default, wsdl2java hardcoded wsdl location based on the local location
> (e.g. c:\java\myproject\wsdl\SessionCreate.wsdl)
>
> This does't work during runtime, therefore I packaged all wsdl and xsd file
> in the jar file and change the wsdl location of generated code to current
> thread like this:
> url =
>
> ((java.net.URLClassLoader)Thread.currentThread().getContextClassLoader()).findResource("com/sabre/webservices/wsdl/SessionCreateRQ.wsdl");
>
> However, cxf complains that it cannot find the other files referenced by
> wsdl file even though the file is in the jar
> java.lang.RuntimeException: java.lang.RuntimeException:
> org.apache.ws.commons.schema.XmlSchemaException: Unable to locate imported
> document at 'http://schemas.xmlsoap.org/soap/envelope/', relative to
>
> 'jar:file:/c:/java/myproject/web/WEB-INF/lib/myjar.jar!/com/sabre/webservices/wsdl/envelope.xsd'.
>
> The only solution is to put those xsd files in the classpath (e.g
> c:/java/myproject/web/WEB-INF/classes/) instead of jar file in
> 'c:/java/myproject/web/WEB-INF/lib'.
>
> Obviously this is inconvenience. How could I solve this problem?
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message