Bug #270133: ANT Support
diff --git a/bundles/org.eclipse.jst.ws.cxf.consumption.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.jst.ws.cxf.consumption.core/META-INF/MANIFEST.MF
index 55d6472..7b2b049 100644
--- a/bundles/org.eclipse.jst.ws.cxf.consumption.core/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.jst.ws.cxf.consumption.core/META-INF/MANIFEST.MF
@@ -17,7 +17,8 @@
  org.eclipse.jdt.core;bundle-version="[3.4.0,4.0.0)",
  javax.wsdl;bundle-version="[1.6.2,1.7.0)",
  org.eclipse.wst.common.modulecore;bundle-version="[1.1.0,1.3.0)",
- org.eclipse.jst.ws.jaxws.core;bundle-version="0.5.0"
+ org.eclipse.jst.ws.jaxws.core;bundle-version="0.5.0",
+ org.eclipse.emf.ecore;bundle-version="[2.4.0,3.0.0)"
 Ant-Version: Apache Ant 1.7.0
 Bundle-RequiredExecutionEnvironment: J2SE-1.5
 Created-By: 1.5.0_14-b03 (Sun Microsystems Inc.)
diff --git a/bundles/org.eclipse.jst.ws.cxf.consumption.core/ant/cxf_bujava.properties b/bundles/org.eclipse.jst.ws.cxf.consumption.core/ant/cxf_bujava.properties
new file mode 100644
index 0000000..35664a5
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.cxf.consumption.core/ant/cxf_bujava.properties
@@ -0,0 +1,50 @@
+###############################################################################
+# Copyright (c) 2008 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+#     Shane Clarke - Apache CXF support
+###############################################################################
+!-- ScenarioType REQUIRED. Differentiates from "client" scenario.
+ScenarioType=service
+
+!-- InitialSelection REQUIRED.  Workspace relative URI to the input WSDL or Java
+InitialSelection=/dynamicWebProjectName/src/packagename/myService.java
+
+!--Utility property values - use these to list valid values for the following properties:
+!-- Service.RuntimeId, Service.ServerId 
+ListRuntimes=true
+ListServers=true
+!-- Verbose will list informational messages as well as errors if set to true
+Verbose=true
+
+!--  Service.RuntimeId - ID of web service runtime 
+Service.RuntimeId=org.eclipse.jst.ws.cxf.cxfWebServiceRT
+!-- Service.ServerId -  ID of target server 
+Service.ServerId=org.eclipse.jst.server.tomcat.60
+!-- Service.TypeId - Java Bean is default for both Top Down and Bottom Up
+!-- Service.TypeId=Java Bean
+
+!-- ServiceProjectName - !--type:String - name of Service project - this property can be used to give the service project a different name than the project containing the initial selection.  type: String    
+!--ServiceProjectName=serviceProjectName
+!-- ServiceEarProjectName - !--type:String - name of Service EAR project - this property can be used to give the service EAR project a different name than the EAR project already associated with the service project.  type: String
+!--ServiceEarProjectName=serviceEarProjectName
+
+!-- Generate a client mainline using JAX-WS APIs
+!--GenClient=false
+!-- Generate a server mainline using JAX-WS APIs
+!--GenServer=false
+!-- Specify to generate the wrapper and fault beans
+!--GenWrapperFaultBeans=true
+!-- Specify to generate the WSDL file
+!--GenWSDL=true
+!-- Output schemas to separate files and use imports to load them instead of inlining them into the wsdl
+!--GenXSDImports=true
+!--Specifies that the generated WSDL is to include a SOAP 1.2 binding
+!--UseSOAP12Binding=false
+!--Set the name of the generated WSDL file
+!--WsdlFileName=myWSDLFileName.wsdl
diff --git a/bundles/org.eclipse.jst.ws.cxf.consumption.core/ant/cxf_bujava.xml b/bundles/org.eclipse.jst.ws.cxf.consumption.core/ant/cxf_bujava.xml
new file mode 100644
index 0000000..1d5f8b8
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.cxf.consumption.core/ant/cxf_bujava.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+
+<project default="main" basedir=".">
+
+<echo message="pulling in property files"/>
+<property file="cxf_bujava.properties"/>
+	
+<echo message="calling the web services generation ant task: cxf_bujava"/>
+ <target name="main" >
+  	 <wsgen/>
+  </target>
+  
+</project>
diff --git a/bundles/org.eclipse.jst.ws.cxf.consumption.core/ant/cxf_client.properties b/bundles/org.eclipse.jst.ws.cxf.consumption.core/ant/cxf_client.properties
new file mode 100644
index 0000000..90292ce
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.cxf.consumption.core/ant/cxf_client.properties
@@ -0,0 +1,89 @@
+###############################################################################
+# Copyright (c) 2008 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+#     Shane Clarke - Apache CXF support
+###############################################################################
+!--ScenarioType REQUIRED. Differentiates from "service" scenario.
+ScenarioType=client
+
+!--InitialSelection REQUIRED.  Workspace relative URI to the input WSDL or Java.
+InitialSelection=/dynamicWebProjectName/WebContent/wsdl/myService.wsdl
+
+!--Utility property values - use these to list values for the following properties:
+!-- Client.RuntimeId, Client.ServerId 
+ListRuntimes=true
+ListServers=true
+!-- Verbose will list informational messages as well as errors if set to true
+Verbose=true
+ 
+!--Client.RuntimeId - ID of web service runtime 
+Client.RuntimeId=org.eclipse.jst.ws.cxf.cxfWebServiceRT
+!--Client.ServerId - ID of target server 
+Client.ServerId=org.eclipse.jst.server.tomcat.60
+
+!--ClientProjectName - name of Client project - this property can be used to give the client project a 
+!-- different name than the project containing the initial selection
+!--ClientProjectName=clientProjectName
+
+!--ClientEarProjectName- name of Client EAR project - set only if applicable for selected server type
+!--ClientEarProjectName=clientEARProjectName
+
+!--ClientComponentType - type of Client project
+!--ClientComponentType=template.cxf.core
+
+!-- JavaOutput
+!-- Top down - String: the workspace relative URI for a Java source folder for the generated Java code - must be existing workspace source folder
+!--JavaOutput=/projectName/JavaSource
+
+!--Generate Client : REQUIRED
+GenClient=true
+
+!--Generate a server mainline using JAX-WS APIs
+!--GenServer=false
+!--Generate starting point code for an implementation object
+!--GenImpl=true
+!--Generate default values in the implementation and client. Ignored if implementation or client is not being generated
+!--DefaultValues=true
+!--Enables or disables processing of extended soap header message binding
+!--ExtSOAPHeaders=false
+!--Enables or disables loading of the default namespace package name mapping
+!--DefaultNamespace=true
+!--Enables or disables loading of the default excludes namespace mapping
+!--DefaultExcludesNamespace=true
+!--Enable Auto Name Resolution
+!--AutoNameResolution=false
+
+!--Specify the name of the WSDL service for which code is to be generated. The default is to generate code for every service in the WSDL document
+!--ServiceName=myService
+
+!--XJC Args: Specify the arguments to be passed directly to the XJC
+
+!--Initialise fields mapped from elements with their default values
+!--xjc_dv=false
+!--Activate plugin to add a toString() method to generated classes
+!--xjc_ts=false
+!--Have toString produce multi line output
+!--xjc_ts_multi=false
+!--Have toString produce single line terse output
+!--xjc_ts_simple=false
+!--Enable source location support for generated code
+!--xjc_locator=false
+!--Generate accessor methods with the 'synchronized' keyword
+!--xjc_sync_methods=false
+!--Add @Generated annotations to the generated code
+!--xjc_mark_generated=false
+
+!-- Mappings
+!-- Top down scenario. Workspace relative URI to property file containing mappings.
+!-- Mappings are used to override the default package names of the generated Java template classes.
+!-- The content of the properties file must be of the format namespace=package  
+!--Mappings=/dynamicWebProjectName/mappings.txt
+
+!--Binding Files. Comma delimited string of absolute paths in the local file system of JAXWS or JAXB binding files.
+!--Bindings=C:/workspace1/dynamicWebProjectName/binding1.xml,C:/workspace1/dynamicWebProjectName/binding2.xml
\ No newline at end of file
diff --git a/bundles/org.eclipse.jst.ws.cxf.consumption.core/ant/cxf_client.xml b/bundles/org.eclipse.jst.ws.cxf.consumption.core/ant/cxf_client.xml
new file mode 100644
index 0000000..2d3a566
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.cxf.consumption.core/ant/cxf_client.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+
+<project default="main" basedir=".">
+
+<echo message="pulling in property files"/>
+<property file="cxf_client.properties"/>
+	
+<echo message="calling the web services generation ant task: cxf_client"/>
+ <target name="main" >
+  	 <wsgen/>
+  </target>
+  
+</project>
diff --git a/bundles/org.eclipse.jst.ws.cxf.consumption.core/ant/cxf_tdjava.properties b/bundles/org.eclipse.jst.ws.cxf.consumption.core/ant/cxf_tdjava.properties
new file mode 100644
index 0000000..8e6e887
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.cxf.consumption.core/ant/cxf_tdjava.properties
@@ -0,0 +1,83 @@
+###############################################################################
+# Copyright (c) 2008 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+#     Shane Clarke - Apache CXF support
+###############################################################################
+!-- ScenarioType REQUIRED. Differentiates from "client" scenario.
+ScenarioType=service
+
+!-- InitialSelection REQUIRED.  Workspace relative URI to the input WSDL or Java
+InitialSelection=/dynamicWebProjectName/WebContent/wsdl/myService.wsdl
+
+!--Utility property values - use these to list valid values for the following properties:
+!-- Service.RuntimeId, Service.ServerId 
+ListRuntimes=true
+ListServers=true
+!-- Verbose will list informational messages as well as errors if set to true
+Verbose=true
+
+!--  Service.RuntimeId - ID of web service runtime 
+Service.RuntimeId=org.eclipse.jst.ws.cxf.cxfWebServiceRT
+!-- Service.ServerId -  ID of target server 
+Service.ServerId=org.eclipse.jst.server.tomcat.60
+!-- Service.TypeId - Java Bean is default for both Top Down and Bottom Up
+!-- Service.TypeId=Java Bean
+
+!-- ServiceProjectName - !--type:String - name of Service project - this property can be used to give the service project a different name than the project containing the initial selection.  type: String    
+!--ServiceProjectName=serviceProjectName
+!-- ServiceEarProjectName - !--type:String - name of Service EAR project - this property can be used to give the service EAR project a different name than the EAR project already associated with the service project.  type: String
+!--ServiceEarProjectName=serviceEarProjectName
+
+!-- JavaOutput
+!-- Top down - String: the workspace relative URI for a Java source folder for the generated Java code - must be existing workspace source folder
+!--JavaOutput=/projectName/JavaSource
+
+!--Specify the name of the WSDL service for which code is to be generated. The default is to generate code for every service in the WSDL document
+!--ServiceName=myService
+
+!--Generate a server mainline using JAX-WS APIs
+!--GenServer=false
+!--Generate starting point code for an implementation object
+!--GenImpl=true
+!--Generate default values in the implementation and client. Ignored if implementation or client is not being generated
+!--DefaultValues=true
+!--Enables or disables processing of extended soap header message binding
+!--ExtSOAPHeaders=false
+!--Enables or disables loading of the default namespace package name mapping
+!--DefaultNamespace=true
+!--Enables or disables loading of the default excludes namespace mapping
+!--DefaultExcludesNamespace=true
+!--Enable Auto Name Resolution
+!--AutoNameResolution=false
+
+!--XJC Args: Specify the arguments to be passed directly to the XJC
+
+!--Initialise fields mapped from elements with their default values
+!--xjc_dv=false
+!--Activate plugin to add a toString() method to generated classes
+!--xjc_ts=false
+!--Have toString produce multi line output
+!--xjc_ts_multi=false
+!--Have toString produce single line terse output
+!--xjc_ts_simple=false
+!--Enable source location support for generated code
+!--xjc_locator=false
+!--Generate accessor methods with the 'synchronized' keyword
+!--xjc_sync_methods=false
+!--Add @Generated annotations to the generated code
+!--xjc_mark_generated=false
+
+!-- Mappings
+!-- Top down scenario. Workspace relative URI to property file containing mappings.
+!-- Mappings are used to override the default package names of the generated Java template classes.
+!-- The content of the properties file must be of the format namespace=package  
+!--Mappings=/dynamicWebProjectName/mappings.txt
+
+!--Binding Files. Comma delimited string of absolute paths in the local file system of JAXWS or JAXB binding files.
+!--Bindings=C:/workspace1/dynamicWebProjectName/binding1.xml,C:/workspace1/dynamicWebProjectName/binding2.xml
\ No newline at end of file
diff --git a/bundles/org.eclipse.jst.ws.cxf.consumption.core/ant/cxf_tdjava.xml b/bundles/org.eclipse.jst.ws.cxf.consumption.core/ant/cxf_tdjava.xml
new file mode 100644
index 0000000..2c79c6b
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.cxf.consumption.core/ant/cxf_tdjava.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+
+<project default="main" basedir=".">
+
+<echo message="pulling in property files"/>
+<property file="cxf_tdjava.properties"/>
+	
+<echo message="calling the web services generation ant task: cxf_tdjava"/>
+ <target name="main" >
+  	 <wsgen/>
+  </target>
+  
+</project>
diff --git a/bundles/org.eclipse.jst.ws.cxf.consumption.core/build.properties b/bundles/org.eclipse.jst.ws.cxf.consumption.core/build.properties
index 534b8eb..d0ad5cd 100644
--- a/bundles/org.eclipse.jst.ws.cxf.consumption.core/build.properties
+++ b/bundles/org.eclipse.jst.ws.cxf.consumption.core/build.properties
@@ -3,4 +3,5 @@
                about.html,\
                .,\
                plugin.properties,\
-               plugin.xml
+               plugin.xml,\
+               ant/
diff --git a/bundles/org.eclipse.jst.ws.cxf.consumption.core/plugin.properties b/bundles/org.eclipse.jst.ws.cxf.consumption.core/plugin.properties
index 7c6cf7c..c2fbd8e 100644
--- a/bundles/org.eclipse.jst.ws.cxf.consumption.core/plugin.properties
+++ b/bundles/org.eclipse.jst.ws.cxf.consumption.core/plugin.properties
@@ -13,4 +13,9 @@
 pluginProvider=Eclipse Web Tools Platform
 
 WEB_SERVICE_LOCATOR_AXIS=Apache CXF Web Service Locator
-WEB_SERVICE_LOCATOR_CATEGORY_AXIS=Apache CXF Components
\ No newline at end of file
+WEB_SERVICE_LOCATOR_CATEGORY_AXIS=Apache CXF Components
+
+LABEL_RUNTIME_CXF=Apache CXF
+LABEL_BOTTOM_UP_JAVA_BEAN=Bottom up Java bean Web Service
+LABEL_TOP_DOWN_JAVA_BEAN=Top down Java bean Web Service
+LABEL_CLIENT=Client
diff --git a/bundles/org.eclipse.jst.ws.cxf.consumption.core/plugin.xml b/bundles/org.eclipse.jst.ws.cxf.consumption.core/plugin.xml
index 5a3a4b3..dcbcc62 100644
--- a/bundles/org.eclipse.jst.ws.cxf.consumption.core/plugin.xml
+++ b/bundles/org.eclipse.jst.ws.cxf.consumption.core/plugin.xml
@@ -14,4 +14,33 @@
       </webServiceLocator>
    </extension>
 
+   <extension point="org.eclipse.wst.command.env.ui.antfiles">
+      <antfiles
+         id="org.eclipse.jst.ws.cxf.creation.cxfWebServiceRTBUJava"
+    	 runtimeid="cxf"
+    	 pluginlocation="org.eclipse.jst.ws.cxf.consumption.core"
+    	 path="ant/cxf_bujava.properties"
+    	 wsgenpath="ant/cxf_bujava.xml"
+    	 runtimelabel="%LABEL_RUNTIME_CXF"
+    	 scenariolabel="%LABEL_BOTTOM_UP_JAVA_BEAN">
+  	  </antfiles>
+      <antfiles
+         id="org.eclipse.jst.ws.cxf.creation.cxfWebServiceRTTopJava"
+         runtimeid="cxf"
+         pluginlocation="org.eclipse.jst.ws.cxf.consumption.core"
+         path="ant/cxf_tdjava.properties"
+         wsgenpath="ant/cxf_tdjava.xml"
+         runtimelabel="%LABEL_RUNTIME_CXF"
+         scenariolabel="%LABEL_TOP_DOWN_JAVA_BEAN">
+  	  </antfiles>
+  	  <antfiles
+         id="org.eclipse.jst.ws.cxf.creation.cxfWebServiceRTZClient"
+         runtimeid="cxf"
+         pluginlocation="org.eclipse.jst.ws.cxf.consumption.core"
+         path="ant/cxf_client.properties"
+         wsgenpath="ant/cxf_client.xml"
+         runtimelabel="%LABEL_RUNTIME_CXF"
+         scenariolabel="%LABEL_CLIENT">
+      </antfiles>
+   </extension>
 </plugin>
diff --git a/bundles/org.eclipse.jst.ws.cxf.consumption.core/src/org/eclipse/jst/ws/internal/cxf/consumption/core/commands/WSDL2JavaClientCommand.java b/bundles/org.eclipse.jst.ws.cxf.consumption.core/src/org/eclipse/jst/ws/internal/cxf/consumption/core/commands/WSDL2JavaClientCommand.java
index 0b637d7..0525ff5 100644
--- a/bundles/org.eclipse.jst.ws.cxf.consumption.core/src/org/eclipse/jst/ws/internal/cxf/consumption/core/commands/WSDL2JavaClientCommand.java
+++ b/bundles/org.eclipse.jst.ws.cxf.consumption.core/src/org/eclipse/jst/ws/internal/cxf/consumption/core/commands/WSDL2JavaClientCommand.java
@@ -12,6 +12,7 @@
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.resources.IResource;
@@ -95,4 +96,84 @@
         }
         return status;
     }
-}
+
+    //ANT Environment Mappings
+    public void setJavaSourceFolder(String javaSourceFolder) {
+        model.setJavaSourceFolder(javaSourceFolder);
+    }
+
+    public void setServiceName(String serviceName) {
+        model.setServiceName(serviceName);
+    }
+
+    public void setGenerateServer(boolean generateServer) {
+        model.setGenerateServer(generateServer);
+    }
+
+    public void setGenerateClient(boolean generateClient) {
+        model.setGenerateClient(generateClient);
+    }
+
+    public void setGenerateImplementation(boolean generateImplementation) {
+        model.setGenerateImplementation(generateImplementation);
+    }
+
+    public void setUseDefaultValues(boolean useDefaultValues) {
+        model.setUseDefaultValues(useDefaultValues);
+    }
+
+    public void setProcessSOAPHeaders(boolean processSOAPHeaders) {
+        model.setProcessSOAPHeaders(processSOAPHeaders);
+    }
+
+    public void setLoadDefaultNamespacePackageNameMapping(boolean loadDefaultNamespacePackageNameMapping) {
+        model.setLoadDefaultNamespacePackageNameMapping(loadDefaultNamespacePackageNameMapping);
+    }
+
+    public void setLoadDefaultExcludesNamepsaceMapping(boolean loadDefaultExcludesNamepsaceMapping) {
+        model.setLoadDefaultExcludesNamepsaceMapping(loadDefaultExcludesNamepsaceMapping);
+    }
+
+    public void setAutoNameResolution(boolean autoNameResolution) {
+        model.setAutoNameResolution(autoNameResolution);
+    }
+
+    public void setXjcUseDefaultValues(boolean xjcUseDefaultValues) {
+        model.setXjcUseDefaultValues(xjcUseDefaultValues);
+    }
+
+    public void setXjcToString(boolean xjcToString) {
+        model.setXjcToStringSimple(xjcToString);
+    }
+
+    public void setXjcToStringSimple(boolean xjcToStringSimple) {
+        model.setXjcToStringSimple(xjcToStringSimple);
+    }
+
+    public void setXjcToStringMultiLine(boolean xjcToStringMultiLine) {
+        model.setXjcToStringMultiLine(xjcToStringMultiLine);
+    }
+
+    public void setXjcLocator(boolean xjcLocator) {
+        model.setXjcLocator(xjcLocator);
+    }
+
+    public void setXjcSyncMethods(boolean xjcSyncMethods) {
+        model.setXjcSyncMethods(xjcSyncMethods);
+    }
+
+    public void setXjcMarkGenerated(boolean xjcMarkGenerated) {
+        model.setXjcMarkGenerated(xjcMarkGenerated);
+    }
+
+    @SuppressWarnings("unchecked")
+    public void setIncludedNamespaces(Map value) {
+        model.setIncludedNamespaces(value);
+    }
+
+    public void setBindingFiles(List<String> bindingFiles) {
+        for (String path : bindingFiles) {
+            model.getBindingFiles().add(path);
+        }
+    }
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.jst.ws.cxf.consumption.ui/plugin.xml b/bundles/org.eclipse.jst.ws.cxf.consumption.ui/plugin.xml
index 3c0d1b6..29981a1 100644
--- a/bundles/org.eclipse.jst.ws.cxf.consumption.ui/plugin.xml
+++ b/bundles/org.eclipse.jst.ws.cxf.consumption.ui/plugin.xml
@@ -1,39 +1,135 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?eclipse version="3.2"?>
 <plugin>
-  <extension point="org.eclipse.jst.ws.consumption.ui.wsImpl">
-    <webServiceImpl
+    <extension point="org.eclipse.jst.ws.consumption.ui.wsImpl">
+        <webServiceImpl
             id="org.eclipse.jst.ws.cxf.wsImpl.java"
             label="%JAXWS_WEBSERVICETYPE"
             resourceTypeMetadata="File IResource CompilationUnit"
             extensionMetadata=".java .class"
             objectSelectionWidget="org.eclipse.jst.ws.cxf.consumption.ui.widgets.object.CXFJAXWSSelectionWidget"
             mergerClass="org.eclipse.jst.ws.internal.consumption.common.JavaMerger">
-    </webServiceImpl>
-   </extension>
+        </webServiceImpl>
+    </extension>
    
-   <!--<extension point="org.eclipse.jst.ws.consumption.ui.wsClientImpl">
+    <!--<extension point="org.eclipse.jst.ws.consumption.ui.wsClientImpl">
       <webServiceClientImpl
             id="org.eclipse.jst.ws.cxf.client.type.java"
             label="%JAXWS_CLIENT">
       </webServiceClientImpl>
-   </extension>-->
+    </extension>-->
    
-   <extension point="org.eclipse.jst.ws.consumption.ui.objectSelectionWidget">
-      <objectSelectionWidget
+    <extension point="org.eclipse.jst.ws.consumption.ui.objectSelectionWidget">
+        <objectSelectionWidget
             class=" org.eclipse.jst.ws.internal.cxf.consumption.ui.widgets.CXFJAXWSSelectionLaunchable"
             external_modify="true"
             id=" org.eclipse.jst.ws.cxf.consumption.ui.widgets.object.CXFJAXWSSelectionWidget"
             transformer="org.eclipse.jst.ws.internal.cxf.consumption.ui.widgets.object.JAXWSSelectionTransformer">
-      </objectSelectionWidget>
-   </extension>
+        </objectSelectionWidget>
+    </extension>
    
-   <extension point="org.eclipse.wst.command.env.ui.widgetRegistry">
-       <widgetFactory
-             class="org.eclipse.jst.ws.internal.cxf.consumption.ui.widgets.WSDL2JavaClientConfigWidgetFactory"
-             id="WSDL2JavaClientConfig"
+    <extension point="org.eclipse.wst.command.env.ui.widgetRegistry">
+        <widgetFactory
+            class="org.eclipse.jst.ws.internal.cxf.consumption.ui.widgets.WSDL2JavaClientConfigWidgetFactory"
+            id="WSDL2JavaClientConfig"
              insertBeforeCommandId="org.eclipse.jst.ws.internal.cxf.consumption.core.commands.WSDL2JavaClientCommand">
-       </widgetFactory>
-   </extension>
-   
-  </plugin>
+        </widgetFactory>
+    </extension>
+
+    <!-- WSDL2Java -->
+    <extension point="org.eclipse.wst.command.env.antDataMapping">
+       <map
+             key="Mappings"
+             operation="org.eclipse.jst.ws.internal.cxf.consumption.core.commands.WSDL2JavaClientCommand"
+             property="IncludedNamespaces"
+             transform="org.eclipse.jst.ws.internal.cxf.core.env.ant.MappingsTransformer"/>
+       <map
+             key="Bindings"
+             operation="org.eclipse.jst.ws.internal.cxf.consumption.core.commands.WSDL2JavaClientCommand"
+             property="BindingFiles"
+             transform="org.eclipse.jst.ws.internal.cxf.core.env.ant.BindingsTransformer"/>
+       <map
+             key="JavaOutput"
+             operation="org.eclipse.jst.ws.internal.cxf.consumption.core.commands.WSDL2JavaClientCommand"
+             property="JavaSourceFolder"/>
+       <map
+             key="ServiceName"
+             operation="org.eclipse.jst.ws.internal.cxf.consumption.core.commands.WSDL2JavaClientCommand"
+             property="ServiceName"/>
+       <map
+             key="GenClient"
+             operation="org.eclipse.jst.ws.internal.cxf.consumption.core.commands.WSDL2JavaClientCommand"
+             property="GenerateClient"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="GenServer"
+             operation="org.eclipse.jst.ws.internal.cxf.consumption.core.commands.WSDL2JavaClientCommand"
+             property="GenerateServer"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="GenImpl"
+             operation="org.eclipse.jst.ws.internal.cxf.consumption.core.commands.WSDL2JavaClientCommand"
+             property="GenerateImplementation"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="DefaultValues"
+             operation="org.eclipse.jst.ws.internal.cxf.consumption.core.commands.WSDL2JavaClientCommand"
+             property="UseDefaultValues"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="ExtSOAPHeaders"
+             operation="org.eclipse.jst.ws.internal.cxf.consumption.core.commands.WSDL2JavaClientCommand"
+             property="ProcessSOAPHeaders"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="DefaultNamespace"
+             operation="org.eclipse.jst.ws.internal.cxf.consumption.core.commands.WSDL2JavaClientCommand"
+             property="LoadDefaultNamespacePackageNameMapping"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="DefaultExcludesNamespace"
+             operation="org.eclipse.jst.ws.internal.cxf.consumption.core.commands.WSDL2JavaClientCommand"
+             property="LoadDefaultExcludesNamepsaceMapping"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="AutoNameResolution"
+             operation="org.eclipse.jst.ws.internal.cxf.consumption.core.commands.WSDL2JavaClientCommand"
+             property="AutoNameResolution"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="xjc_dv"
+             operation="org.eclipse.jst.ws.internal.cxf.consumption.core.commands.WSDL2JavaClientCommand"
+             property="XjcUseDefaultValues"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="xjc_ts"
+             operation="org.eclipse.jst.ws.internal.cxf.consumption.core.commands.WSDL2JavaClientCommand"
+             property="XjcToString"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="xjc_ts_multi"
+             operation="org.eclipse.jst.ws.internal.cxf.consumption.core.commands.WSDL2JavaClientCommand"
+             property="XjcToStringMultiLine"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="xjc_ts_simple"
+             operation="org.eclipse.jst.ws.internal.cxf.consumption.core.commands.WSDL2JavaClientCommand"
+             property="XjcToStringSimple"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="xjc_locator"
+             operation="org.eclipse.jst.ws.internal.cxf.consumption.core.commands.WSDL2JavaClientCommand"
+             property="XjcLocator"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="xjc_sync_methods"
+             operation="org.eclipse.jst.ws.internal.cxf.consumption.core.commands.WSDL2JavaClientCommand"
+             property="XjcSyncMethods"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="xjc_mark_generated"
+             operation="org.eclipse.jst.ws.internal.cxf.consumption.core.commands.WSDL2JavaClientCommand"
+             property="XjcMarkGenerated"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+    </extension>
+  </plugin>
\ No newline at end of file
diff --git a/bundles/org.eclipse.jst.ws.cxf.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.jst.ws.cxf.core/META-INF/MANIFEST.MF
index b81dd3c..644edd5 100644
--- a/bundles/org.eclipse.jst.ws.cxf.core/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.jst.ws.cxf.core/META-INF/MANIFEST.MF
@@ -13,6 +13,7 @@
    org.eclipse.jst.ws.cxf.creation.ui,
    org.eclipse.jst.ws.cxf.consumption.core",
  org.eclipse.jst.ws.internal.cxf.core.context;x-friends:="org.eclipse.jst.ws.cxf.ui,org.eclipse.jst.ws.cxf.creation.core,org.eclipse.jst.ws.cxf.consumption.core",
+ org.eclipse.jst.ws.internal.cxf.core.env.ant;x-internal:=true,
  org.eclipse.jst.ws.internal.cxf.core.model;
   x-friends:="org.eclipse.jst.ws.cxf.consumption.ui,
    org.eclipse.jst.ws.cxf.creation.core,
diff --git a/bundles/org.eclipse.jst.ws.cxf.core/src/org/eclipse/jst/ws/internal/cxf/core/env/ant/BindingsTransformer.java b/bundles/org.eclipse.jst.ws.cxf.core/src/org/eclipse/jst/ws/internal/cxf/core/env/ant/BindingsTransformer.java
new file mode 100644
index 0000000..2c6005e
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.cxf.core/src/org/eclipse/jst/ws/internal/cxf/core/env/ant/BindingsTransformer.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Shane Clarke.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Shane Clarke - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.internal.cxf.core.env.ant;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.wst.command.internal.env.core.data.Transformer;
+
+public class BindingsTransformer implements Transformer {
+
+    public Object transform(Object value) {
+        List<String> bindingFilesList = new ArrayList<String>();
+        String[] absolutePaths = value.toString().split(",");
+        for (String absoulutePath : absolutePaths) {
+            IPath path = new Path(absoulutePath);
+            if (path.getFileExtension() != null && path.getFileExtension().equals("xml")) {
+                bindingFilesList.add(absoulutePath);
+            }
+        }
+        return bindingFilesList;
+    }
+
+}
diff --git a/bundles/org.eclipse.jst.ws.cxf.core/src/org/eclipse/jst/ws/internal/cxf/core/env/ant/MappingsTransformer.java b/bundles/org.eclipse.jst.ws.cxf.core/src/org/eclipse/jst/ws/internal/cxf/core/env/ant/MappingsTransformer.java
new file mode 100644
index 0000000..928f2e6
--- /dev/null
+++ b/bundles/org.eclipse.jst.ws.cxf.core/src/org/eclipse/jst/ws/internal/cxf/core/env/ant/MappingsTransformer.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Shane Clarke.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Shane Clarke - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jst.ws.internal.cxf.core.env.ant;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jst.ws.internal.cxf.core.CXFCorePlugin;
+import org.eclipse.wst.command.internal.env.core.data.Transformer;
+
+public class MappingsTransformer implements Transformer {
+
+    @SuppressWarnings("unchecked")
+    public Object transform(Object value) {
+        Map map = new HashMap();
+        IPath path = new Path((String)value);
+        IFile resource = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+        if (resource != null) {
+            try {
+                Properties props = new Properties();
+                props.load(resource.getContents());
+                map.putAll(props);
+            } catch (IOException ioe)  {
+                CXFCorePlugin.log(ioe);
+            } catch (CoreException ce) {
+                CXFCorePlugin.log(ce.getStatus());
+            }
+        }
+        return map;
+    }
+
+}
diff --git a/bundles/org.eclipse.jst.ws.cxf.core/src/org/eclipse/jst/ws/internal/cxf/core/utils/SpringUtils.java b/bundles/org.eclipse.jst.ws.cxf.core/src/org/eclipse/jst/ws/internal/cxf/core/utils/SpringUtils.java
index 3e841e5..620b3f1 100644
--- a/bundles/org.eclipse.jst.ws.cxf.core/src/org/eclipse/jst/ws/internal/cxf/core/utils/SpringUtils.java
+++ b/bundles/org.eclipse.jst.ws.cxf.core/src/org/eclipse/jst/ws/internal/cxf/core/utils/SpringUtils.java
@@ -51,385 +51,407 @@
 
 @SuppressWarnings("restriction")
 public final class SpringUtils {
-    private static Namespace SPRING_BEANS_NS = Namespace
-            .getNamespace("http://www.springframework.org/schema/beans"); //$NON-NLS-1$
-    private static Namespace XMLNS_XSI = Namespace.getNamespace("xsi", //$NON-NLS-1$
-            "http://www.w3.org/2001/XMLSchema-instance"); //$NON-NLS-1$
-    private static Namespace JAXWS_NS = Namespace.getNamespace("jaxws", "http://cxf.apache.org/jaxws"); //$NON-NLS-1$ //$NON-NLS-2$
-    private static Namespace SOAP_NS = Namespace.getNamespace("soap", "http://cxf.apache.org/bindings/soap"); //$NON-NLS-1$ //$NON-NLS-2$
+	private static Namespace SPRING_BEANS_NS = Namespace
+	.getNamespace("http://www.springframework.org/schema/beans"); //$NON-NLS-1$
+	private static Namespace XMLNS_XSI = Namespace.getNamespace("xsi", //$NON-NLS-1$
+	"http://www.w3.org/2001/XMLSchema-instance"); //$NON-NLS-1$
+	private static Namespace JAXWS_NS = Namespace.getNamespace("jaxws", "http://cxf.apache.org/jaxws"); //$NON-NLS-1$ //$NON-NLS-2$
+	private static Namespace SOAP_NS = Namespace.getNamespace("soap", "http://cxf.apache.org/bindings/soap"); //$NON-NLS-1$ //$NON-NLS-2$
 
-    private static String DOC_ROOT = "beans"; //$NON-NLS-1$
+	private static String DOC_ROOT = "beans"; //$NON-NLS-1$
 
-    private SpringUtils() {
-    }
+	private SpringUtils() {
+	}
 
-    public static IFile getBeansFile(IProject project) throws IOException {
-        IFile beansFile = null;
-        IPath webContentPath = J2EEUtils.getWebContentPath(project);
-        if (!webContentPath.hasTrailingSeparator()) {
-            webContentPath = webContentPath.addTrailingSeparator();
+	public static IFile getBeansFile(IProject project) throws IOException {
+		IFile beansFile = null;
+		IPath webContentPath = J2EEUtils.getWebContentPath(project);
+		if (!webContentPath.hasTrailingSeparator()) {
+			webContentPath = webContentPath.addTrailingSeparator();
 
-            IPath webINFPath = webContentPath.append(new Path("WEB-INF/")); //$NON-NLS-1$
-            IFolder webINFFolder = ResourcesPlugin.getWorkspace().getRoot().getFolder(webINFPath);
-            beansFile = webINFFolder.getFile("beans.xml"); //$NON-NLS-1$
-            if (!beansFile.exists()) {
-                try {
-                    IProgressMonitor progressMonitor = new NullProgressMonitor();
-                    beansFile.create(new ByteArrayInputStream(new byte[] {}), true, progressMonitor);
-                    createBaseBeansFile(beansFile);
-                } catch (CoreException ce) {
-                    CXFCorePlugin.log(ce);
-                }
-            }
-        }
-        return beansFile;
-    }
+			IPath webINFPath = webContentPath.append(new Path("WEB-INF/")); //$NON-NLS-1$
+			IFolder webINFFolder = ResourcesPlugin.getWorkspace().getRoot().getFolder(webINFPath);
+			beansFile = webINFFolder.getFile("beans.xml"); //$NON-NLS-1$
+			if (!beansFile.exists()) {
+				try {
+					IProgressMonitor progressMonitor = new NullProgressMonitor();
+					beansFile.create(new ByteArrayInputStream(new byte[] {}), true, progressMonitor);
+					createBaseBeansFile(beansFile);
+				} catch (CoreException ce) {
+					CXFCorePlugin.log(ce);
+				}
+			}
+		}
+		return beansFile;
+	}
 
-    public static IFile getBeansFile(String projectName) throws IOException {
-        return SpringUtils.getBeansFile(FileUtils.getProject(projectName));
-    }
+	public static IFile createHandlerFile(IProject project) throws IOException {
+		IFile handlerFile = null;
+		IPath webContentPath = J2EEUtils.getWebContentPath(project);
+		if (!webContentPath.hasTrailingSeparator()) {
+			webContentPath = webContentPath.addTrailingSeparator();
 
-    /**
-     * Returns a handle to the cxf-servlet file in the Web projects WEB-INF
-     * folder.
-     * 
-     * @param project
-     * @return {@link IFile}
-     */
-    public static IFile getCXFServlet(IProject project) throws IOException {
-        IFile cxfServlet = null;
-        IPath webContentPath = J2EEUtils.getWebContentPath(project);
-        if (!webContentPath.hasTrailingSeparator()) {
-            webContentPath = webContentPath.addTrailingSeparator();
+			IPath webINFPath = webContentPath.append(new Path("WEB-INF/")); //$NON-NLS-1$
+			IFolder webINFFolder = ResourcesPlugin.getWorkspace().getRoot().getFolder(webINFPath);
+			handlerFile = webINFFolder.getFile("handler.xml"); //$NON-NLS-1$
+			if (!handlerFile.exists()) {
+				try {
+					IProgressMonitor progressMonitor = new NullProgressMonitor();
+					handlerFile.create(new ByteArrayInputStream(new byte[] {}), true, progressMonitor);
+					createBaseBeansFile(handlerFile);
+				} catch (CoreException ce) {
+					CXFCorePlugin.log(ce);
+				}
+			}
+		}
+		return handlerFile;
+	}
 
-            IPath webINFPath = webContentPath.append(new Path("WEB-INF/")); //$NON-NLS-1$
-            IFolder webINFFolder = ResourcesPlugin.getWorkspace().getRoot().getFolder(webINFPath);
-            cxfServlet = webINFFolder.getFile("cxf-servlet.xml"); //$NON-NLS-1$
-            if (!cxfServlet.exists()) {
-                try {
-                    IProgressMonitor progressMonitor = new NullProgressMonitor();
+	public static IFile getBeansFile(String projectName) throws IOException {
+		return SpringUtils.getBeansFile(FileUtils.getProject(projectName));
+	}
 
-                    cxfServlet.create(new ByteArrayInputStream(new byte[] {}), true, progressMonitor);
-                    createBaseCXFServletFile(cxfServlet);
-                } catch (CoreException ce) {
-                    CXFCorePlugin.log(ce.getStatus());
-                }
-            }
-        }
-        return cxfServlet;
-    }
+	/**
+	 * Returns a handle to the cxf-servlet file in the Web projects WEB-INF
+	 * folder.
+	 * 
+	 * @param project
+	 * @return {@link IFile}
+	 */
+	public static IFile getCXFServlet(IProject project) throws IOException {
+		IFile cxfServlet = null;
+		IPath webContentPath = J2EEUtils.getWebContentPath(project);
+		if (!webContentPath.hasTrailingSeparator()) {
+			webContentPath = webContentPath.addTrailingSeparator();
 
-    public static IFile getCXFServlet(String projectName) throws IOException {
-        return SpringUtils.getCXFServlet(FileUtils.getProject(projectName));
-    }
+			IPath webINFPath = webContentPath.append(new Path("WEB-INF/")); //$NON-NLS-1$
+			IFolder webINFFolder = ResourcesPlugin.getWorkspace().getRoot().getFolder(webINFPath);
+			cxfServlet = webINFFolder.getFile("cxf-servlet.xml"); //$NON-NLS-1$
+			if (!cxfServlet.exists()) {
+				try {
+					IProgressMonitor progressMonitor = new NullProgressMonitor();
 
-    private static void createBaseCXFServletFile(IFile cxfServlet)  throws IOException {
-        Element beans = new Element(DOC_ROOT);
-        beans.setNamespace(SPRING_BEANS_NS);
-        beans.addNamespaceDeclaration(XMLNS_XSI);
-        beans.addNamespaceDeclaration(JAXWS_NS);
-        beans.addNamespaceDeclaration(SOAP_NS);
+					cxfServlet.create(new ByteArrayInputStream(new byte[] {}), true, progressMonitor);
+					createBaseCXFServletFile(cxfServlet);
+				} catch (CoreException ce) {
+					CXFCorePlugin.log(ce.getStatus());
+				}
+			}
+		}
+		return cxfServlet;
+	}
 
-        Attribute schemaLocation = new Attribute(
-                "schemaLocation", //$NON-NLS-1$
-                "http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd " //$NON-NLS-1$
-                        + "http://cxf.apache.org/bindings/soap http://cxf.apache.org/schemas/configuration/soap.xsd " //$NON-NLS-1$
-                        + "http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd", XMLNS_XSI); //$NON-NLS-1$
+	public static IFile getCXFServlet(String projectName) throws IOException {
+		return SpringUtils.getCXFServlet(FileUtils.getProject(projectName));
+	}
 
-        beans.setAttribute(schemaLocation);
+	private static void createBaseCXFServletFile(IFile cxfServlet)  throws IOException {
+		Element beans = new Element(DOC_ROOT);
+		beans.setNamespace(SPRING_BEANS_NS);
+		beans.addNamespaceDeclaration(XMLNS_XSI);
+		beans.addNamespaceDeclaration(JAXWS_NS);
+		beans.addNamespaceDeclaration(SOAP_NS);
 
-        writeConfig(new Document(beans), cxfServlet);
-    }
+		Attribute schemaLocation = new Attribute(
+				"schemaLocation", //$NON-NLS-1$
+				"http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd " //$NON-NLS-1$
+				+ "http://cxf.apache.org/bindings/soap http://cxf.apache.org/schemas/configuration/soap.xsd " //$NON-NLS-1$
+				+ "http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd", XMLNS_XSI); //$NON-NLS-1$
 
-    private static void createBaseBeansFile(IFile beansFile) throws IOException {
-        Element beans = new Element(DOC_ROOT);
-        beans.setNamespace(SPRING_BEANS_NS);
-        beans.addNamespaceDeclaration(XMLNS_XSI);
-        beans.addNamespaceDeclaration(JAXWS_NS);
+		beans.setAttribute(schemaLocation);
 
-        Attribute schemaLocation = new Attribute(
-                "schemaLocation", //$NON-NLS-1$
-                "http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd " //$NON-NLS-1$
-                        + "http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd", XMLNS_XSI); //$NON-NLS-1$
+		writeConfig(new Document(beans), cxfServlet);
+	}
 
-        beans.setAttribute(schemaLocation);
+	private static void createBaseBeansFile(IFile beansFile) throws IOException {
+		Element beans = new Element(DOC_ROOT);
+		beans.setNamespace(SPRING_BEANS_NS);
+		beans.addNamespaceDeclaration(XMLNS_XSI);
+		beans.addNamespaceDeclaration(JAXWS_NS);
 
-        Element importCXFResource = new Element("import", SPRING_BEANS_NS); //$NON-NLS-1$
-        importCXFResource.setAttribute("resource", "classpath:META-INF/cxf/cxf.xml"); //$NON-NLS-1$ //$NON-NLS-2$
+		Attribute schemaLocation = new Attribute(
+				"schemaLocation", //$NON-NLS-1$
+				"http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd " //$NON-NLS-1$
+				+ "http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd", XMLNS_XSI); //$NON-NLS-1$
 
-        Element importCXFSoapExtensionResource = new Element("import", SPRING_BEANS_NS); //$NON-NLS-1$
-        importCXFSoapExtensionResource.setAttribute("resource", //$NON-NLS-1$
-                "classpath:META-INF/cxf/cxf-extension-soap.xml"); //$NON-NLS-1$
+		beans.setAttribute(schemaLocation);
 
-        Element importCXFServeltResource = new Element("import", SPRING_BEANS_NS); //$NON-NLS-1$
-        importCXFServeltResource.setAttribute("resource", "classpath:META-INF/cxf/cxf-servlet.xml"); //$NON-NLS-1$ //$NON-NLS-2$
+		Element importCXFResource = new Element("import", SPRING_BEANS_NS); //$NON-NLS-1$
+		importCXFResource.setAttribute("resource", "classpath:META-INF/cxf/cxf.xml"); //$NON-NLS-1$ //$NON-NLS-2$
 
-        beans.addContent(importCXFResource);
-        beans.addContent(importCXFSoapExtensionResource);
-        beans.addContent(importCXFServeltResource);
+		Element importCXFSoapExtensionResource = new Element("import", SPRING_BEANS_NS); //$NON-NLS-1$
+		importCXFSoapExtensionResource.setAttribute("resource", //$NON-NLS-1$
+		"classpath:META-INF/cxf/cxf-extension-soap.xml"); //$NON-NLS-1$
 
-        writeConfig(new Document(beans), beansFile);
-    }
+		Element importCXFServeltResource = new Element("import", SPRING_BEANS_NS); //$NON-NLS-1$
+		importCXFServeltResource.setAttribute("resource", "classpath:META-INF/cxf/cxf-servlet.xml"); //$NON-NLS-1$ //$NON-NLS-2$
 
-    public static boolean isSpringBeansFile(IFile springBeansFile) throws IOException {
-        FileInputStream springBeansInputStream = new FileInputStream(springBeansFile.getLocation().toFile());
-        if (springBeansInputStream.available() > 0) {
-            SAXBuilder builder = new SAXBuilder();
-            try {
-                Document doc = builder.build(springBeansInputStream);
-                Element root = doc.getRootElement();
-                if (root.getName().equals(DOC_ROOT) && root.getNamespace().equals(SPRING_BEANS_NS)) {
-                    return true;
-                }
-            } catch (JDOMException jdome) {
-                CXFCorePlugin.log(jdome);
-            } finally {
-               springBeansInputStream.close();
-            }
-        }
-        return false;
-    }
+		beans.addContent(importCXFResource);
+		beans.addContent(importCXFSoapExtensionResource);
+		beans.addContent(importCXFServeltResource);
 
-    @SuppressWarnings("unchecked")
-    private static boolean isBeanDefined(CXFDataModel cxfDataModel, String projectName, String elementName,
-            Namespace namespace, String id) throws IOException {
-        IFile springConfigFile = null;
-        
-        if (CXFCorePlugin.getDefault().getJava2WSContext().isUseSpringApplicationContext()) {
-            springConfigFile = SpringUtils.getBeansFile(projectName);
-        } else {
-            springConfigFile = SpringUtils.getCXFServlet(projectName);
-        }
+		writeConfig(new Document(beans), beansFile);
+	}
 
-        if (isSpringBeansFile(springConfigFile)) {
-            SAXBuilder builder = new SAXBuilder();
-            FileInputStream springConfigInputSteam = new FileInputStream(springConfigFile.getLocation()
-                    .toFile());
-            try {
-                Document doc = builder.build(springConfigInputSteam);
-                Element beans = doc.getRootElement();
+	public static boolean isSpringBeansFile(IFile springBeansFile) throws IOException {
+		FileInputStream springBeansInputStream = new FileInputStream(springBeansFile.getLocation().toFile());
+		if (springBeansInputStream.available() > 0) {
+			SAXBuilder builder = new SAXBuilder();
+			try {
+				Document doc = builder.build(springBeansInputStream);
+				Element root = doc.getRootElement();
+				if (root.getName().equals(DOC_ROOT) && root.getNamespace().equals(SPRING_BEANS_NS)) {
+					return true;
+				}
+			} catch (JDOMException jdome) {
+				CXFCorePlugin.log(jdome);
+			} finally {
+				springBeansInputStream.close();
+			}
+		}
+		return false;
+	}
 
-                List<Element> endpoints = beans.getChildren(elementName, namespace);
-                for (Element element : endpoints) {
-                    if (element != null && element.getAttribute("id") != null) { //$NON-NLS-1$
-                        Attribute idAttribute = element.getAttribute("id"); //$NON-NLS-1$
-                        if (idAttribute.getValue().equals(id)) {
-                            return true;
-                        }
-                    }                    
-                }
-            } catch (JDOMException jdome) {
-                CXFCorePlugin.log(jdome);
-            } finally {
-               springConfigInputSteam.close();
-            }
-        }
-        return false;
-    }
-    
-    @SuppressWarnings("unchecked")
-    public static String getEndpointAddress(IProject project, String jaxwsEndpointId) throws IOException {
-        IFile springConfigFile = null;
-        if (CXFCorePlugin.getDefault().getJava2WSContext().isUseSpringApplicationContext()) {
-            springConfigFile = SpringUtils.getBeansFile(project);
-        } else {
-            springConfigFile = SpringUtils.getCXFServlet(project);
-        }
-        if (isSpringBeansFile(springConfigFile)) {
-            SAXBuilder builder = new SAXBuilder();
-            FileInputStream springConfigInputSteam = new FileInputStream(springConfigFile.getLocation()
-                    .toFile());
-            try {
-                Document doc = builder.build(springConfigInputSteam);
-                Element beans = doc.getRootElement();
-                List<Element> endpoints = beans.getChildren("endpoint", JAXWS_NS); //$NON-NLS-1$
-                for (Element element : endpoints) {
-                    if (element != null && element.getAttribute("id") != null) { //$NON-NLS-1$
-                        Attribute idAttribute = element.getAttribute("id"); //$NON-NLS-1$
-                        if (idAttribute.getValue().equals(jaxwsEndpointId)) {
-                           return element.getAttribute("address").getValue(); //$NON-NLS-1$
-                        }
-                    }                    
-                }
-            } catch (JDOMException jdome) {
-                CXFCorePlugin.log(jdome);
-            } finally {
-                springConfigInputSteam.close();
-            }
-        }
-        return ""; //$NON-NLS-1$
-    }
+	@SuppressWarnings("unchecked")
+	private static boolean isBeanDefined(CXFDataModel cxfDataModel, String projectName, String elementName,
+			Namespace namespace, String id) throws IOException {
+		IFile springConfigFile = null;
 
-    @SuppressWarnings("unchecked")
-    public static void createConfigurationFromWSDL(WSDL2JavaDataModel model) throws IOException {
-        String targetNamespace = model.getTargetNamespace();
-        String packageName = model.getIncludedNamespaces().get(targetNamespace);
+		if (CXFCorePlugin.getDefault().getJava2WSContext().isUseSpringApplicationContext()) {
+			springConfigFile = SpringUtils.getBeansFile(projectName);
+		} else {
+			springConfigFile = SpringUtils.getCXFServlet(projectName);
+		}
 
-        Definition definition = model.getWsdlDefinition();
-        Map servicesMap = definition.getServices();
-        Set<Map.Entry> servicesSet = servicesMap.entrySet();
-        for (Map.Entry serviceEntry : servicesSet) {
-            Service service = (Service) serviceEntry.getValue();
-            model.setServiceName(service.getQName().getLocalPart());
-            Map portsMap = service.getPorts();
-            Set<Map.Entry> portsSet = portsMap.entrySet();
-            for (Map.Entry portEntry : portsSet) {
-                Port port = (Port) portEntry.getValue();
-                model.setEndpointName(port.getName());
-                PortType portType = port.getBinding().getPortType();
-                QName qName = portType.getQName();
-                String portTypeName = qName.getLocalPart();
-                String fullyQualifiedClassName = packageName + "." + //$NON-NLS-1$
-                	convertPortTypeName(portTypeName) + "Impl"; //$NON-NLS-1$
-                model.setFullyQualifiedJavaClassName(fullyQualifiedClassName);
-                SpringUtils.createJAXWSEndpoint(model);
-             }
-         }
-    }
+		if (isSpringBeansFile(springConfigFile)) {
+			SAXBuilder builder = new SAXBuilder();
+			FileInputStream springConfigInputSteam = new FileInputStream(springConfigFile.getLocation()
+					.toFile());
+			try {
+				Document doc = builder.build(springConfigInputSteam);
+				Element beans = doc.getRootElement();
 
-    @SuppressWarnings("unchecked")
-    public static void loadSpringConfigInformationFromWSDL(CXFDataModel model) {
-        IFile wsdlFile = WSDLUtils.getWSDLFolder(model.getProjectName()).getFile(model.getWsdlFileName());
-        if (wsdlFile.exists()) {
-            try {
-                model.setWsdlURL(wsdlFile.getLocationURI().toURL());
-                Definition definition = WSDLUtils.readWSDL(model.getWsdlURL());
-                Map servicesMap = definition.getServices();
-                Set<Map.Entry> servicesSet = servicesMap.entrySet();
-                for (Map.Entry serviceEntry : servicesSet) {
-                    Service service = (Service) serviceEntry.getValue();
-                    model.setServiceName(service.getQName().getLocalPart());
-                    Map portsMap = service.getPorts();
-                    Set<Map.Entry> portsSet = portsMap.entrySet();
-                    for (Map.Entry portEntry : portsSet) {
-                        Port port = (Port) portEntry.getValue();
-                        model.setEndpointName(port.getName());
-                     }
-                }
-                model.setWsdlDefinition(definition);
-            } catch (MalformedURLException murle) {
-               CXFCorePlugin.log(murle);
-            } catch (IOException ioe) {
-                CXFCorePlugin.log(ioe);
-            }
-        }
-    }
+				List<Element> endpoints = beans.getChildren(elementName, namespace);
+				for (Element element : endpoints) {
+					if (element != null && element.getAttribute("id") != null) { //$NON-NLS-1$
+						Attribute idAttribute = element.getAttribute("id"); //$NON-NLS-1$
+						if (idAttribute.getValue().equals(id)) {
+							return true;
+						}
+					}
+				}
+			} catch (JDOMException jdome) {
+				CXFCorePlugin.log(jdome);
+			} finally {
+				springConfigInputSteam.close();
+			}
+		}
+		return false;
+	}
 
-    private static String convertPortTypeName(String portTypeName) {
-        String[] segments = portTypeName.split("[\\-\\.\\:\\_\\u00b7\\u0387\\u06dd\\u06de]");
+	@SuppressWarnings("unchecked")
+	public static String getEndpointAddress(IProject project, String jaxwsEndpointId) throws IOException {
+		IFile springConfigFile = null;
+		if (CXFCorePlugin.getDefault().getJava2WSContext().isUseSpringApplicationContext()) {
+			springConfigFile = SpringUtils.getBeansFile(project);
+		} else {
+			springConfigFile = SpringUtils.getCXFServlet(project);
+		}
+		if (isSpringBeansFile(springConfigFile)) {
+			SAXBuilder builder = new SAXBuilder();
+			FileInputStream springConfigInputSteam = new FileInputStream(springConfigFile.getLocation()
+					.toFile());
+			try {
+				Document doc = builder.build(springConfigInputSteam);
+				Element beans = doc.getRootElement();
+				List<Element> endpoints = beans.getChildren("endpoint", JAXWS_NS); //$NON-NLS-1$
+				for (Element element : endpoints) {
+					if (element != null && element.getAttribute("id") != null) { //$NON-NLS-1$
+						Attribute idAttribute = element.getAttribute("id"); //$NON-NLS-1$
+						if (idAttribute.getValue().equals(jaxwsEndpointId)) {
+							return element.getAttribute("address").getValue(); //$NON-NLS-1$
+						}
+					}
+				}
+			} catch (JDOMException jdome) {
+				CXFCorePlugin.log(jdome);
+			} finally {
+				springConfigInputSteam.close();
+			}
+		}
+		return ""; //$NON-NLS-1$
+	}
 
-        StringBuilder stringBuilder = new StringBuilder();
-        for (String segment : segments) {
-            if (segment.length() == 0) {
-                continue;
-            }
-            char firstCharacter = segment.charAt(0);
-            if (!Character.isDigit(firstCharacter) && Character.isLowerCase(firstCharacter)) {
-                segment = segment.substring(0, 1).toUpperCase() + segment.substring(1);
-            }
+	@SuppressWarnings("unchecked")
+	public static void createConfigurationFromWSDL(WSDL2JavaDataModel model) throws IOException {
+		String targetNamespace = model.getTargetNamespace();
+		String packageName = model.getIncludedNamespaces().get(targetNamespace);
 
-            for (int i = 1; i < segment.length(); i++) {
-                char currentChar = segment.charAt(i);
-                char precedingChar = segment.charAt(i - 1);
-                if (Character.isLetter(currentChar) && Character.isDigit(precedingChar)
-                        && Character.isLowerCase(currentChar)) {
-                    segment = segment.substring(0, i) + segment.substring(i, i + 1).toUpperCase()
-                            + segment.substring(i + 1, segment.length());
-                }
-            }
-            stringBuilder.append(segment);
-        }
-        return stringBuilder.toString();
-    }
+		Definition definition = model.getWsdlDefinition();
+		Map servicesMap = definition.getServices();
+		Set<Map.Entry> servicesSet = servicesMap.entrySet();
+		for (Map.Entry serviceEntry : servicesSet) {
+			Service service = (Service) serviceEntry.getValue();
+			model.setServiceName(service.getQName().getLocalPart());
+			Map portsMap = service.getPorts();
+			Set<Map.Entry> portsSet = portsMap.entrySet();
+			for (Map.Entry portEntry : portsSet) {
+				Port port = (Port) portEntry.getValue();
+				model.setEndpointName(port.getName());
+				PortType portType = port.getBinding().getPortType();
+				QName qName = portType.getQName();
+				String portTypeName = qName.getLocalPart();
+				String fullyQualifiedClassName = packageName + "." + //$NON-NLS-1$
+				convertPortTypeName(portTypeName) + "Impl"; //$NON-NLS-1$
+				model.setFullyQualifiedJavaClassName(fullyQualifiedClassName);
+				SpringUtils.createJAXWSEndpoint(model);
+			}
+		}
+	}
 
-    public static void createJAXWSEndpoint(CXFDataModel model) throws IOException {
-        String projectName = model.getProjectName();
+	@SuppressWarnings("unchecked")
+	public static void loadSpringConfigInformationFromWSDL(CXFDataModel model) {
+		IFile wsdlFile = WSDLUtils.getWSDLFolder(model.getProjectName()).getFile(model.getWsdlFileName());
+		if (wsdlFile.exists()) {
+			try {
+				model.setWsdlURL(wsdlFile.getLocationURI().toURL());
+				Definition definition = WSDLUtils.readWSDL(model.getWsdlURL());
+				Map servicesMap = definition.getServices();
+				Set<Map.Entry> servicesSet = servicesMap.entrySet();
+				for (Map.Entry serviceEntry : servicesSet) {
+					Service service = (Service) serviceEntry.getValue();
+					model.setServiceName(service.getQName().getLocalPart());
+					Map portsMap = service.getPorts();
+					Set<Map.Entry> portsSet = portsMap.entrySet();
+					for (Map.Entry portEntry : portsSet) {
+						Port port = (Port) portEntry.getValue();
+						model.setEndpointName(port.getName());
+					}
+				}
+				model.setWsdlDefinition(definition);
+			} catch (MalformedURLException murle) {
+				CXFCorePlugin.log(murle);
+			} catch (IOException ioe) {
+				CXFCorePlugin.log(ioe);
+			}
+		}
+	}
 
-        IFile springConfigFile = null;
-        if (CXFCorePlugin.getDefault().getJava2WSContext().isUseSpringApplicationContext()) {
-            springConfigFile = SpringUtils.getBeansFile(projectName);
-        } else {
-            springConfigFile = SpringUtils.getCXFServlet(projectName);
-        }
+	private static String convertPortTypeName(String portTypeName) {
+		String[] segments = portTypeName.split("[\\-\\.\\:\\_\\u00b7\\u0387\\u06dd\\u06de]");
 
-        if (isSpringBeansFile(springConfigFile)) {
-            SAXBuilder builder = new SAXBuilder();
-            FileInputStream springConfigInputSteam = new FileInputStream(springConfigFile.getLocation()
-                    .toFile());
-            try {
-                Document doc = builder.build(springConfigInputSteam);
-                Element beans = doc.getRootElement();
+		StringBuilder stringBuilder = new StringBuilder();
+		for (String segment : segments) {
+			if (segment.length() == 0) {
+				continue;
+			}
+			char firstCharacter = segment.charAt(0);
+			if (!Character.isDigit(firstCharacter) && Character.isLowerCase(firstCharacter)) {
+				segment = segment.substring(0, 1).toUpperCase() + segment.substring(1);
+			}
 
-                Element jaxwsEndpoint = new Element("endpoint", JAXWS_NS); //$NON-NLS-1$
+			for (int i = 1; i < segment.length(); i++) {
+				char currentChar = segment.charAt(i);
+				char precedingChar = segment.charAt(i - 1);
+				if (Character.isLetter(currentChar) && Character.isDigit(precedingChar)
+						&& Character.isLowerCase(currentChar)) {
+					segment = segment.substring(0, i) + segment.substring(i, i + 1).toUpperCase()
+					+ segment.substring(i + 1, segment.length());
+				}
+			}
+			stringBuilder.append(segment);
+		}
+		return stringBuilder.toString();
+	}
 
-                String id = getJAXWSEndpointID(model);
-                model.setConfigId(id);
-                jaxwsEndpoint.setAttribute("id", id); //$NON-NLS-1$
+	public static void createJAXWSEndpoint(CXFDataModel model) throws IOException {
+		String projectName = model.getProjectName();
 
-                jaxwsEndpoint.setAttribute("implementor", model.getFullyQualifiedJavaClassName()); //$NON-NLS-1$
+		IFile springConfigFile = null;
+		if (CXFCorePlugin.getDefault().getJava2WSContext().isUseSpringApplicationContext()) {
+			springConfigFile = SpringUtils.getBeansFile(projectName);
+		} else {
+			springConfigFile = SpringUtils.getCXFServlet(projectName);
+		}
 
-                if (model.getConfigWsdlLocation() != null) {
-                    jaxwsEndpoint.setAttribute("wsdlLocation", model.getConfigWsdlLocation()); //$NON-NLS-1$
-                    
-                    if (model.getEndpointName() != null && model.getServiceName() != null) {
-                        jaxwsEndpoint.setAttribute("endpointName", "tns:" + model.getEndpointName()); //$NON-NLS-1$ //$NON-NLS-2$
-                        jaxwsEndpoint.setAttribute("serviceName", "tns:" + model.getServiceName()); //$NON-NLS-1$ //$NON-NLS-2$
-                    
-                        Namespace XMLNS_TNS = Namespace.getNamespace("tns", model.getTargetNamespace()); //$NON-NLS-1$
-                        jaxwsEndpoint.addNamespaceDeclaration(XMLNS_TNS);
-                    }
-                }
-                
-                if (model.getEndpointName() != null) {
-                    jaxwsEndpoint.setAttribute("address", "/" + model.getEndpointName()); //$NON-NLS-1$ //$NON-NLS-2$
-                } else {
-                    jaxwsEndpoint.setAttribute("address", "/" + id); //$NON-NLS-1$ //$NON-NLS-2$
-                }
-                
+		if (isSpringBeansFile(springConfigFile)) {
+			SAXBuilder builder = new SAXBuilder();
+			FileInputStream springConfigInputSteam = new FileInputStream(springConfigFile.getLocation()
+					.toFile());
+			try {
+				Document doc = builder.build(springConfigInputSteam);
+				Element beans = doc.getRootElement();
 
-                Element jaxwsFeatures = new Element("features", JAXWS_NS); //$NON-NLS-1$
-                Element bean = new Element("bean", SPRING_BEANS_NS); //$NON-NLS-1$
-                bean.setAttribute("class", "org.apache.cxf.feature.LoggingFeature"); //$NON-NLS-1$ //$NON-NLS-2$
-                jaxwsFeatures.addContent(bean);
-                jaxwsEndpoint.addContent(jaxwsFeatures);
+				Element jaxwsEndpoint = new Element("endpoint", JAXWS_NS); //$NON-NLS-1$
 
-                if (!isBeanDefined(model, projectName, "endpoint", JAXWS_NS, id)) { //$NON-NLS-1$
-                    beans.addContent(jaxwsEndpoint);
+				String id = getJAXWSEndpointID(model);
+				model.setConfigId(id);
+				jaxwsEndpoint.setAttribute("id", id); //$NON-NLS-1$
 
-                    writeConfig(doc, springConfigFile);
-                }
-            } catch (JDOMException jdome) {
-                CXFCorePlugin.log(jdome);
-            } finally {
-                springConfigInputSteam.close();
-            }
-        }
-    }
+				jaxwsEndpoint.setAttribute("implementor", model.getFullyQualifiedJavaClassName()); //$NON-NLS-1$
 
-    private static String getJAXWSEndpointID(CXFDataModel model) {
-        String implementor = model.getFullyQualifiedJavaClassName();
-        if (implementor.indexOf(".") != -1) { //$NON-NLS-1$
-            implementor = implementor.substring(implementor.lastIndexOf(".") + 1, implementor.length());
-        }
-        if (!implementor.startsWith("Impl") && implementor.indexOf("Impl") != -1) {
-            implementor = implementor.substring(0, implementor.indexOf("Impl")).toLowerCase(); //$NON-NLS-1$;
-        } else {
-            implementor = implementor.toLowerCase();
-        }
-        return implementor;
-    }
-    
-    private static void writeConfig(Document document, IFile springConfigFile) throws IOException {
-        OutputStream outputStream = new FileOutputStream(springConfigFile.getLocation().toFile());
-        try {
-            XMLOutputter outputter = new XMLOutputter();
-            outputter.output(document, outputStream);
-            springConfigFile.refreshLocal(IResource.DEPTH_ONE, new NullProgressMonitor());
-            FileUtils.formatXMLFile(springConfigFile);
-        } catch (CoreException ce) {
-            CXFCorePlugin.log(ce.getStatus());
-        } finally {
-            outputStream.close(); 
-        }
-    }
+				if (model.getConfigWsdlLocation() != null) {
+					jaxwsEndpoint.setAttribute("wsdlLocation", model.getConfigWsdlLocation()); //$NON-NLS-1$
+
+					if (model.getEndpointName() != null && model.getServiceName() != null) {
+						jaxwsEndpoint.setAttribute("endpointName", "tns:" + model.getEndpointName()); //$NON-NLS-1$ //$NON-NLS-2$
+						jaxwsEndpoint.setAttribute("serviceName", "tns:" + model.getServiceName()); //$NON-NLS-1$ //$NON-NLS-2$
+
+						Namespace XMLNS_TNS = Namespace.getNamespace("tns", model.getTargetNamespace()); //$NON-NLS-1$
+						jaxwsEndpoint.addNamespaceDeclaration(XMLNS_TNS);
+					}
+				}
+
+				if (model.getEndpointName() != null) {
+					jaxwsEndpoint.setAttribute("address", "/" + model.getEndpointName()); //$NON-NLS-1$ //$NON-NLS-2$
+				} else {
+					jaxwsEndpoint.setAttribute("address", "/" + id); //$NON-NLS-1$ //$NON-NLS-2$
+				}
+
+
+				Element jaxwsFeatures = new Element("features", JAXWS_NS); //$NON-NLS-1$
+				Element bean = new Element("bean", SPRING_BEANS_NS); //$NON-NLS-1$
+				bean.setAttribute("class", "org.apache.cxf.feature.LoggingFeature"); //$NON-NLS-1$ //$NON-NLS-2$
+				jaxwsFeatures.addContent(bean);
+				jaxwsEndpoint.addContent(jaxwsFeatures);
+
+				if (!isBeanDefined(model, projectName, "endpoint", JAXWS_NS, id)) { //$NON-NLS-1$
+					beans.addContent(jaxwsEndpoint);
+
+					writeConfig(doc, springConfigFile);
+				}
+			} catch (JDOMException jdome) {
+				CXFCorePlugin.log(jdome);
+			} finally {
+				springConfigInputSteam.close();
+			}
+		}
+	}
+
+	private static String getJAXWSEndpointID(CXFDataModel model) {
+		String implementor = model.getFullyQualifiedJavaClassName();
+		if (implementor.indexOf(".") != -1) { //$NON-NLS-1$
+			implementor = implementor.substring(implementor.lastIndexOf(".") + 1, implementor.length());
+		}
+		if (!implementor.startsWith("Impl") && implementor.indexOf("Impl") != -1) {
+			implementor = implementor.substring(0, implementor.indexOf("Impl")).toLowerCase(); //$NON-NLS-1$;
+		} else {
+			implementor = implementor.toLowerCase();
+		}
+		return implementor;
+	}
+
+	private static void writeConfig(Document document, IFile springConfigFile) throws IOException {
+		OutputStream outputStream = new FileOutputStream(springConfigFile.getLocation().toFile());
+		try {
+			XMLOutputter outputter = new XMLOutputter();
+			outputter.output(document, outputStream);
+			springConfigFile.refreshLocal(IResource.DEPTH_ONE, new NullProgressMonitor());
+			FileUtils.formatXMLFile(springConfigFile);
+		} catch (CoreException ce) {
+			CXFCorePlugin.log(ce.getStatus());
+		} finally {
+			outputStream.close();
+		}
+	}
 }
diff --git a/bundles/org.eclipse.jst.ws.cxf.creation.core/src/org/eclipse/jst/ws/internal/cxf/creation/core/commands/Java2WSCommand.java b/bundles/org.eclipse.jst.ws.cxf.creation.core/src/org/eclipse/jst/ws/internal/cxf/creation/core/commands/Java2WSCommand.java
index 396bb79..16967cc 100644
--- a/bundles/org.eclipse.jst.ws.cxf.creation.core/src/org/eclipse/jst/ws/internal/cxf/creation/core/commands/Java2WSCommand.java
+++ b/bundles/org.eclipse.jst.ws.cxf.creation.core/src/org/eclipse/jst/ws/internal/cxf/creation/core/commands/Java2WSCommand.java
@@ -91,7 +91,7 @@
             FileUtils.copyJ2WFilesFromTmp(model);
 
             if (model.isGenerateWSDL()) {
-            	SpringUtils.loadSpringConfigInformationFromWSDL((model));
+                SpringUtils.loadSpringConfigInformationFromWSDL((model));
             }
 
             if (isImplementationSelected() || isGenerateServer()) {
@@ -113,18 +113,18 @@
         return status;
     }
 
-	private boolean isImplementationSelected() {
+    private boolean isImplementationSelected() {
         return (model.getFullyQualifiedJavaClassName() != null &&
                 model.getFullyQualifiedJavaClassName().trim().length() > 0);
     }
 
     private boolean isGenerateServer() {
-		if (model.isGenerateServer()) {
-			model.setFullyQualifiedJavaClassName(model.getFullyQualifiedJavaInterfaceName() + "Impl");
-			return true;
-		}
-		return false;
-	}
+        if (model.isGenerateServer()) {
+            model.setFullyQualifiedJavaClassName(model.getFullyQualifiedJavaInterfaceName() + "Impl");
+            return true;
+        }
+        return false;
+    }
 
     @Override
     public IStatus undo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
@@ -155,4 +155,33 @@
     public CXFDataModel getCXFDataModel() {
         return model;
     }
-}
+
+    //ANT Environment Mappings
+    public void setGenerateClient(Boolean generateClient) {
+        model.setGenerateClient(generateClient);
+    }
+
+    public void setGenerateServer(Boolean generateServer) {
+        model.setGenerateServer(generateServer);
+    }
+
+    public void setGenerateWrapperFaultBeans(Boolean generateWrapperFaultBeans) {
+        model.setGenerateWrapperFaultBeans(true);
+    }
+
+    public void setGenerateWSDL(Boolean generateWSDL) {
+        model.setGenerateWSDL(generateWSDL);
+    }
+
+    public void setWsdlFileName(String wsdlFileName) {
+        model.setWsdlFileName(wsdlFileName);
+    }
+
+    public void setGenerateXSDImports(Boolean generateXSDImports) {
+        model.setGenerateXSDImports(generateXSDImports);
+    }
+
+    public void setUseSOAP12Binding(Boolean useSOAP12Binding) {
+        model.setSoap12Binding(useSOAP12Binding);
+    }
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.jst.ws.cxf.creation.core/src/org/eclipse/jst/ws/internal/cxf/creation/core/commands/WSDL2JavaCommand.java b/bundles/org.eclipse.jst.ws.cxf.creation.core/src/org/eclipse/jst/ws/internal/cxf/creation/core/commands/WSDL2JavaCommand.java
index 38f9da5..e3444f0 100644
--- a/bundles/org.eclipse.jst.ws.cxf.creation.core/src/org/eclipse/jst/ws/internal/cxf/creation/core/commands/WSDL2JavaCommand.java
+++ b/bundles/org.eclipse.jst.ws.cxf.creation.core/src/org/eclipse/jst/ws/internal/cxf/creation/core/commands/WSDL2JavaCommand.java
@@ -13,6 +13,7 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.resources.IResource;
@@ -122,4 +123,79 @@
         return model;
     }
 
-}
+    //ANT Environment Mappings
+    public void setJavaSourceFolder(String javaSourceFolder) {
+        model.setJavaSourceFolder(javaSourceFolder);
+    }
+
+    public void setServiceName(String serviceName) {
+        model.setServiceName(serviceName);
+    }
+
+    public void setGenerateServer(boolean generateServer) {
+        model.setGenerateServer(generateServer);
+    }
+
+    public void setGenerateImplementation(boolean generateImplementation) {
+        model.setGenerateImplementation(generateImplementation);
+    }
+
+    public void setUseDefaultValues(boolean useDefaultValues) {
+        model.setUseDefaultValues(useDefaultValues);
+    }
+
+    public void setProcessSOAPHeaders(boolean processSOAPHeaders) {
+        model.setProcessSOAPHeaders(processSOAPHeaders);
+    }
+
+    public void setLoadDefaultNamespacePackageNameMapping(boolean loadDefaultNamespacePackageNameMapping) {
+        model.setLoadDefaultNamespacePackageNameMapping(loadDefaultNamespacePackageNameMapping);
+    }
+
+    public void setLoadDefaultExcludesNamepsaceMapping(boolean loadDefaultExcludesNamepsaceMapping) {
+        model.setLoadDefaultExcludesNamepsaceMapping(loadDefaultExcludesNamepsaceMapping);
+    }
+
+    public void setAutoNameResolution(boolean autoNameResolution) {
+        model.setAutoNameResolution(autoNameResolution);
+    }
+
+    public void setXjcUseDefaultValues(boolean xjcUseDefaultValues) {
+        model.setXjcUseDefaultValues(xjcUseDefaultValues);
+    }
+
+    public void setXjcToString(boolean xjcToString) {
+        model.setXjcToStringSimple(xjcToString);
+    }
+
+    public void setXjcToStringSimple(boolean xjcToStringSimple) {
+        model.setXjcToStringSimple(xjcToStringSimple);
+    }
+
+    public void setXjcToStringMultiLine(boolean xjcToStringMultiLine) {
+        model.setXjcToStringMultiLine(xjcToStringMultiLine);
+    }
+
+    public void setXjcLocator(boolean xjcLocator) {
+        model.setXjcLocator(xjcLocator);
+    }
+
+    public void setXjcSyncMethods(boolean xjcSyncMethods) {
+        model.setXjcSyncMethods(xjcSyncMethods);
+    }
+
+    public void setXjcMarkGenerated(boolean xjcMarkGenerated) {
+        model.setXjcMarkGenerated(xjcMarkGenerated);
+    }
+
+    @SuppressWarnings("unchecked")
+    public void setIncludedNamespaces(Map value) {
+        model.setIncludedNamespaces(value);
+    }
+
+    public void setBindingFiles(List<String> bindingFiles) {
+        for (String path : bindingFiles) {
+            model.getBindingFiles().add(path);
+        }
+    }
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.jst.ws.cxf.creation.core/src/org/eclipse/jst/ws/internal/cxf/creation/core/commands/WSDL2JavaProjectSelectionCommand.java b/bundles/org.eclipse.jst.ws.cxf.creation.core/src/org/eclipse/jst/ws/internal/cxf/creation/core/commands/WSDL2JavaProjectSelectionCommand.java
index dfd8f62..a2a0c44 100644
--- a/bundles/org.eclipse.jst.ws.cxf.creation.core/src/org/eclipse/jst/ws/internal/cxf/creation/core/commands/WSDL2JavaProjectSelectionCommand.java
+++ b/bundles/org.eclipse.jst.ws.cxf.creation.core/src/org/eclipse/jst/ws/internal/cxf/creation/core/commands/WSDL2JavaProjectSelectionCommand.java
@@ -29,85 +29,85 @@
  *
  */
 public class WSDL2JavaProjectSelectionCommand extends AbstractDataModelOperation {
-	private WSDL2JavaDataModel model;
-	private IProject initialProject;
-	private IProject serverProject;
-	private IProject currentProject;
+    private WSDL2JavaDataModel model;
+    private IProject initialProject;
+    private IProject serverProject;
+    private IProject currentProject;
 
-	public WSDL2JavaProjectSelectionCommand(WSDL2JavaDataModel model) {
-		this.model = model;
-	}
+    public WSDL2JavaProjectSelectionCommand(WSDL2JavaDataModel model) {
+        this.model = model;
+    }
 
-	@Override
-	public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-		IStatus status = Status.OK_STATUS;
+    @Override
+    public IStatus execute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+        IStatus status = Status.OK_STATUS;
 
-		if (currentProject == null && initialProject == null && serverProject != null) {
-			status = Status.OK_STATUS;
-			model.setProjectName(serverProject.getName());
-			return status;
-		}
+        if (currentProject == null && initialProject == null && serverProject != null) {
+            status = Status.OK_STATUS;
+            model.setProjectName(serverProject.getName());
+            return status;
+        }
 
-		if (currentProject == null && initialProject != null && !initialProject.equals(serverProject)) {
-			status = new Status(IStatus.WARNING, CXFCorePlugin.PLUGIN_ID, CXFCreationCoreMessages.bind(
-					CXFCreationCoreMessages.WSDL2JAVA_PROJECT_SELECTION_ERROR, new Object[]{
-							serverProject.getName(), initialProject.getName()}));
-		} else if (initialProject == null && currentProject != null && !currentProject.equals(serverProject)) {
+        if (currentProject == null && initialProject != null && !initialProject.equals(serverProject)) {
+            status = new Status(IStatus.WARNING, CXFCorePlugin.PLUGIN_ID, CXFCreationCoreMessages.bind(
+                    CXFCreationCoreMessages.WSDL2JAVA_PROJECT_SELECTION_ERROR, new Object[]{
+                            serverProject.getName(), initialProject.getName()}));
+        } else if (initialProject == null && currentProject != null && !currentProject.equals(serverProject)) {
             status = new Status(IStatus.WARNING, CXFCorePlugin.PLUGIN_ID, CXFCreationCoreMessages.bind(
                     CXFCreationCoreMessages.WSDL2JAVA_PROJECT_SELECTION_ERROR, new Object[]{
                             serverProject.getName(), currentProject.getName()}));
-		} else if (initialProject != null && currentProject != null && !currentProject.equals(serverProject)) {
+        } else if (initialProject != null && currentProject != null && !currentProject.equals(serverProject)) {
             status = new Status(IStatus.WARNING, CXFCorePlugin.PLUGIN_ID, CXFCreationCoreMessages.bind(
                     CXFCreationCoreMessages.WSDL2JAVA_PROJECT_SELECTION_ERROR, new Object[]{
                             serverProject.getName(), currentProject.getName()}));
-		} else {
-		    if (serverProject != null && serverProject.getProject() != null) {
-	            model.setProjectName(serverProject.getProject().getName());
-	            status = Status.OK_STATUS;
-		    }
-		}
+        } else {
+            if (serverProject != null && serverProject.getProject() != null) {
+                model.setProjectName(serverProject.getProject().getName());
+                status = Status.OK_STATUS;
+            }
+        }
 
-		if (!status.isOK()) {
-			try {
-				getEnvironment().getStatusHandler().report(status);
-			} catch (StatusException e) {
-				return new Status(IStatus.ERROR, CXFCorePlugin.PLUGIN_ID, 0, "", null);
-			}
-		}
-		return status;
-	}
+        if (!status.isOK()) {
+            try {
+                getEnvironment().getStatusHandler().report(status);
+            } catch (StatusException e) {
+                return new Status(IStatus.ERROR, CXFCorePlugin.PLUGIN_ID, 0, "", null);
+            }
+        }
+        return status;
+    }
 
-	/*
-	 * The value to test against. Make sure the "Service Project"
-	 * and the project that contains the wsdl file match.
-	 */
-	public void setServerProject(IProject serverProject) {
-		this.serverProject = serverProject;
-	}
+    /*
+     * The value to test against. Make sure the "Service Project"
+     * and the project that contains the wsdl file match.
+     */
+    public void setServerProject(IProject serverProject) {
+        this.serverProject = serverProject;
+    }
 
-	/*
-	 *
-	 * The initial project will be null when there's nothing selected in the project explorer
-	 * This forces the user to make a selection thus setting the project current project
-	 * below.
-	 *
-	 * If there was an initial selection and the user changes from one top down service
-	 * type to another then we had to check.
-	 */
-	public void setInitialProject(IProject project) {
-		this.initialProject = project;
-	}
+    /*
+     *
+     * The initial project will be null when there's nothing selected in the project explorer
+     * This forces the user to make a selection thus setting the current project
+     * below.
+     *
+     * If there was an initial selection and the user changes from one top down service
+     * type to another then we had to check.
+     */
+    public void setInitialProject(IProject project) {
+        this.initialProject = project;
+    }
 
-	/*
-	 * If there was an initial selection in the project explorer the above value is set and
-	 * this is set to null.
-	 *
-	 * This will change however if the user modifies the text field or browses for a
-	 * wsdl file. Upon selecting a file in a valid location, this value gets set.
-	 * No problem in that situation.
-	 */
-	public void setProject(IProject project) {
-	    this.currentProject = project;
+    /*
+     * If there was an initial selection in the project explorer the above value is set and
+     * this is set to null.
+     *
+     * This will change however if the user modifies the text field or browses for a
+     * wsdl file. Upon selecting a file in a valid location, this value gets set.
+     * No problem in that situation.
+     */
+    public void setProject(IProject project) {
+        this.currentProject = project;
     }
 
 }
diff --git a/bundles/org.eclipse.jst.ws.cxf.creation.ui/plugin.xml b/bundles/org.eclipse.jst.ws.cxf.creation.ui/plugin.xml
index 6210526..b47e67b 100644
--- a/bundles/org.eclipse.jst.ws.cxf.creation.ui/plugin.xml
+++ b/bundles/org.eclipse.jst.ws.cxf.creation.ui/plugin.xml
@@ -77,5 +77,135 @@
              insertBeforeCommandId="org.eclipse.jst.ws.internal.cxf.creation.core.commands.WSDL2JavaCommand">
        </widgetFactory>
     </extension>
-   
- </plugin>
+    
+    <!-- JAVA2WS -->
+    <extension point="org.eclipse.wst.command.env.antDataMapping">
+       <map
+             key="GenClient"
+             operation="org.eclipse.jst.ws.internal.cxf.creation.core.commands.Java2WSCommand"
+             property="GenerateClient"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="GenServer"
+             operation="org.eclipse.jst.ws.internal.cxf.creation.core.commands.Java2WSCommand"
+             property="GenerateServer"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="GenWrapperFaultBeans"
+             operation="org.eclipse.jst.ws.internal.cxf.creation.core.commands.Java2WSCommand"
+             property="GenerateWrapperFaultBeans"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="GenWSDL"
+             operation="org.eclipse.jst.ws.internal.cxf.creation.core.commands.Java2WSCommand"
+             property="GenerateWSDL"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="WsdlFileName"
+             operation="org.eclipse.jst.ws.internal.cxf.creation.core.commands.Java2WSCommand"
+             property="WsdlFileName"/>
+       <map
+             key="GenXSDImports"
+             operation="org.eclipse.jst.ws.internal.cxf.creation.core.commands.Java2WSCommand"
+             property="GenerateXSDImports"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="UseSOAP12Binding"
+             operation="org.eclipse.jst.ws.internal.cxf.creation.core.commands.Java2WSCommand"
+             property="UseSOAP12Binding"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+    </extension>
+
+    <!-- WSDL2Java -->
+    <extension point="org.eclipse.wst.command.env.antDataMapping">
+       <map
+             key="Mappings"
+             operation="org.eclipse.jst.ws.internal.cxf.creation.core.commands.WSDL2JavaCommand"
+             property="IncludedNamespaces"
+             transform="org.eclipse.jst.ws.internal.cxf.core.env.ant.MappingsTransformer"/>
+       <map
+             key="Bindings"
+             operation="org.eclipse.jst.ws.internal.cxf.creation.core.commands.WSDL2JavaCommand"
+             property="BindingFiles"
+             transform="org.eclipse.jst.ws.internal.cxf.core.env.ant.BindingsTransformer"/>
+       <map
+             key="JavaOutput"
+             operation="org.eclipse.jst.ws.internal.cxf.creation.core.commands.WSDL2JavaCommand"
+             property="JavaSourceFolder"/>
+       <map
+             key="ServiceName"
+             operation="org.eclipse.jst.ws.internal.cxf.creation.core.commands.WSDL2JavaCommand"
+             property="ServiceName"/>
+       <map
+             key="GenServer"
+             operation="org.eclipse.jst.ws.internal.cxf.creation.core.commands.WSDL2JavaCommand"
+             property="GenerateServer"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="GenImpl"
+             operation="org.eclipse.jst.ws.internal.cxf.creation.core.commands.WSDL2JavaCommand"
+             property="GenerateImplementation"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="DefaultValues"
+             operation="org.eclipse.jst.ws.internal.cxf.creation.core.commands.WSDL2JavaCommand"
+             property="UseDefaultValues"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="ExtSOAPHeaders"
+             operation="org.eclipse.jst.ws.internal.cxf.creation.core.commands.WSDL2JavaCommand"
+             property="ProcessSOAPHeaders"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="DefaultNamespace"
+             operation="org.eclipse.jst.ws.internal.cxf.creation.core.commands.WSDL2JavaCommand"
+             property="LoadDefaultNamespacePackageNameMapping"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="DefaultExcludesNamespace"
+             operation="org.eclipse.jst.ws.internal.cxf.creation.core.commands.WSDL2JavaCommand"
+             property="LoadDefaultExcludesNamepsaceMapping"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="AutoNameResolution"
+             operation="org.eclipse.jst.ws.internal.cxf.creation.core.commands.WSDL2JavaCommand"
+             property="AutoNameResolution"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="xjc_dv"
+             operation="org.eclipse.jst.ws.internal.cxf.creation.core.commands.WSDL2JavaCommand"
+             property="XjcUseDefaultValues"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="xjc_ts"
+             operation="org.eclipse.jst.ws.internal.cxf.creation.core.commands.WSDL2JavaCommand"
+             property="XjcToString"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="xjc_ts_multi"
+             operation="org.eclipse.jst.ws.internal.cxf.creation.core.commands.WSDL2JavaCommand"
+             property="XjcToStringMultiLine"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="xjc_ts_simple"
+             operation="org.eclipse.jst.ws.internal.cxf.creation.core.commands.WSDL2JavaCommand"
+             property="XjcToStringSimple"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="xjc_locator"
+             operation="org.eclipse.jst.ws.internal.cxf.creation.core.commands.WSDL2JavaCommand"
+             property="XjcLocator"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="xjc_sync_methods"
+             operation="org.eclipse.jst.ws.internal.cxf.creation.core.commands.WSDL2JavaCommand"
+             property="XjcSyncMethods"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+       <map
+             key="xjc_mark_generated"
+             operation="org.eclipse.jst.ws.internal.cxf.creation.core.commands.WSDL2JavaCommand"
+             property="XjcMarkGenerated"
+             transform="org.eclipse.wst.command.internal.env.ant.String2BooleanTransformer"/>
+    </extension>
+
+ </plugin>
\ No newline at end of file
diff --git a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/CXFUImessages.properties b/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/CXFUImessages.properties
index 434ae2d..73ef2b6 100644
--- a/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/CXFUImessages.properties
+++ b/bundles/org.eclipse.jst.ws.cxf.ui/src/org/eclipse/jst/ws/internal/cxf/ui/CXFUImessages.properties
@@ -106,7 +106,7 @@
 
 WSDL2JAVA_FRONTEND_TOOLTIP=Specify the frontend. Default is JAXWS. Currently supports only JAXWS frontend
 WSDL2JAVA_DATABINDING_TOOLTIP=Specify the databinding. Default is JAXB. Currently supports only JAXB databinding
-WSDL2JAVA_WSDL_VERSION_TOOLTIP=Specify the wsdl version .Default is WSDL1.1. Currently suppports only WSDL1.1 version
+WSDL2JAVA_WSDL_VERSION_TOOLTIP=Specify the wsdl version .Default is WSDL1.1. Currently supports only WSDL1.1 version
 WSDL2JAVA_GENERATE_IMPLEMENTATION_TOOLTIP=Generate starting point code for an implementation object
 WSDL2JAVA_GENERATE_CLIENT_TOOLTIP=Generate the client code
 WSDL2JAVA_GENERATE_SERVER_TOOLTIP=Generate the server code
@@ -121,7 +121,7 @@
 WSDL2JAVA_NO_ADDRESS_BINDING_TOOLTIP=Use the {0} proprietary WS-Addressing type instead of the JAX-WS 2.1 compliant mapping
 WSDL2JAVA_AUTO_NAME_RESOLUTION=Enable Auto Name Resolution
 WSDL2JAVA_AUTO_NAME_RESOLUTION_TOOLTIP=Automatically resolve naming conflicts without requiring the use of binding customizations
-WSDL2JAVA_XJC_ARGS_TOOLTIP=Specify the arguments to be passed to directly to the XJC
+WSDL2JAVA_XJC_ARGS_TOOLTIP=Specify the arguments to be passed directly to the XJC
 WSDL2JAVA_XJC_ARG_GROUP_TITLE=XJC Arguments
 WSDL2JAVA_XJC_ARG_COLUMN_NAME=XJC Arg
 WSDL2JAVA_XJC_DESCRIPTION_COLUMN_NAME=Description