cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shsebast <shseb...@gmail.com>
Subject Re: Grabing wsdl from a common wsdl jar file using cxf maven plugin
Date Mon, 03 Aug 2009 17:58:36 GMT

Thanks for the reply,

I created the JIRA issue below

https://issues.apache.org/jira/browse/CXF-2376

Thanks
S Sebastian


dkulp wrote:
> 
> 
> It definitely should be the second format.   The "wsdlLocation" flag is
> what 
> is supposed to be put in the wsdlLocation attribute of the @WebService 
> annotation and is used for the defaults in the Service and such.   
> 
> In anycase, doesn't look like it's working.   Please log a bug.  
> 
> Dan
> 
> 
> 
> On Mon August 3 2009 1:32:38 pm shsebast wrote:
>> Thanks Dan for responding quickly.
>>
>> I wanted to make sure that I am setting the correct option for the
>> cxf-codegen-plugin. See below options
>>
>>  1)            <wsdlOption>
>>
>> <wsdlLocation>classpath:/myfolder/myown.wsdl</wsdlLocation>
>>                  ---
>>                  ----
>>                  </wsdlOption>
>>    then I get a NPE with following stack trace
>>
>>    java.lang.NullPointerException
>>         at java.io.File.<init>(File.java:222)
>>         at
>> org.apache.cxf.maven_plugin.WSDL2JavaMojo.mergeOptions(WSDL2JavaMojo.java:1
>>43) at
>> org.apache.cxf.maven_plugin.WSDL2JavaMojo.execute(WSDL2JavaMojo.java:195)
>>         at
>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManag
>>er.java:451)
>>
>>
>>  2) When I set the follwing for wsdlOption
>>                 <wsdlOption>
>>                   <wsdl>classpath:/myfolder/myown.wsdl</wsdl>
>>                  ---
>>                  ----
>>                  </wsdlOption>
>>
>>     My build fails with the following error
>>       org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsdl
>> definition from : file:/classpath:   /myfolder/myown.wsdl
>>
>>
>> Am I setting the correct wsdl option for the plugin?
>>
>> Thanks in advance
>> S Sebastian
>>
>> dkulp wrote:
>> > For the wsdl location, you can try something like
>> > "classpath:/blah/my.wsdl".
>> > I'm not sure if that will work or not.
>> >
>> > However, even if it DOES work (after briefly looking at the code, I'm
>> not
>> > really sure if it will or will not work.  Log a bug if it doesn't), it
>> > will
>> > re-run/regenerate the code every time you type "mvn install" as it
>> won't
>> > be
>> > able to detect if the wsdl has changed or not.   Thus, I suggest using
>> > the dependency plugin to "unpack" the dependency into a dir in target
>> and
>> > then configure the cxf plugin to generate from there.   dependency will
>> > not unpack
>> > of the jar hasn't changed, and thus we won't re-run.
>> >
>> > Dan
>> >
>> > On Mon August 3 2009 11:57:18 am shsebast wrote:
>> >> I am collecting all the wsdl's in my project in a jar file and
>> deploying
>> >> it
>> >> on the maven repository. I have read earlier posts which suggests that
>> >> cxf
>> >> maven tooling for wsdl2java can grab wsdl from a jar file in the
>> >> classpath.
>> >> Can anyone help me with the syntax for doing this.
>> >>
>> >> I am referring to the below email sent on 09 Oct 2008 from Dan Kulp to
>> a
>> >> question regarding using WSDL as Maven artifact
>> >>
>> >> "If the wsdl is in a jar, I know the CXF wsdl2java tooling (maven
>> >> plugins)
>> >> can
>> >> grab the wsdl out of the jar and generate code from it.   Thus, a
>> >> "common"
>> >> jar could have the wsdl and the common generated stuff (like the jaxb
>> >> types, the service interface, etc...) and the others could use it."
>> >>
>> >> Thanks
>> >> S. Sebastian
>> >
>> > --
>> > Daniel Kulp
>> > dkulp@apache.org
>> > http://www.dankulp.com/blog
> 
> -- 
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
> 
> 

-- 
View this message in context: http://www.nabble.com/Grabing-wsdl-from-a-common-wsdl-jar-file-using-cxf-maven-plugin-tp24793256p24795287.html
Sent from the cxf-user mailing list archive at Nabble.com.


Mime
View raw message