You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Glen Mazza <gl...@gmail.com> on 2008/08/20 03:19:09 UTC

Re: New Howto: Defining Contract first webservices with wsdl generation from java


Christian Schneider wrote:
> 
> I have written a new howto demonstrating how to define webservices in 
> java code and then generate the wsdl out of it. The main
> idea is that this is no java first. The java code is only used as a DSL 
> to define the service and generate the wsdl which is the real contract.
> 

Danke fuer Ihr Tutorium!  BTW, in wirklichkeit heisst das nicht "Contract
First", sondern "Code First".  Contract first beginnt mit einem WSDL: 
http://static.springframework.org/spring-ws/sites/1.5/reference/html/why-contract-first.html

(Translation:  Thanks for your tutorial!  BTW, Orlando, Florida is beautiful
this time of year:  http://www.orlandoinfo.com/)

Glen


-- 
View this message in context: http://www.nabble.com/New-Howto%3A-Defining-Contract-first-webservices-with-wsdl-generation-from-java-tp19056049p19061404.html
Sent from the cxf-dev mailing list archive at Nabble.com.


Re: New Howto: Defining Contract first webservices with wsdl generation from java

Posted by Christian Schneider <ch...@die-schneider.net>.
Glen Mazza schrieb:
> Christian Schneider wrote:
>   
>> I have written a new howto demonstrating how to define webservices in 
>> java code and then generate the wsdl out of it. The main
>> idea is that this is no java first. The java code is only used as a DSL 
>> to define the service and generate the wsdl which is the real contract.
>>
>>     
>
> Danke fuer Ihr Tutorium!  BTW, in wirklichkeit heisst das nicht "Contract
> First", sondern "Code First".  Contract first beginnt mit einem WSDL: 
> http://static.springframework.org/spring-ws/sites/1.5/reference/html/why-contract-first.html
>
> (Translation:  Thanks for your tutorial!  BTW, Orlando, Florida is beautiful
> this time of year:  http://www.orlandoinfo.com/)
>
> Glen
>
>
>   
Hi Glen,

mir geht es tatsächlich um Contract first. Code First ist wenn man aus 
der Implementierung den Service Contract ableitet.
Ich benutze Java nur als DSL zur Definition des WSDl basierten Contract. 
Die Java Stubs für Client und Server werden dann aus dem WSDL gebaut.

Ich bin bei dieser Methode  gelandet, da wir einige Probleme mit Code 
First hatten. Zum Beispiel hat sich der Contract aller existierenden 
Services beim Umstieg von Xfire zu CXF verändert. Daher haben wir 
erkannt, dass wir immer vom WSDL ausgehen müssen. Allerdings ist es sehr 
umständlich, das WSDL von Hand zu bauen. Aus diesem Grund kam ich auf 
die Idee Contract First mit Hilfe von Java umzusetzen. Ich denke, mein 
Ansatz hat alle Vorteile von Contract First.

--

I really try to support Contract First with this post. Code First is 
when you take an Implementation and generate the WSDl out of it. I only 
use Java as a DSL to build the WSDL based Contract. The Java Stubs for 
Client and Server are then generated from the WSDL again.

I came to this method because we had issues with code first when we 
switched from xfire to cxf. The contract of each existing service did 
change and this meant Clients had to switch at the same time. So we saw 
that we always had to base the contract on the wsdl. Though it is quite 
complicated to build the WSDL by hand. That ws the reason why I had the 
idea to do contract first by using Java. I think my attempt will have 
all the advantages of contract first.

Viele Grüße / best regards

Christian
 

-- 

Christian Schneider
---
http://www.liquid-reality.de