• [ << ]
  • [ 0 ]
  • [ 1 ]
  • [ 2 ]
  • [ 3 ]
  • [ 4 ]
  • [ >> ]
Nov '11
21

Summary

In this tutorial we've made web service implementations and clients with CXF in three different ways:

  • Using 100% Java Interfaces and Aegis data binding.
  • Using the industry standard JAX-WS and JAXB annotations
  • Using a given WSDL and JAX-WS code generation

By building a web service using Java Interfaces and Aegis data binding you can define the contract in which its defined in pure Java. Because the contract is defined in Java its very easy to change. The WSDL and XML are automatically generated from the Java Interfaces. Data Binding is done using reflection, which has a certain overhead.

By building web services using JAX-WS and JAXB you'll be building them using a well known industry standard. The contract is defined in Java which are enriched by Annotations. The service its self is declared as an interface, the data objects are classes. You can add custom methods to the objects. The WSDL and XML are automatically generated using the annotations.

When you build a web service using a given WSDL and use that to generate code from, the contract lies in the WSDL. From web service perspective this is the most pure method. The generated code consists of an interface that represents the service and objects that represent the values. Its not recommended to change these objects as the changes will be overwritten after regeneration. You need to store custom code somewhere else.

Conclusion

For Java driven prototyping or service implementations where interfaces are essential you're best of using method one (Aegis). If you've already got a WSDL or have to work with an integration component that has very specific demands on the WSDL (it happens more often than you think) you're best of using the third method (generate code from the WSDL). In all other cases, the second method is the best (annotated classes and interface).

Useful links

  • [ << ]
  • [ 0 ]
  • [ 1 ]
  • [ 2 ]
  • [ 3 ]
  • [ 4 ]
  • [ >> ]