I like the idea of using Maven repos for storing service artifacts.
Nevertheless using published contracts ca be practical IMO for ad-hoc
tests and similar.

--Gunnar


2011/6/14 Christian Schneider <[email protected]>:
> I think the best way of ensuring contract first is used is by not using the
> wsdl from the endpoint at all. Create your wsdls and store them at a well
> known place.
> Then every developer should learn to use the wsdl from this one place. This
> also ensures that you can create centralized reviews and rules for the wsdls
> if they are needed.
>
> To make this aproach as simple as possible for the developers I used a maven
> repo as the central place for the wsdls. The cxf codegen plugin now allows
> loading wsdls directly from maven when generating code. So it is even easier
> for a developer to go this way as he does not have to load and store the
> wsdl locally.
>
> See:
> http://www.liquid-reality.de/display/liquid/2009/09/03/Use+maven+repository+as+a+service+repository
>
> Christian
>
>
> Am 13.06.2011 13:54, schrieb Gunnar Morling:
>>
>> Hi,
>>
>> I'm wondering whether there is a way to "enforce" the contract-first
>> approach using CXF.
>>
>> The reason I'm asking is that I created a web service following the
>> contract-first approach but forgot to specify the "wsdlLocation"
>> attribute within the endpoint's configuration. The CXF runtime then
>> recreated a WSDL and XSD's for the published service (which naturally
>> lacked details of the original files such as restrictions in type
>> definitions etc.) from the generated Java types. It took me quite a
>> while to notice that the published artifacts weren't the original
>> ones.
>>
>> So instead of falling back implicitly to the code-first approach I
>> think it would be great if there was an option such as "enforce
>> implementation style". Setting this option to "contract first" would
>> cause the runtime to fail starting up in such cases with a meaningful
>> message describing the wrong/missing configuration. Is there something
>> like that possible with CXF?
>>
>> Thanks, Gunnar
>>
>
>
> --
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Open Source Architect
> Talend Application Integration Division http://www.talend.com
>
>

Reply via email to