
Property changes on: .
___________________________________________________________________
Modified: svn:ignore
   - .project
.classpath
.settings
bin
target

   + .project
.classpath
.settings
bin
target
.idea
.maven-jaxws-tools-plugin.diff.swp


Index: src/test/java/org/jboss/test/ws/plugins/tools/ArgumentTest.java
===================================================================
--- src/test/java/org/jboss/test/ws/plugins/tools/ArgumentTest.java	(revision 17049)
+++ src/test/java/org/jboss/test/ws/plugins/tools/ArgumentTest.java	(working copy)
@@ -91,6 +91,7 @@
       assertThat(mojo.getClasspathElements(), hasItems(new String[] { "cp1", "cp2" }));
       assertTrue(mojo.isFork());
       assertEquals("-Dfoo=bar", mojo.getArgLine());
+      assertEquals("http://someHost:somePort", mojo.getPortSoapAddress());
    }
 
 }
Index: src/test/resources/test-argument/wsprovide-plugin-config.xml
===================================================================
--- src/test/resources/test-argument/wsprovide-plugin-config.xml	(revision 17049)
+++ src/test/resources/test-argument/wsprovide-plugin-config.xml	(working copy)
@@ -15,6 +15,7 @@
           <sourceDirectory>source</sourceDirectory>
           <endpointClass>endpoint</endpointClass>
           <extension>true</extension>
+          <portSoapAddress>http://someHost:somePort</portSoapAddress>
           <verbose>true</verbose>
           <fork>true</fork>
           <argLine>-Dfoo=bar</argLine>

Property changes on: src/test/resources/test-embedded/testWsProvide/src/test/java/org/jboss/test/ws/plugins/tools/wsprovide
___________________________________________________________________
Added: svn:ignore
   + .TestEndpoint4.java.swp



Property changes on: src/test/resources/test-embedded/testWsProvide/src/main/java/org/jboss/test/ws/plugins/tools/wsprovide
___________________________________________________________________
Added: svn:ignore
   + .TestEndpoint3.java.swp


Index: src/test/resources/test-embedded/testWsProvide/pom-cxf.xml
===================================================================
--- src/test/resources/test-embedded/testWsProvide/pom-cxf.xml	(revision 17049)
+++ src/test/resources/test-embedded/testWsProvide/pom-cxf.xml	(working copy)
@@ -62,6 +62,29 @@
                 <generateWsdl>true</generateWsdl>
               </configuration>
             </execution>
+            <execution>
+              <id>Third execution</id>
+                <goals>
+                  <goal>wsprovide</goal>
+                </goals>
+                  <configuration>
+                    <endpointClass>org.jboss.test.ws.plugins.tools.wsprovide.TestEndpoint3</endpointClass>
+                    <generateWsdl>true</generateWsdl>
+                    <fork>true</fork>
+                    <portSoapAddress>http://someHost:somePort</portSoapAddress>
+                  </configuration>
+            </execution>
+            <execution>
+              <id>Fourth execution</id>
+                <goals>
+                  <goal>wsprovide-test</goal>
+                </goals>
+                  <configuration>
+                    <endpointClass>org.jboss.test.ws.plugins.tools.wsprovide.TestEndpoint4</endpointClass>
+                    <generateWsdl>true</generateWsdl>
+                    <portSoapAddress>http://someHost:somePort</portSoapAddress>
+                  </configuration>
+            </execution>
           </executions>
         </plugin>
 	  </plugins>
Index: src/main/java/org/jboss/ws/plugins/tools/WSContractDelegate.java
===================================================================
--- src/main/java/org/jboss/ws/plugins/tools/WSContractDelegate.java	(revision 17049)
+++ src/main/java/org/jboss/ws/plugins/tools/WSContractDelegate.java	(working copy)
@@ -258,6 +258,10 @@
       {
          commandList.add("-e");
       }
+      if(params.getPortSoapAddress() != null){
+         commandList.add("-a");
+         commandList.add(params.getPortSoapAddress());
+      }
       commandList.add(params.getEndpointClass());
       StringBuilder command = new StringBuilder();
       for (String s : commandList)
@@ -353,6 +357,10 @@
       {
          callMethod(providerClass, provider, "setSourceDirectory", params.getSourceDirectory());
       }
+      if (params.getPortSoapAddress() != null)
+      {
+          callMethod(providerClass, provider, "setPortSoapAddress", params.getPortSoapAddress());
+      }
    }
 
 }
Index: src/main/java/org/jboss/ws/plugins/tools/WSContractProviderParams.java
===================================================================
--- src/main/java/org/jboss/ws/plugins/tools/WSContractProviderParams.java	(revision 17049)
+++ src/main/java/org/jboss/ws/plugins/tools/WSContractProviderParams.java	(working copy)
@@ -37,6 +37,7 @@
    private File resourceDirectory;
    private File sourceDirectory;
    private String argLine;
+   private String portSoapAddress;
 
    public boolean isFork()
    {
@@ -118,4 +119,13 @@
    {
       this.sourceDirectory = sourceDirectory;
    }
+
+   public String getPortSoapAddress()
+   {
+      return portSoapAddress;
+   }
+   public void setPortSoapAddress(String portSoapAddress)
+   {
+      this.portSoapAddress = portSoapAddress;
+   }
 }
Index: src/main/java/org/jboss/ws/plugins/tools/AbstractWsProvideMojo.java
===================================================================
--- src/main/java/org/jboss/ws/plugins/tools/AbstractWsProvideMojo.java	(revision 17049)
+++ src/main/java/org/jboss/ws/plugins/tools/AbstractWsProvideMojo.java	(working copy)
@@ -66,7 +66,14 @@
     * @required
     */
    private String endpointClass;
-   
+
+    /**
+     * Sets the soap:address to be used for the generated port in the wsdl.
+     * @parameter
+     */
+   private String portSoapAddress;
+
+
    public void execute() throws MojoExecutionException
    {
       Log log = getLog();
@@ -101,6 +108,7 @@
          params.setSourceDirectory(sourceDirectory);
          params.setFork(fork);
          params.setArgLine(argLine);
+         params.setPortSoapAddress(portSoapAddress);
          
          WSContractDelegate delegate = new WSContractDelegate(getLog());
          delegate.runProvider(params);
@@ -136,4 +144,9 @@
    {
       return endpointClass;
    }
+
+   public String getPortSoapAddress()
+   {
+      return portSoapAddress;
+   }
 }
