You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Clint Dovholuk <cd...@axeda.com> on 2013/02/26 05:00:58 UTC

WSDL/WADL produced in predictable order?

Hi All,

I use cxf 2.5.1 currently and I was wondering if there was some mechanism to sort the WSDL and WADL schemas/elements/operations/resources etc.  I'd like to be able to track the wsdl/wadl that we produce as it's a lot easier to detect breaking changes by looking at these artifacts.

Is there any way to produce these artifacts in a predictable way which paves the way to easy diffing?

I'm just looking for if this feature exists in cxf itself. We've found sortOperationsByPath on WadlGenerator however that only sorts operations. I'm looking to sort 'everything' (or at very least have it emit in the same order every time).

Hope that is clear and makes sense.

Thanks
-Clint

RE: WSDL/WADL produced in predictable order?

Posted by Clint Dovholuk <cd...@axeda.com>.
Well, all I really need is to have the elements come out in the same order - whatever that order is every time.  It seems like sorting the classes by the complexType name would be an easy thing to do but I'm certainly only speculating.  If the <schema> tag in the <grammars> section simply sorted the elements / complex types by name before emitting that'd be super... same for the <resource path tags...

I can certainly post process the wadl but I'd rather not have to :)


-----Original Message-----
From: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Sent: Wednesday, February 27, 2013 6:14 AM
To: users@cxf.apache.org
Subject: Re: WSDL/WADL produced in predictable order?

On 27/02/13 09:00, Carl-Erik Kopseng wrote:
>> Is there any way to produce these artifacts in a predictable way which paves the way to easy diffing?
>
> You could just write a small util to filter the xml through before 
> dumping it in your code repository. Then you could have alle the sort 
> operations in the world. Repeatable and easy.
As far as WADL is concerned, we can probably get a bit more order by using an HTTP method name as a secondary key (with path being the first one), but I doubt we can have diff-ready productions produced for WSDL and WADL.
Using a document-first style can be an option too - where a user manually controls the whole document

Cheers, Sergey


Re: WSDL/WADL produced in predictable order?

Posted by Sergey Beryozkin <sb...@gmail.com>.
On 27/02/13 09:00, Carl-Erik Kopseng wrote:
>> Is there any way to produce these artifacts in a predictable way which paves the way to easy diffing?
>
> You could just write a small util to filter the xml through before
> dumping it in your code repository. Then you could have alle the sort
> operations in the world. Repeatable and easy.
As far as WADL is concerned, we can probably get a bit more order by 
using an HTTP method name as a secondary key (with path being the first 
one), but I doubt we can have diff-ready productions produced for WSDL 
and WADL.
Using a document-first style can be an option too - where a user 
manually controls the whole document

Cheers, Sergey


Re: WSDL/WADL produced in predictable order?

Posted by Carl-Erik Kopseng <ca...@gmail.com>.
> Is there any way to produce these artifacts in a predictable way which paves the way to easy diffing?

You could just write a small util to filter the xml through before
dumping it in your code repository. Then you could have alle the sort
operations in the world. Repeatable and easy.