Skip to main content Skip to complementary content

Project Structure

About this task

This sample is Maven-based and consists of three Maven submodules tied together with a parent pom.xml (Maven configuration) file located in the base directory. (The next section will cover the POM files in detail.) The purpose of each of the submodules are as follows:

Submodule

Description

service Provides the implementation for the web service provider (WSP) including its WSDL and OSGi deployment configuration (the latter ignored with Tomcat deployment.) Used both by the war submodule for servlet (Tomcat) deployment and as an OSGi bundle for the Talend Runtime Container. This submodule also generates a separate bundle holding the JAX-WS artifacts (WSP service interfaces and JAXB databinding classes) that will be used by the SOAP client.
war Generates a deployable WAR containing the WSP that can be used with servlet containers such as Tomcat or Jetty. Consists mainly of the web.xml and servlet-specific WSP deployment configuration files. The Talend Runtime Container does not use this module.
client Provides a sample SOAP client for making calls against the WSP. After the WSP is deployed (either via servlet or OSGi), this client can be activated simply by navigating to this folder from a command-prompt window and running mvn exec:exec.

In this section, let's build the project and import it into the Eclipse IDE (the latter step optional, as source files can be viewed and modified using any text editor):

Build the project

Procedure

  1. From a command-prompt window, navigate to the examples/talend/cxf/dev-guide-wsdl-first folder and run mvn clean install. You should see a success message similar to:
    [INFO] ----------------------------------------------------------------
    [INFO] Reactor Summary:
    [INFO] 
    [INFO] Dev Guide Tutorial: WSDL-First Web Service .... SUCCESS [0.197s]
    [INFO] -- Web Service Provider ....................... SUCCESS [4.246s]
    [INFO] -- Service WAR file ........................... SUCCESS [1.143s]
    [INFO] -- SOAP Client ................................ SUCCESS [0.692s]
    [INFO] ----------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ----------------------------------------------------------------
    [INFO] Total time: 6.986s
    
  2. Import the project into Eclipse
    We're importing the project into Eclipse to better view and edit the project's source files, not for building and compiling the project--that's still handled by Maven, allowing you to use any IDE for development.
    From the dev-guide-wsdl-first folder run mvn eclipse:clean eclipse:eclipse. Here, the Maven Eclipse Plugin will create the Eclipse project folders allowing for easy importation of the project into the IDE.
    Next, within Eclipse import the three projects into the IDE using File Menu->Import->Existing Projects Into Workspace and selecting the dev-guide-wsdl-first root folder. You'll see the three Maven subprojects (client, service, war) that you can bring in. Note as just the submodules are being imported that the top-level dev-guide-wsdl-first/pom.xml file will not be directly accessible from the IDE using this method--you'll need to manually open this file when desired from the Eclipse File menu.

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 – please let us know!