You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by tomstark <to...@polycom.com> on 2014/01/15 01:07:02 UTC
wadl2java generates invalid method names
I have a particular wadl that has a method that has multiple representations
(different versions of the same object). Using the -supportMultipleXmlReps,
produces method names that have invalid characters in the name. The
representations in the wadl are something like this:
application.vnd.myvnd.some-object+xml
application.vnd.myvnd.some-object-v2+xml
The resulting method names are generated with "some-object" and
"some-object-v2" as part of the method name.
Tested this on wadl2java v2.5.2 and 2.7.8.
Similar to issue https://issues.apache.org/jira/browse/CXF-4932
<https://issues.apache.org/jira/browse/CXF-4932> but has to do with method
names, not parameters.
--
View this message in context: http://cxf.547215.n5.nabble.com/wadl2java-generates-invalid-method-names-tp5738564.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: wadl2java generates invalid method names
Posted by Sergey Beryozkin <sb...@gmail.com>.
On 16/01/14 09:51, Sergey Beryozkin wrote:
> May be you meant you have an attribute like element="somens:my-object" ?
> That can affect it when we have multiple xml representations
I've fixed this specific issue - try the latest snapshots in a day or
so, if however the issue you are facing is somewhere else then please
create a new JIRA issue
Sergey
>
> Cheers, Sergey
>
> On 16/01/14 09:27, Sergey Beryozkin wrote:
>> On 16/01/14 00:24, tomstark wrote:
>>> Update: It's not like the bug mentioned in the previous post since it
>>> doesn't have anything to do with a collision with java reserved names
>>> but
>>> requires the same substitution for method names that are generated
>>> based on
>>> multiple representations.
>>
>> I can not keep guessing what combination is causing the issue :-). Why
>> don't you create a JIRA issue and type a WADL fragment which is causing
>> an issue, or type it here, it does not have to be the same as you
>> actually use,
>>
>> Sergey
>>
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://cxf.547215.n5.nabble.com/wadl2java-generates-invalid-method-names-tp5738564p5738601.html
>>>
>>>
>>> Sent from the cxf-user mailing list archive at Nabble.com.
>>>
>>
>
>
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Blog: http://sberyozkin.blogspot.com
Re: wadl2java generates invalid method names
Posted by Sergey Beryozkin <sb...@gmail.com>.
May be you meant you have an attribute like element="somens:my-object" ?
That can affect it when we have multiple xml representations
Cheers, Sergey
On 16/01/14 09:27, Sergey Beryozkin wrote:
> On 16/01/14 00:24, tomstark wrote:
>> Update: It's not like the bug mentioned in the previous post since it
>> doesn't have anything to do with a collision with java reserved names but
>> requires the same substitution for method names that are generated
>> based on
>> multiple representations.
>
> I can not keep guessing what combination is causing the issue :-). Why
> don't you create a JIRA issue and type a WADL fragment which is causing
> an issue, or type it here, it does not have to be the same as you
> actually use,
>
> Sergey
>
>>
>>
>>
>> --
>> View this message in context:
>> http://cxf.547215.n5.nabble.com/wadl2java-generates-invalid-method-names-tp5738564p5738601.html
>>
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>
Re: wadl2java generates invalid method names
Posted by Sergey Beryozkin <sb...@gmail.com>.
On 16/01/14 00:24, tomstark wrote:
> Update: It's not like the bug mentioned in the previous post since it
> doesn't have anything to do with a collision with java reserved names but
> requires the same substitution for method names that are generated based on
> multiple representations.
I can not keep guessing what combination is causing the issue :-). Why
don't you create a JIRA issue and type a WADL fragment which is causing
an issue, or type it here, it does not have to be the same as you
actually use,
Sergey
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/wadl2java-generates-invalid-method-names-tp5738564p5738601.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
Re: wadl2java generates invalid method names
Posted by tomstark <to...@polycom.com>.
Update: It's not like the bug mentioned in the previous post since it
doesn't have anything to do with a collision with java reserved names but
requires the same substitution for method names that are generated based on
multiple representations.
--
View this message in context: http://cxf.547215.n5.nabble.com/wadl2java-generates-invalid-method-names-tp5738564p5738601.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: wadl2java generates invalid method names
Posted by Sergey Beryozkin <sb...@gmail.com>.
Can you type a sample fragment ?
I've added
<method name="POST" id="addBookOrBook2ComplexMediaTypes">
<request>
<representation
mediaType="application.vnd.myvnd.some-object+xml"
element="prefix1:thebook"/>
<representation
mediaType="application.vnd.myvnd.some-object-v2+xml"
element="prefix1:theBook2"/>
<representation mediaType="application/json"/>
</request>
<response status="201"/>
</method>
to a test WADL and all is generated correctly with a
supportMultipleXmlReps option.
Sergey
On 15/01/14 00:07, tomstark wrote:
> I have a particular wadl that has a method that has multiple representations
> (different versions of the same object). Using the -supportMultipleXmlReps,
> produces method names that have invalid characters in the name. The
> representations in the wadl are something like this:
>
> application.vnd.myvnd.some-object+xml
> application.vnd.myvnd.some-object-v2+xml
>
> The resulting method names are generated with "some-object" and
> "some-object-v2" as part of the method name.
>
> Tested this on wadl2java v2.5.2 and 2.7.8.
>
> Similar to issue https://issues.apache.org/jira/browse/CXF-4932
> <https://issues.apache.org/jira/browse/CXF-4932> but has to do with method
> names, not parameters.
>
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/wadl2java-generates-invalid-method-names-tp5738564.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Blog: http://sberyozkin.blogspot.com