CXF Maven Archetypes - 6.5

Talend ESB Development Guide

EnrichVersion
6.5
EnrichProdName
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
task
Design and Development
EnrichPlatform
Talend ESB

Apache CXF provides a Maven archetype for creating Java-first web services. In the this section we'll explore using it along with the Eclipse's m2eclipse plugin. Open Eclipse:

  1. From Main Menu: File>New>Other, Select "Maven Project" under "Maven" category:

  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. On this page, enter "cxf" in the Filter box and select the item with group ID of org.apache.cxf.archetype and artifact ID of cxf-jaxws-javafirst:

    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
  3. Then, Click Next. We need to fill the required fields, which we can do as below:

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

We have the project skeleton that we can start from now, and add Java methods to represent web service operations we wish to implement. "HelloWorld.java" is the simple interface that this archetype generates, along with an ready-to-run implementation (HelloWorldImpl.java) of it. Of course 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, in the next sections we'll show how to manually add in OSGi configuration as well as use soapUI to make SOAP calls.