You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Colm O hEigeartaigh <co...@progress.com> on 2008/12/09 16:38:56 UTC

duplicate servicenames + cxf-codegen-plugin

Hi,

I have one wsdl with two servicenames defined. I'm running wsdl2java via
the cxf-codegen-plugin, e.g.:


<wsdlOption>
  <wsdl>${basedir}/src/test/resources/blah.wsdl</wsdl>
  <extraargs>
    <extraarg>-sn</extraarg>
    <extraarg>fooService</extraarg>
  </extraargs>
</wsdlOption>

<wsdlOption>
  <wsdl>${basedir}/src/test/resources/blah.wsdl</wsdl>
  <extraargs>
    <extraarg>-sn</extraarg>
    <extraarg>barService</extraarg>
  </extraargs>
</wsdlOption>

When I do this I get an error about defining duplicate servicenames.
When I separate both out into separate "execution" instances in my pom,
the error goes away. 

Is this a bug or not? The WSDL2JavaMojo in CXF has a "mergeOptions"
method that looks like it could be the culprit. Why not just leave the
options separate?

Thanks,

Colm.

Re: duplicate servicenames + cxf-codegen-plugin

Posted by Daniel Kulp <dk...@apache.org>.
On Tuesday 09 December 2008 10:38:56 am Colm O hEigeartaigh wrote:
> Hi,
>
> I have one wsdl with two servicenames defined. I'm running wsdl2java via
> the cxf-codegen-plugin, e.g.:
>
>
> <wsdlOption>
>   <wsdl>${basedir}/src/test/resources/blah.wsdl</wsdl>
>   <extraargs>
>     <extraarg>-sn</extraarg>
>     <extraarg>fooService</extraarg>
>   </extraargs>
> </wsdlOption>
>
> <wsdlOption>
>   <wsdl>${basedir}/src/test/resources/blah.wsdl</wsdl>
>   <extraargs>
>     <extraarg>-sn</extraarg>
>     <extraarg>barService</extraarg>
>   </extraargs>
> </wsdlOption>
>
> When I do this I get an error about defining duplicate servicenames.
> When I separate both out into separate "execution" instances in my pom,
> the error goes away.

Can you provide an example/test case?

> Is this a bug or not? The WSDL2JavaMojo in CXF has a "mergeOptions"
> method that looks like it could be the culprit. Why not just leave the
> options separate?

It should be separate at that level.   We have to merge in options that are 
defined in the defaultOptions section as well as options detected via files 
next to the wsdl.    We shouldn't be merging in separate wsdlOptions things.


-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog