# 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<br>its WSDL and OSGi deployment configuration (the latter ignored with Tomcat<br>deployment.) Used both by the war submodule for servlet (Tomcat) deployment and<br>as an OSGi bundle for the Talend Runtime Container.<br>This submodule also generates a separate bundle holding the JAX-WS artifacts<br>(WSP service interfaces and JAXB databinding classes) that will be<br>used by the SOAP client. |
| war | Generates a deployable WAR containing the WSP that can be used<br>with servlet containers such as Tomcat or Jetty. Consists mainly of<br>the web.xml and servlet-specific WSP deployment configuration files.<br>The Talend Runtime Container does not use this module. |
| client | Provides a sample SOAP client for making calls against the WSP.<br>After the WSP is deployed (either via servlet or OSGi), this client<br>can be activated simply by navigating to this folder from a<br>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](http://maven.apache.org/plugins/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-&gt;Import-&gt;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.