Author: veithen
Date: Sun Oct 16 19:51:01 2016
New Revision: 1765186

URL: http://svn.apache.org/viewvc?rev=1765186&view=rev
Log:
Merge r1741976 to the 1.7 branch.

Modified:
    axis/axis2/java/core/branches/1_7/   (props changed)
    
axis/axis2/java/core/branches/1_7/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5741/ServiceTest.java
    
axis/axis2/java/core/branches/1_7/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5749/ServiceTest.java
    
axis/axis2/java/core/branches/1_7/modules/testutils/src/main/java/org/apache/axis2/testutils/Axis2Server.java

Propchange: axis/axis2/java/core/branches/1_7/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Oct 16 19:51:01 2016
@@ -1,4 +1,4 @@
 /axis/axis2/java/core/branches/1_6:1295540
 /axis/axis2/java/core/branches/AXIOM-420:1334386-1336397
 
/axis/axis2/java/core/branches/AXIS2-4318:1230452,1295542,1324772,1327468,1329571,1332141,1335355,1335357,1340985
-/axis/axis2/java/core/trunk:1726494,1726509,1726513,1727171,1727174,1727177,1727180,1729891,1730095,1730139,1730180,1730186,1730195,1730197,1730222,1730300,1730308,1730310,1730317,1730322,1730335,1730369,1730427,1730618,1731425,1731441,1731446,1731448,1732354,1733137,1733663,1733713,1733766,1733770,1733773,1733850,1734176,1735331,1735795,1736512,1736543,1737030,1737567,1739001,1739186,1739343,1739346,1739348,1739493,1739592,1739594-1739595,1739815,1739826,1740693-1740694,1742201,1743824,1745826,1745860,1745869,1745875,1745912,1745924,1745929,1745941,1746001,1746028,1746109,1746782,1746784,1746787,1746813,1746842,1746880,1746883,1746889,1746894,1747448,1747466,1747503,1747575,1747578,1747601,1747773,1747920,1751057,1752039,1765132
+/axis/axis2/java/core/trunk:1726494,1726509,1726513,1727171,1727174,1727177,1727180,1729891,1730095,1730139,1730180,1730186,1730195,1730197,1730222,1730300,1730308,1730310,1730317,1730322,1730335,1730369,1730427,1730618,1731425,1731441,1731446,1731448,1732354,1733137,1733663,1733713,1733766,1733770,1733773,1733850,1734176,1735331,1735795,1736512,1736543,1737030,1737567,1739001,1739186,1739343,1739346,1739348,1739493,1739592,1739594-1739595,1739815,1739826,1740693-1740694,1741976,1742201,1743824,1745826,1745860,1745869,1745875,1745912,1745924,1745929,1745941,1746001,1746028,1746109,1746782,1746784,1746787,1746813,1746842,1746880,1746883,1746889,1746894,1747448,1747466,1747503,1747575,1747578,1747601,1747773,1747920,1751057,1752039,1765132

Modified: 
axis/axis2/java/core/branches/1_7/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5741/ServiceTest.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_7/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5741/ServiceTest.java?rev=1765186&r1=1765185&r2=1765186&view=diff
==============================================================================
--- 
axis/axis2/java/core/branches/1_7/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5741/ServiceTest.java
 (original)
+++ 
axis/axis2/java/core/branches/1_7/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5741/ServiceTest.java
 Sun Oct 16 19:51:01 2016
@@ -37,7 +37,7 @@ public class ServiceTest {
         FiverxLinkService client = new 
FiverxLinkService_Service().getFiverxLinkServicePort();
         ((BindingProvider)client).getRequestContext().put(
                 BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
-                "http://localhost:"; + server.getPort() + 
"/axis2/services/FiverxLinkService");
+                server.getEndpoint("FiverxLinkService"));
         assertThat(client.ladeRzVersion("test")).isEqualTo("test result");
     }
 }

Modified: 
axis/axis2/java/core/branches/1_7/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5749/ServiceTest.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_7/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5749/ServiceTest.java?rev=1765186&r1=1765185&r2=1765186&view=diff
==============================================================================
--- 
axis/axis2/java/core/branches/1_7/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5749/ServiceTest.java
 (original)
+++ 
axis/axis2/java/core/branches/1_7/modules/adb-tests/src/test/java/org/apache/axis2/databinding/axis2_5749/ServiceTest.java
 Sun Oct 16 19:51:01 2016
@@ -38,7 +38,7 @@ public class ServiceTest {
         ColorService client = new ColorService_Service().getColorServiceSOAP();
         ((BindingProvider)client).getRequestContext().put(
                 BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
-                "http://localhost:"; + server.getPort() + 
"/axis2/services/ColorService");
+                server.getEndpoint("ColorService"));
         Color color = new Color();
         color.setIn("RED");
         assertThat(client.test(color).getOut()).isEqualTo("Red is good!");

Modified: 
axis/axis2/java/core/branches/1_7/modules/testutils/src/main/java/org/apache/axis2/testutils/Axis2Server.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/branches/1_7/modules/testutils/src/main/java/org/apache/axis2/testutils/Axis2Server.java?rev=1765186&r1=1765185&r2=1765186&view=diff
==============================================================================
--- 
axis/axis2/java/core/branches/1_7/modules/testutils/src/main/java/org/apache/axis2/testutils/Axis2Server.java
 (original)
+++ 
axis/axis2/java/core/branches/1_7/modules/testutils/src/main/java/org/apache/axis2/testutils/Axis2Server.java
 Sun Oct 16 19:51:01 2016
@@ -18,6 +18,7 @@
  */
 package org.apache.axis2.testutils;
 
+import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.ConfigurationContextFactory;
 import org.apache.axis2.transport.http.SimpleHTTPServer;
@@ -26,6 +27,7 @@ import org.junit.rules.ExternalResource;
 public class Axis2Server extends ExternalResource {
     private final String repositoryPath;
     private int port = -1;
+    private ConfigurationContext configurationContext;
     private SimpleHTTPServer server;
 
     public Axis2Server(String repositoryPath) {
@@ -39,10 +41,17 @@ public class Axis2Server extends Externa
         return port;
     }
 
+    public String getEndpoint(String serviceName) throws AxisFault {
+        if (configurationContext == null) {
+            throw new IllegalStateException();
+        }
+        return 
configurationContext.getAxisConfiguration().getService(serviceName).getEPRs()[0];
+    }
+
     @Override
     protected void before() throws Throwable {
         port = PortAllocator.allocatePort();
-        ConfigurationContext configurationContext =
+        configurationContext =
                 
ConfigurationContextFactory.createConfigurationContextFromFileSystem(repositoryPath);
         server = new SimpleHTTPServer(configurationContext, port);
         server.start();
@@ -51,6 +60,8 @@ public class Axis2Server extends Externa
     @Override
     protected void after() {
         port = -1;
+        configurationContext = null;
         server.stop();
+        server = null;
     }
 }


Reply via email to