I made it a minor bug https://issues.apache.org/jira/browse/CXF-5694 however it is quite annoying...
Thanks Sergey -----Original Message----- From: Sergey Beryozkin [mailto:[email protected]] Sent: Wednesday, April 16, 2014 9:27 AM To: [email protected] Subject: Re: CXF 2.7.10 bug : parameters from WADL in alphabetic order Hi On 16/04/14 13:53, Clint Dovholuk wrote: > Hiya, > > We have a wadl that we export from cxf 2.7.10 and we turn around and > consume the wadl we produce to provide a client jar (which also uses > cxf 2.7.10) > > The snippet of wadl we have is here: > > <resource path="/id/{id}/a/id/{aId}"> > <param name="id" style="template" type="xs:string" /> > <param name="aId" style="template" type="xs:string" /> > <method name="DELETE" id="remove"> > <request /> > <response> > <representation mediaType="application/xml" > element="prefix1:SomeClassToReturn" /> > <representation mediaType="application/json" /> > </response> > </method> > </resource> > > However this generates client code where the "id" and "aId" are out of order > like this: > @DELETE > @Produces({"application/xml", "application/json" }) > @Path("/id/{id}/a/id/{aId}") > SomeClassToReturn remove(@PathParam("aId") String aId, > @PathParam("id") String id); > > For kicks we renamed "aId" to "zId" and low and behold we now get (notice the > parameter zId at the end now): > SomeClassToReturn remove(@PathParam("id") String id, > @PathParam("zId") String zId); > > I also found this nabble post as well (though this is for wsdl vs wadl) > http://cxf.547215.n5.nabble.com/Ordering-of-wsdl-method-parameters-changed-for-java-first-services-td5736502.html > it seems to be indicating the same issue but I didn't see it come to > conclusion and I couldn't find any more threads. > > Should I file this as a bug report? Do you fine fellas do it? > > > I'd call it as "imperfection" :-), as the parameters will be initialized correctly even if they are not in the same order the matching Path template variables are. Can you please open an improvement request (mar it as Bug if you prefer :-)) ? Thanks, Sergey
