CXF Maven Archetypes - 8.0

Talend ESB Development Guide

Version
8.0
Language
English
Product
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend ESB
Talend Runtime
Content
Design and Development
Last publication date
2024-03-13

About this task

Apache CXF provides a Maven archetype for creating Java-first web services. This section explores using it along with the Eclipse's m2eclipse plugin. Open Eclipse:

Procedure

  1. From the main menu, go to File > New > Other, and select Maven Project under the Maven category:

    Example

  2. Click Next to get the Select project name and location screen, accept its defaults, and click Next again to get to the Select an Archetype dialog.
  3. On this page, enter cxf in the Filter field, and select the item with group ID org.apache.cxf.archetype and artifact ID cxf-jaxws-javafirst:

    Example

    If the CXF archetype is not already available in your Eclipse installation, add it by selecting Add Archetype... with the following information:
    • Archetype Group Id: org.apache.cxf.archetype
    • Archetype Artifact Id: cxf-jaxws-javafirst
    • Archetype Version:
    • Repository URL: http://repo1.maven.org/maven2
  4. Then, Click Next. Fill the required fields as below:

    Example

  5. Click Finish, the project skeleton will be generated with a structure as below:

    Example

Results

The project skeleton is created and can be started, and you can add Java methods to represent the web service operations you want to implement. "HelloWorld.java" is the simple interface that this archetype generates, along with an ready-to-run implementation (HelloWorldImpl.java) of it. Both can be changed when implementing your own web service provider.

Since the CXF Maven archetype does not provide a test SOAP client or provide OSGi deployment capability, the next sections explain how to manually add in OSGi configuration as well as to use SoapUI to make SOAP calls.