You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by bronchito <br...@web.de> on 2008/05/19 20:41:09 UTC
Maven2 codegen-plugin using more binding files
Hi,
how can I use more then one binding file in my <wsdlOptions> ?
If you run wsdlToJava on the command line, it is possible to add more then
one binding file with the -b option. (space seperated)
But how should i realize it in maven ?
My configuration looks like :
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>${cxf-codegen-plugin.version}</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>wsdl2java</goal>
</goals>
<configuration>
<sourceRoot>
${basedir}/src/generated/java
</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>
${basedir}/${schema.location}/<myWSDL>.wsdl
</wsdl>
<extraargs>
<extraarg>-b</extraarg>
<extraarg>
${basedir}/${schema.location}/binding1.xjb
</extraarg>
<extraarg>
${basedir}/${schema.location}/binding2.xjb
</extraarg>
</extraargs> ..........................
If i execute these configuration, the following failure occures:
WSDLToJava Error :
org.apache.cxf.tools.common.toolspec.parser.BadUsageException: Unexpected
argumen
I also tried to seperate the binding-files with spaces (within one
<extraarg> - tag) but then, the plugin use it as one file name.
Can someone help me.
Greetings
Bronchito
--
View this message in context: http://www.nabble.com/Maven2-codegen-plugin-using-more-binding-files-tp17325324p17325324.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Antwort: Re: Maven2 codegen-plugin using more binding files
[Virus checked]
Posted by bronchito <br...@web.de>.
Yes ,
thank you , you're wright.
There was a fault in some bindings, as you say. After fixing it, i've seen,
that the second binding.xjb was not used.
After your reply, i test the first way, like Dan said and now it works.
My fault ,sorry.
Thanks a lot
Bronchito
jan.minaroviech wrote:
>
> Hello Bronchito,
>
> it's not correct !
> Error you had was produced by jaxb, because some binding was incorrect
> (maybe only with combination with others).
>
> for the same wsdl it's correct as Dan wrote. I'm using this way also 5
> binding files
>
> best regards
> jano
>
>
>
>
> bronchito <br...@web.de>
> 05/20/2008 08:49
> Bitte antworten an
> users@cxf.apache.org
>
>
> An
> users@cxf.apache.org
> Kopie
>
> Thema
> Re: Maven2 codegen-plugin using more binding files [Virus checked]
>
>
>
>
>
>
>
> sorry for double post but i resolve the problem:
>
> you have to duplicate the hole wsdlOption part.
>
> the new configuration looks like :
>
> <wsdlOptions>
> <wsdlOption>
> <wsdl>
> ${basedir}/${schema.location}/myWsdl.wsdl
> </wsdl>
> <extraargs>
> <extraarg>-b</extraarg>
> <extraarg>
> ${basedir}/${schema.location}/binding1.xjb
> </extraarg>
> </extraargs>
> </wsdlOption>
> <wsdlOption>
> <wsdl>
> ${basedir}/${schema.location}/myWsdl.wsdl
> </wsdl>
> <extraargs>
> <extraarg>-b</extraarg>
> <extraarg>
> ${basedir}/${schema.location}/binding2.xjb
> </extraarg>
> </extraargs>
> </wsdlOption>
>
> Thanks a lot.
>
> Bronchito
>
>
>
> bronchito wrote:
>>
>> Thanks for reply.
>>
>> I've tried it, but now the following failure occures :
>>
>>
>> WSDLToJava Error : Thrown by JAXB : compiler was unable to honor this
>> property customization. It is
>> attached to a wrong place, or its inconsistent with other bindings.
>>
>>
>> Is there another way, to enclose more then one binding file ?
>>
>> By the way, we must use CXF 2.0-incubator.
>>
>>
>> Bronchito
>>
>>
>> dkulp wrote:
>>>
>>>
>>> I believe it would be:
>>>
>>> <extraarg>-b</extraarg>
>>> <extraarg>
>>> ${basedir}/${schema.location}/binding1.xjb
>>> </extraarg>
>>> <extraarg>-b</extraarg>
>>> <extraarg>
>>> ${basedir}/${schema.location}/binding2.xjb
>>> </extraarg>
>>>
>>>
>>> Dan
>>>
>>>
>>>
>>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/Maven2-codegen-plugin-using-more-binding-files-tp17325324p17334308.html
>
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>
>
>
>
>
--
View this message in context: http://www.nabble.com/Maven2-codegen-plugin-using-more-binding-files-tp17325324p17336094.html
Sent from the cxf-user mailing list archive at Nabble.com.
Antwort: Re: Maven2 codegen-plugin using more binding files [Virus checked]
Posted by ja...@external.t-mobile.at.
Hello Bronchito,
it's not correct !
Error you had was produced by jaxb, because some binding was incorrect
(maybe only with combination with others).
for the same wsdl it's correct as Dan wrote. I'm using this way also 5
binding files
best regards
jano
bronchito <br...@web.de>
05/20/2008 08:49
Bitte antworten an
users@cxf.apache.org
An
users@cxf.apache.org
Kopie
Thema
Re: Maven2 codegen-plugin using more binding files [Virus checked]
sorry for double post but i resolve the problem:
you have to duplicate the hole wsdlOption part.
the new configuration looks like :
<wsdlOptions>
<wsdlOption>
<wsdl>
${basedir}/${schema.location}/myWsdl.wsdl
</wsdl>
<extraargs>
<extraarg>-b</extraarg>
<extraarg>
${basedir}/${schema.location}/binding1.xjb
</extraarg>
</extraargs>
</wsdlOption>
<wsdlOption>
<wsdl>
${basedir}/${schema.location}/myWsdl.wsdl
</wsdl>
<extraargs>
<extraarg>-b</extraarg>
<extraarg>
${basedir}/${schema.location}/binding2.xjb
</extraarg>
</extraargs>
</wsdlOption>
Thanks a lot.
Bronchito
bronchito wrote:
>
> Thanks for reply.
>
> I've tried it, but now the following failure occures :
>
>
> WSDLToJava Error : Thrown by JAXB : compiler was unable to honor this
> property customization. It is
> attached to a wrong place, or its inconsistent with other bindings.
>
>
> Is there another way, to enclose more then one binding file ?
>
> By the way, we must use CXF 2.0-incubator.
>
>
> Bronchito
>
>
> dkulp wrote:
>>
>>
>> I believe it would be:
>>
>> <extraarg>-b</extraarg>
>> <extraarg>
>> ${basedir}/${schema.location}/binding1.xjb
>> </extraarg>
>> <extraarg>-b</extraarg>
>> <extraarg>
>> ${basedir}/${schema.location}/binding2.xjb
>> </extraarg>
>>
>>
>> Dan
>>
>>
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/Maven2-codegen-plugin-using-more-binding-files-tp17325324p17334308.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Maven2 codegen-plugin using more binding files
Posted by bronchito <br...@web.de>.
sorry for double post but i resolve the problem:
you have to duplicate the hole wsdlOption part.
the new configuration looks like :
<wsdlOptions>
<wsdlOption>
<wsdl>
${basedir}/${schema.location}/myWsdl.wsdl
</wsdl>
<extraargs>
<extraarg>-b</extraarg>
<extraarg>
${basedir}/${schema.location}/binding1.xjb
</extraarg>
</extraargs>
</wsdlOption>
<wsdlOption>
<wsdl>
${basedir}/${schema.location}/myWsdl.wsdl
</wsdl>
<extraargs>
<extraarg>-b</extraarg>
<extraarg>
${basedir}/${schema.location}/binding2.xjb
</extraarg>
</extraargs>
</wsdlOption>
Thanks a lot.
Bronchito
bronchito wrote:
>
> Thanks for reply.
>
> I've tried it, but now the following failure occures :
>
>
> WSDLToJava Error : Thrown by JAXB : compiler was unable to honor this
> property customization. It is
> attached to a wrong place, or its inconsistent with other bindings.
>
>
> Is there another way, to enclose more then one binding file ?
>
> By the way, we must use CXF 2.0-incubator.
>
>
> Bronchito
>
>
> dkulp wrote:
>>
>>
>> I believe it would be:
>>
>> <extraarg>-b</extraarg>
>> <extraarg>
>> ${basedir}/${schema.location}/binding1.xjb
>> </extraarg>
>> <extraarg>-b</extraarg>
>> <extraarg>
>> ${basedir}/${schema.location}/binding2.xjb
>> </extraarg>
>>
>>
>> Dan
>>
>>
>>
>>
>
>
--
View this message in context: http://www.nabble.com/Maven2-codegen-plugin-using-more-binding-files-tp17325324p17334308.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Maven2 codegen-plugin using more binding files
Posted by bronchito <br...@web.de>.
Thanks for reply.
I've tried it, but now the following failure occures :
WSDLToJava Error : Thrown by JAXB : compiler was unable to honor this
property customization. It is
attached to a wrong place, or its inconsistent with other bindings.
Is there another way, to enclose more then one binding file ?
By the way, we must use CXF 2.0-incubator.
Bronchito
dkulp wrote:
>
>
> I believe it would be:
>
> <extraarg>-b</extraarg>
> <extraarg>
> ${basedir}/${schema.location}/binding1.xjb
> </extraarg>
> <extraarg>-b</extraarg>
> <extraarg>
> ${basedir}/${schema.location}/binding2.xjb
> </extraarg>
>
>
> Dan
>
>
>
>
--
View this message in context: http://www.nabble.com/Maven2-codegen-plugin-using-more-binding-files-tp17325324p17333818.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: Maven2 codegen-plugin using more binding files
Posted by Daniel Kulp <dk...@apache.org>.
I believe it would be:
<extraarg>-b</extraarg>
<extraarg>
${basedir}/${schema.location}/binding1.xjb
</extraarg>
<extraarg>-b</extraarg>
<extraarg>
${basedir}/${schema.location}/binding2.xjb
</extraarg>
Dan
On May 19, 2008, at 2:41 PM, bronchito wrote:
>
> Hi,
>
> how can I use more then one binding file in my <wsdlOptions> ?
>
> If you run wsdlToJava on the command line, it is possible to add
> more then
> one binding file with the -b option. (space seperated)
>
> But how should i realize it in maven ?
>
> My configuration looks like :
>
> <plugin>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-codegen-plugin</artifactId>
> <version>${cxf-codegen-plugin.version}</version>
> <executions>
> <execution>
> <id>generate-sources</id>
> <phase>generate-sources</phase>
> <goals>
> <goal>wsdl2java</goal>
> </goals>
> <configuration>
> <sourceRoot>
> ${basedir}/src/generated/java
> </sourceRoot>
> <wsdlOptions>
> <wsdlOption>
> <wsdl>
> ${basedir}/${schema.location}/<myWSDL>.wsdl
> </wsdl>
> <extraargs>
> <extraarg>-b</extraarg>
> <extraarg>
> ${basedir}/${schema.location}/binding1.xjb
> </extraarg>
> <extraarg>
> ${basedir}/${schema.location}/binding2.xjb
> </extraarg>
> </extraargs> ..........................
>
> If i execute these configuration, the following failure occures:
>
> WSDLToJava Error :
> org.apache.cxf.tools.common.toolspec.parser.BadUsageException:
> Unexpected
> argumen
>
>
> I also tried to seperate the binding-files with spaces (within one
> <extraarg> - tag) but then, the plugin use it as one file name.
>
> Can someone help me.
>
>
> Greetings
>
> Bronchito
>
>
>
> --
> View this message in context: http://www.nabble.com/Maven2-codegen-plugin-using-more-binding-files-tp17325324p17325324.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
---
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog