Skip to main content

Generating the Stub Code

The starting point for developing a service consumer (or client) in CXF is a WSDL contract, complete with port type, binding, and service definitions. You can then use the wsdl2java utility to generate the Java stub code from the WSDL contract. The stub code provides the supporting code that is required to invoke operations on the remote service. For CXF clients, the wsdl2java utility can generate the following kinds of code:

  • Stub code - supporting files for implementing a CXF client.

  • Client starting point code - sample client code that connects to the remote service and invokes every operation on the remote service.

  • Ant build file - a build.xml file intended for use with the ant build utility. It has targets for building and for running the sample client application.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!