You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by ve...@apache.org on 2012/03/09 23:25:01 UTC
svn commit: r1299078 [1/4] - in /axis/axis1/java/trunk/integration: ./
src/test/java/test/ src/test/java/test/functional/
src/test/java/test/import2/ src/test/java/test/wsdl/_import/
src/test/java/test/wsdl/any/ src/test/java/test/wsdl/anytype/ src/tes...
Author: veithen
Date: Fri Mar 9 22:24:59 2012
New Revision: 1299078
URL: http://svn.apache.org/viewvc?rev=1299078&view=rev
Log:
Avoid usage of fixed HTTP port in integration tests.
Added:
axis/axis1/java/trunk/integration/src/test/java/test/HttpTestUtil.java (with props)
axis/axis1/java/trunk/integration/src/test/java/test/import2/
axis/axis1/java/trunk/integration/src/test/java/test/import2/ImportServiceTestCase.java (with props)
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/_import/
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/_import/ImportServiceTestCase.java (with props)
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/include/
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/include/IncludeTestTestCase.java (with props)
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/names/
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/names/javanames/
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/names/javanames/JavaNamesServiceTestTestCase.java (with props)
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/wrapped_choice/
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/wrapped_choice/ReportingServiceTestCase.java (with props)
Modified:
axis/axis1/java/trunk/integration/pom.xml
axis/axis1/java/trunk/integration/src/test/java/test/functional/TestEncoding.java
axis/axis1/java/trunk/integration/src/test/java/test/functional/TestIF3SOAP.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/any/AnyTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/anytype/AnyServiceServiceTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/arrays/PersonalInfoBookServiceTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/arrays3/AddrBookServiceImplServiceTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/arrays4/StructureTypeTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/attachments/AttachmentTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/axis2098/MyServiceTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/choice/ChoiceServiceTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/datatypes/DataTypesTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/date/MyServiceServiceTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/document/TestServiceServiceTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/echo/ComplexEchoServiceTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/echo2/Echo2ServiceTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/esr/EsrTestServiceTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/extension/PlanWSTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/faults/FaultServiceTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/gateway/GatewayServiceTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/header/HeaderServiceTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/inout/DetailedInoutTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/jaxrpcdynproxy/JAXRPCDynProxyTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/jaxrpchandler2/JAXRPCHandler2TestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/map/MapServiceTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/marrays/MArrayTestsServiceTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/marshall/MarshallTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/marshall2/Marshall2ServiceTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/multiref/Main.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/nested/Nested2ServiceTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/omit/OmitTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/oneway/OnewayTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/polymorphism/PolymorphismTest_ServiceTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/primitiveWrappers/TypeWrapper_ServiceTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/qualify/Qualify_ServiceTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/qualify2/AttributeQualify_ServiceTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/ram/RamServiceTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/stubheaders/StubHeaderServiceTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/wrapped/City_BBBTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/wrapped2/EmployeeDatabaseTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/wrapped_holders/Wrapped_HoldersTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/wrapped_inout/WrappedInOutTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/wrapperHolder/ExampleSoapTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/wrapperHolder2/ExampleSoapTestCase.java
axis/axis1/java/trunk/integration/src/test/java/test/wsdl/xsd/CPWSImplServiceTestCase.java
Modified: axis/axis1/java/trunk/integration/pom.xml
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/pom.xml?rev=1299078&r1=1299077&r2=1299078&view=diff
==============================================================================
--- axis/axis1/java/trunk/integration/pom.xml (original)
+++ axis/axis1/java/trunk/integration/pom.xml Fri Mar 9 22:24:59 2012
@@ -216,7 +216,6 @@
<serverSide>true</serverSide>
<skeleton>true</skeleton>
<implementation>true</implementation>
- <testCase>true</testCase>
<mappings>
<mapping>
<namespace>urn:import</namespace>
@@ -245,7 +244,6 @@
<serverSide>true</serverSide>
<skeleton>true</skeleton>
<implementation>true</implementation>
- <testCase>true</testCase>
<mappings>
<mapping>
<namespace>urn:import</namespace>
@@ -695,7 +693,6 @@
<serverSide>true</serverSide>
<skeleton>true</skeleton>
<implementation>true</implementation>
- <testCase>true</testCase>
<mappings>
<mapping>
<namespace>urn:AddressFetcher2</namespace>
@@ -819,7 +816,6 @@
<file>src/test/wsdl/names/JavaNames.wsdl</file>
<serverSide>true</serverSide>
<implementation>true</implementation>
- <testCase>true</testCase>
<mappings>
<mapping>
<namespace>http://test.com/reference</namespace>
@@ -1044,7 +1040,6 @@
<serverSide>true</serverSide>
<skeleton>true</skeleton>
<implementation>true</implementation>
- <testCase>true</testCase>
<mappings>
<mapping>
<namespace>http://schemas.microsoft.com/sqlserver/2003/12/reporting/reportingservices</namespace>
@@ -1149,6 +1144,24 @@
</executions>
</plugin>
<plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>reserve-network-port</id>
+ <goals>
+ <goal>reserve-network-port</goal>
+ </goals>
+ <phase>pre-integration-test</phase>
+ <configuration>
+ <portNames>
+ <portName>test.functional.ServicePort</portName>
+ </portNames>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<groupId>${project.groupId}</groupId>
<artifactId>maven-axis-server-plugin</artifactId>
<version>${project.version}</version>
@@ -1159,6 +1172,7 @@
<goal>start-server</goal>
</goals>
<configuration>
+ <port>${test.functional.ServicePort}</port>
<wsdds>
<wsdd>
<directory>src/test/wsdd</directory>
@@ -1258,6 +1272,9 @@
<exclude>test/wsdl/inout/TestFailed.java</exclude>
<exclude>test/wsdl/marshall2/types/**</exclude>
</excludes>
+ <systemPropertyVariables>
+ <test.functional.ServicePort>${test.functional.ServicePort}</test.functional.ServicePort>
+ </systemPropertyVariables>
</configuration>
</execution>
</executions>
Added: axis/axis1/java/trunk/integration/src/test/java/test/HttpTestUtil.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/HttpTestUtil.java?rev=1299078&view=auto
==============================================================================
--- axis/axis1/java/trunk/integration/src/test/java/test/HttpTestUtil.java (added)
+++ axis/axis1/java/trunk/integration/src/test/java/test/HttpTestUtil.java Fri Mar 9 22:24:59 2012
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package test;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+/**
+ * Contains utility methods for tests that use the stand-alone server.
+ *
+ * @author Andreas Veithen
+ */
+public class HttpTestUtil {
+ /**
+ * Get the URL of the test endpoint by replacing the port number in the original URL with the
+ * one specified by the <tt>test.functional.ServicePort</tt> system property.
+ *
+ * @param orgUrl
+ * the original URL
+ * @return the modified URL
+ * @throws MalformedURLException
+ */
+ public static URL getTestEndpoint(String orgUrl) throws MalformedURLException {
+ URL url = new URL(orgUrl);
+ return new URL(url.getProtocol(), url.getHost(), Integer.parseInt(System.getProperty("test.functional.ServicePort", "8080")), url.getFile());
+ }
+}
Propchange: axis/axis1/java/trunk/integration/src/test/java/test/HttpTestUtil.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: axis/axis1/java/trunk/integration/src/test/java/test/functional/TestEncoding.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/functional/TestEncoding.java?rev=1299078&r1=1299077&r2=1299078&view=diff
==============================================================================
--- axis/axis1/java/trunk/integration/src/test/java/test/functional/TestEncoding.java (original)
+++ axis/axis1/java/trunk/integration/src/test/java/test/functional/TestEncoding.java Fri Mar 9 22:24:59 2012
@@ -5,6 +5,8 @@ import org.apache.axis.AxisEngine;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
+import test.HttpTestUtil;
+
import javax.xml.messaging.URLEndpoint;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.Name;
@@ -16,8 +18,6 @@ import javax.xml.soap.SOAPElement;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPMessage;
-import java.net.URL;
-
/**
* Test string encoding roundtrip.
*/
@@ -33,7 +33,7 @@ public class TestEncoding extends TestCa
Service service = new Service();
service.getEngine().setOption(AxisEngine.PROP_XML_ENCODING, "UTF-8");
call = (Call) service.createCall();
- call.setTargetEndpointAddress(new URL("http://localhost:8080/axis/EchoHeaders.jws"));
+ call.setTargetEndpointAddress(HttpTestUtil.getTestEndpoint("http://localhost:8080/axis/EchoHeaders.jws"));
}
}
@@ -109,7 +109,7 @@ public class TestEncoding extends TestCa
SOAPElement symbol = bodyElement.addChildElement(name);
symbol.addTextNode("Hello");
- URLEndpoint endpoint = new URLEndpoint("http://localhost:8080/axis/EchoHeaders.jws");
+ URLEndpoint endpoint = new URLEndpoint(HttpTestUtil.getTestEndpoint("http://localhost:8080/axis/EchoHeaders.jws").toString());
SOAPMessage response = con.call(message, endpoint);
String responseEncoding = (String) response.getProperty(SOAPMessage.CHARACTER_SET_ENCODING);
assertEquals(requestEncoding.toLowerCase(), responseEncoding.toLowerCase());
Modified: axis/axis1/java/trunk/integration/src/test/java/test/functional/TestIF3SOAP.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/functional/TestIF3SOAP.java?rev=1299078&r1=1299077&r2=1299078&view=diff
==============================================================================
--- axis/axis1/java/trunk/integration/src/test/java/test/functional/TestIF3SOAP.java (original)
+++ axis/axis1/java/trunk/integration/src/test/java/test/functional/TestIF3SOAP.java Fri Mar 9 22:24:59 2012
@@ -1,6 +1,7 @@
package test.functional;
import junit.framework.TestCase;
+import test.HttpTestUtil;
import test.rpc.IF1;
import test.rpc.IF2SOAP;
import test.rpc.IF3SOAP;
@@ -10,18 +11,15 @@ import java.util.Calendar;
import java.util.GregorianCalendar;
public final class TestIF3SOAP extends TestCase {
- private static final String URL = "http://localhost:8080/axis/services/IF3SOAP";
- private static final String Service = "IF3SOAP";
-
private IF3SOAPProxy m_soap;
public TestIF3SOAP(String name) {
super(name);
}
- protected void setUp() {
+ protected void setUp() throws Exception {
if (m_soap == null)
- m_soap = new IF3SOAPProxy(Service, URL);
+ m_soap = new IF3SOAPProxy("IF3SOAP", HttpTestUtil.getTestEndpoint("http://localhost:8080/axis/services/IF3SOAP").toString());
} // setUp
Added: axis/axis1/java/trunk/integration/src/test/java/test/import2/ImportServiceTestCase.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/import2/ImportServiceTestCase.java?rev=1299078&view=auto
==============================================================================
--- axis/axis1/java/trunk/integration/src/test/java/test/import2/ImportServiceTestCase.java (added)
+++ axis/axis1/java/trunk/integration/src/test/java/test/import2/ImportServiceTestCase.java Fri Mar 9 22:24:59 2012
@@ -0,0 +1,129 @@
+/**
+ * ImportServiceTestCase.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4.1-SNAPSHOT Mar 09, 2012 (11:21:16 GMT) WSDL2Java emitter.
+ */
+
+package test.import2;
+
+import test.HttpTestUtil;
+import test.import2.binding1.ImportBinding1Stub;
+import test.import2.binding2.ImportBinding2Stub;
+
+public class ImportServiceTestCase extends junit.framework.TestCase {
+ public ImportServiceTestCase(java.lang.String name) {
+ super(name);
+ }
+
+ public void testImportTest1WSDL() throws Exception {
+ javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
+ java.net.URL url = HttpTestUtil.getTestEndpoint(new test.import2.ImportServiceLocator().getImportTest1Address() + "?WSDL");
+ javax.xml.rpc.Service service = serviceFactory.createService(url, new test.import2.ImportServiceLocator().getServiceName());
+ assertTrue(service != null);
+ }
+
+ public void test1ImportTest1AddEntry() throws Exception {
+ test.import2.binding1.ImportBinding1Stub binding;
+ try {
+ ImportServiceLocator loc = new ImportServiceLocator();
+ binding = (ImportBinding1Stub)loc.getImportTest1(HttpTestUtil.getTestEndpoint(loc.getImportTest1Address()));
+ }
+ catch (javax.xml.rpc.ServiceException jre) {
+ if(jre.getLinkedCause()!=null)
+ jre.getLinkedCause().printStackTrace();
+ throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
+ }
+ assertNotNull("binding is null", binding);
+
+ // Time out after a minute
+ binding.setTimeout(60000);
+
+ // Test operation
+ binding.addEntry(new java.lang.String(), new test.import2.types.Address());
+ // TBD - validate results
+ }
+
+ public void test2ImportTest1GetAddressFromName() throws Exception {
+ test.import2.binding1.ImportBinding1Stub binding;
+ try {
+ ImportServiceLocator loc = new ImportServiceLocator();
+ binding = (ImportBinding1Stub)loc.getImportTest1(HttpTestUtil.getTestEndpoint(loc.getImportTest1Address()));
+ }
+ catch (javax.xml.rpc.ServiceException jre) {
+ if(jre.getLinkedCause()!=null)
+ jre.getLinkedCause().printStackTrace();
+ throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
+ }
+ assertNotNull("binding is null", binding);
+
+ // Time out after a minute
+ binding.setTimeout(60000);
+
+ // Test operation
+ try {
+ test.import2.types.Address value = null;
+ value = binding.getAddressFromName(new java.lang.String());
+ }
+ catch (test.import2.messages.Fault e1) {
+ throw new junit.framework.AssertionFailedError("Fault Exception caught: " + e1);
+ }
+ // TBD - validate results
+ }
+
+ public void testImportTest2WSDL() throws Exception {
+ javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
+ java.net.URL url = HttpTestUtil.getTestEndpoint(new test.import2.ImportServiceLocator().getImportTest2Address() + "?WSDL");
+ javax.xml.rpc.Service service = serviceFactory.createService(url, new test.import2.ImportServiceLocator().getServiceName());
+ assertTrue(service != null);
+ }
+
+ public void test3ImportTest2AddEntry() throws Exception {
+ test.import2.binding2.ImportBinding2Stub binding;
+ try {
+ ImportServiceLocator loc = new ImportServiceLocator();
+ binding = (ImportBinding2Stub)loc.getImportTest2(HttpTestUtil.getTestEndpoint(loc.getImportTest2Address()));
+ }
+ catch (javax.xml.rpc.ServiceException jre) {
+ if(jre.getLinkedCause()!=null)
+ jre.getLinkedCause().printStackTrace();
+ throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
+ }
+ assertNotNull("binding is null", binding);
+
+ // Time out after a minute
+ binding.setTimeout(60000);
+
+ // Test operation
+ binding.addEntry(new java.lang.String(), new test.import2.types.Address());
+ // TBD - validate results
+ }
+
+ public void test4ImportTest2GetAddressFromName() throws Exception {
+ test.import2.binding2.ImportBinding2Stub binding;
+ try {
+ ImportServiceLocator loc = new ImportServiceLocator();
+ binding = (ImportBinding2Stub)loc.getImportTest2(HttpTestUtil.getTestEndpoint(loc.getImportTest2Address()));
+ }
+ catch (javax.xml.rpc.ServiceException jre) {
+ if(jre.getLinkedCause()!=null)
+ jre.getLinkedCause().printStackTrace();
+ throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
+ }
+ assertNotNull("binding is null", binding);
+
+ // Time out after a minute
+ binding.setTimeout(60000);
+
+ // Test operation
+ try {
+ test.import2.types.Address value = null;
+ value = binding.getAddressFromName(new java.lang.String());
+ }
+ catch (test.import2.messages.Fault e1) {
+ throw new junit.framework.AssertionFailedError("Fault Exception caught: " + e1);
+ }
+ // TBD - validate results
+ }
+
+}
Propchange: axis/axis1/java/trunk/integration/src/test/java/test/import2/ImportServiceTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: axis/axis1/java/trunk/integration/src/test/java/test/wsdl/_import/ImportServiceTestCase.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/wsdl/_import/ImportServiceTestCase.java?rev=1299078&view=auto
==============================================================================
--- axis/axis1/java/trunk/integration/src/test/java/test/wsdl/_import/ImportServiceTestCase.java (added)
+++ axis/axis1/java/trunk/integration/src/test/java/test/wsdl/_import/ImportServiceTestCase.java Fri Mar 9 22:24:59 2012
@@ -0,0 +1,129 @@
+/**
+ * ImportServiceTestCase.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4.1-SNAPSHOT Mar 09, 2012 (11:21:16 GMT) WSDL2Java emitter.
+ */
+
+package test.wsdl._import;
+
+import test.HttpTestUtil;
+import test.wsdl._import.binding1.ImportBinding1Stub;
+import test.wsdl._import.binding2.ImportBinding2Stub;
+
+public class ImportServiceTestCase extends junit.framework.TestCase {
+ public ImportServiceTestCase(java.lang.String name) {
+ super(name);
+ }
+
+ public void testImportTest1WSDL() throws Exception {
+ javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
+ java.net.URL url = HttpTestUtil.getTestEndpoint(new test.wsdl._import.ImportServiceLocator().getImportTest1Address() + "?WSDL");
+ javax.xml.rpc.Service service = serviceFactory.createService(url, new test.wsdl._import.ImportServiceLocator().getServiceName());
+ assertTrue(service != null);
+ }
+
+ public void test1ImportTest1AddEntry() throws Exception {
+ test.wsdl._import.binding1.ImportBinding1Stub binding;
+ try {
+ ImportServiceLocator loc = new ImportServiceLocator();
+ binding = (ImportBinding1Stub)loc.getImportTest1(HttpTestUtil.getTestEndpoint(loc.getImportTest1Address()));
+ }
+ catch (javax.xml.rpc.ServiceException jre) {
+ if(jre.getLinkedCause()!=null)
+ jre.getLinkedCause().printStackTrace();
+ throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
+ }
+ assertNotNull("binding is null", binding);
+
+ // Time out after a minute
+ binding.setTimeout(60000);
+
+ // Test operation
+ binding.addEntry(new java.lang.String(), new test._import.types.Address());
+ // TBD - validate results
+ }
+
+ public void test2ImportTest1GetAddressFromName() throws Exception {
+ test.wsdl._import.binding1.ImportBinding1Stub binding;
+ try {
+ ImportServiceLocator loc = new ImportServiceLocator();
+ binding = (ImportBinding1Stub)loc.getImportTest1(HttpTestUtil.getTestEndpoint(loc.getImportTest1Address()));
+ }
+ catch (javax.xml.rpc.ServiceException jre) {
+ if(jre.getLinkedCause()!=null)
+ jre.getLinkedCause().printStackTrace();
+ throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
+ }
+ assertNotNull("binding is null", binding);
+
+ // Time out after a minute
+ binding.setTimeout(60000);
+
+ // Test operation
+ try {
+ test._import.types.Address value = null;
+ value = binding.getAddressFromName(new java.lang.String());
+ }
+ catch (test._import.messages.Fault e1) {
+ throw new junit.framework.AssertionFailedError("Fault Exception caught: " + e1);
+ }
+ // TBD - validate results
+ }
+
+ public void testImportTest2WSDL() throws Exception {
+ javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
+ java.net.URL url = HttpTestUtil.getTestEndpoint(new test.wsdl._import.ImportServiceLocator().getImportTest2Address() + "?WSDL");
+ javax.xml.rpc.Service service = serviceFactory.createService(url, new test.wsdl._import.ImportServiceLocator().getServiceName());
+ assertTrue(service != null);
+ }
+
+ public void test3ImportTest2AddEntry() throws Exception {
+ test.wsdl._import.binding2.ImportBinding2Stub binding;
+ try {
+ ImportServiceLocator loc = new ImportServiceLocator();
+ binding = (ImportBinding2Stub)loc.getImportTest2(HttpTestUtil.getTestEndpoint(loc.getImportTest2Address()));
+ }
+ catch (javax.xml.rpc.ServiceException jre) {
+ if(jre.getLinkedCause()!=null)
+ jre.getLinkedCause().printStackTrace();
+ throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
+ }
+ assertNotNull("binding is null", binding);
+
+ // Time out after a minute
+ binding.setTimeout(60000);
+
+ // Test operation
+ binding.addEntry(new java.lang.String(), new test._import.types.Address());
+ // TBD - validate results
+ }
+
+ public void test4ImportTest2GetAddressFromName() throws Exception {
+ test.wsdl._import.binding2.ImportBinding2Stub binding;
+ try {
+ ImportServiceLocator loc = new ImportServiceLocator();
+ binding = (ImportBinding2Stub)loc.getImportTest2(HttpTestUtil.getTestEndpoint(loc.getImportTest2Address()));
+ }
+ catch (javax.xml.rpc.ServiceException jre) {
+ if(jre.getLinkedCause()!=null)
+ jre.getLinkedCause().printStackTrace();
+ throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
+ }
+ assertNotNull("binding is null", binding);
+
+ // Time out after a minute
+ binding.setTimeout(60000);
+
+ // Test operation
+ try {
+ test._import.types.Address value = null;
+ value = binding.getAddressFromName(new java.lang.String());
+ }
+ catch (test._import.messages.Fault e1) {
+ throw new junit.framework.AssertionFailedError("Fault Exception caught: " + e1);
+ }
+ // TBD - validate results
+ }
+
+}
Propchange: axis/axis1/java/trunk/integration/src/test/java/test/wsdl/_import/ImportServiceTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: axis/axis1/java/trunk/integration/src/test/java/test/wsdl/any/AnyTestCase.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/wsdl/any/AnyTestCase.java?rev=1299078&r1=1299077&r2=1299078&view=diff
==============================================================================
--- axis/axis1/java/trunk/integration/src/test/java/test/wsdl/any/AnyTestCase.java (original)
+++ axis/axis1/java/trunk/integration/src/test/java/test/wsdl/any/AnyTestCase.java Fri Mar 9 22:24:59 2012
@@ -1,6 +1,8 @@
package test.wsdl.any;
+import test.HttpTestUtil;
+
/**
* @author Ashutosh Shahi
*
@@ -15,7 +17,7 @@ public class AnyTestCase extends junit.f
public void testAny1() throws Exception{
AnyServiceLocator loc = new AnyServiceLocator();
- Soap svc = loc.getSoap();
+ Soap svc = loc.getSoap(HttpTestUtil.getTestEndpoint(loc.getSoapAddress()));
QueryResult qr = svc.query("blah");
Modified: axis/axis1/java/trunk/integration/src/test/java/test/wsdl/anytype/AnyServiceServiceTestCase.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/wsdl/anytype/AnyServiceServiceTestCase.java?rev=1299078&r1=1299077&r2=1299078&view=diff
==============================================================================
--- axis/axis1/java/trunk/integration/src/test/java/test/wsdl/anytype/AnyServiceServiceTestCase.java (original)
+++ axis/axis1/java/trunk/integration/src/test/java/test/wsdl/anytype/AnyServiceServiceTestCase.java Fri Mar 9 22:24:59 2012
@@ -7,6 +7,8 @@
package test.wsdl.anytype;
+import test.HttpTestUtil;
+
public class AnyServiceServiceTestCase extends junit.framework.TestCase {
public AnyServiceServiceTestCase(java.lang.String name) {
super(name);
@@ -14,7 +16,8 @@ public class AnyServiceServiceTestCase e
public void test1AnyServiceRun() throws Exception {
test.wsdl.anytype.AnyService binding;
try {
- binding = new test.wsdl.anytype.AnyServiceServiceLocator().getAnyService();
+ AnyServiceServiceLocator loc = new AnyServiceServiceLocator();
+ binding = loc.getAnyService(HttpTestUtil.getTestEndpoint(loc.getAnyServiceAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
Modified: axis/axis1/java/trunk/integration/src/test/java/test/wsdl/arrays/PersonalInfoBookServiceTestCase.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/wsdl/arrays/PersonalInfoBookServiceTestCase.java?rev=1299078&r1=1299077&r2=1299078&view=diff
==============================================================================
--- axis/axis1/java/trunk/integration/src/test/java/test/wsdl/arrays/PersonalInfoBookServiceTestCase.java (original)
+++ axis/axis1/java/trunk/integration/src/test/java/test/wsdl/arrays/PersonalInfoBookServiceTestCase.java Fri Mar 9 22:24:59 2012
@@ -9,6 +9,8 @@ package test.wsdl.arrays;
import java.util.Vector;
+import test.HttpTestUtil;
+
public class PersonalInfoBookServiceTestCase extends junit.framework.TestCase {
public PersonalInfoBookServiceTestCase(String name) {
super(name);
@@ -43,7 +45,8 @@ public class PersonalInfoBookServiceTest
// Get the stub and set Session
test.wsdl.arrays.PersonalInfoBook binding;
- binding = new PersonalInfoBookServiceLocator().getPersonalInfoBook();
+ PersonalInfoBookServiceLocator loc = new PersonalInfoBookServiceLocator();
+ binding = loc.getPersonalInfoBook(HttpTestUtil.getTestEndpoint(loc.getPersonalInfoBookAddress()));
assertTrue("binding is null", binding != null);
((PersonalInfoBookSOAPBindingStub) binding).setMaintainSession (true);
Modified: axis/axis1/java/trunk/integration/src/test/java/test/wsdl/arrays3/AddrBookServiceImplServiceTestCase.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/wsdl/arrays3/AddrBookServiceImplServiceTestCase.java?rev=1299078&r1=1299077&r2=1299078&view=diff
==============================================================================
--- axis/axis1/java/trunk/integration/src/test/java/test/wsdl/arrays3/AddrBookServiceImplServiceTestCase.java (original)
+++ axis/axis1/java/trunk/integration/src/test/java/test/wsdl/arrays3/AddrBookServiceImplServiceTestCase.java Fri Mar 9 22:24:59 2012
@@ -7,6 +7,9 @@
package test.wsdl.arrays3;
+import test.HttpTestUtil;
+import test.wsdl.arrays3.testclient.AddrBookServiceImplServiceLocator;
+import test.wsdl.arrays3.testclient.Arrays3SoapBindingStub;
import junit.framework.AssertionFailedError;
public class AddrBookServiceImplServiceTestCase extends junit.framework.TestCase {
@@ -16,7 +19,7 @@ public class AddrBookServiceImplServiceT
public void testAddressBookWSDL() throws Exception {
javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
- java.net.URL url = new java.net.URL(new test.wsdl.arrays3.testclient.AddrBookServiceImplServiceLocator().getarrays3Address() + "?WSDL");
+ java.net.URL url = HttpTestUtil.getTestEndpoint(new test.wsdl.arrays3.testclient.AddrBookServiceImplServiceLocator().getarrays3Address() + "?WSDL");
javax.xml.rpc.Service service = serviceFactory.createService(url, new test.wsdl.arrays3.testclient.AddrBookServiceImplServiceLocator().getServiceName());
assertTrue(service != null);
}
@@ -24,8 +27,8 @@ public class AddrBookServiceImplServiceT
public void testFunctional() throws Exception {
test.wsdl.arrays3.testclient.Arrays3SoapBindingStub binding;
try {
- binding = (test.wsdl.arrays3.testclient.Arrays3SoapBindingStub)
- new test.wsdl.arrays3.testclient.AddrBookServiceImplServiceLocator().getarrays3();
+ AddrBookServiceImplServiceLocator loc = new AddrBookServiceImplServiceLocator();
+ binding = (Arrays3SoapBindingStub)loc.getarrays3(HttpTestUtil.getTestEndpoint(loc.getarrays3Address()));
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
Modified: axis/axis1/java/trunk/integration/src/test/java/test/wsdl/arrays4/StructureTypeTestCase.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/wsdl/arrays4/StructureTypeTestCase.java?rev=1299078&r1=1299077&r2=1299078&view=diff
==============================================================================
--- axis/axis1/java/trunk/integration/src/test/java/test/wsdl/arrays4/StructureTypeTestCase.java (original)
+++ axis/axis1/java/trunk/integration/src/test/java/test/wsdl/arrays4/StructureTypeTestCase.java Fri Mar 9 22:24:59 2012
@@ -1,5 +1,7 @@
package test.wsdl.arrays4;
+import test.HttpTestUtil;
+
/**
* StructureTypeTestCase
* <p/>
@@ -15,8 +17,9 @@ public class StructureTypeTestCase exten
public void testEchoStruct() throws Exception {
ArrayTest4SOAPBindingStub binding;
try {
+ ArrayTest4ServiceLocator loc = new ArrayTest4ServiceLocator();
binding = (ArrayTest4SOAPBindingStub)
- new ArrayTest4ServiceLocator().getArrayTest4();
+ loc.getArrayTest4(HttpTestUtil.getTestEndpoint(loc.getArrayTest4Address()));
} catch (javax.xml.rpc.ServiceException jre) {
if (jre.getLinkedCause() != null)
jre.getLinkedCause().printStackTrace();
Modified: axis/axis1/java/trunk/integration/src/test/java/test/wsdl/attachments/AttachmentTestCase.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/wsdl/attachments/AttachmentTestCase.java?rev=1299078&r1=1299077&r2=1299078&view=diff
==============================================================================
--- axis/axis1/java/trunk/integration/src/test/java/test/wsdl/attachments/AttachmentTestCase.java (original)
+++ axis/axis1/java/trunk/integration/src/test/java/test/wsdl/attachments/AttachmentTestCase.java Fri Mar 9 22:24:59 2012
@@ -9,6 +9,9 @@ package test.wsdl.attachments;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMultipart;
+
+import test.HttpTestUtil;
+
import java.util.Arrays;
public class AttachmentTestCase extends junit.framework.TestCase {
@@ -30,7 +33,8 @@ public class AttachmentTestCase extends
public void test1AttachmentPortRPCGetCompanyInfo2() throws Exception {
test.wsdl.attachments.Pt1 binding;
try {
- binding = new test.wsdl.attachments.AttachmentLocator().getAttachmentPortRPC();
+ AttachmentLocator loc = new AttachmentLocator();
+ binding = loc.getAttachmentPortRPC(HttpTestUtil.getTestEndpoint(loc.getAttachmentPortRPCAddress()));
} catch (javax.xml.rpc.ServiceException jre) {
if (jre.getLinkedCause() != null)
jre.getLinkedCause().printStackTrace();
@@ -47,7 +51,8 @@ public class AttachmentTestCase extends
public void test2AttachmentPortRPCInputPlainText() throws Exception {
test.wsdl.attachments.Pt1 binding;
try {
- binding = new test.wsdl.attachments.AttachmentLocator().getAttachmentPortRPC();
+ AttachmentLocator loc = new AttachmentLocator();
+ binding = loc.getAttachmentPortRPC(HttpTestUtil.getTestEndpoint(loc.getAttachmentPortRPCAddress()));
} catch (javax.xml.rpc.ServiceException jre) {
if (jre.getLinkedCause() != null)
jre.getLinkedCause().printStackTrace();
@@ -63,7 +68,8 @@ public class AttachmentTestCase extends
public void test3AttachmentPortRPCInoutPlainText() throws Exception {
test.wsdl.attachments.Pt1 binding;
try {
- binding = new test.wsdl.attachments.AttachmentLocator().getAttachmentPortRPC();
+ AttachmentLocator loc = new AttachmentLocator();
+ binding = loc.getAttachmentPortRPC(HttpTestUtil.getTestEndpoint(loc.getAttachmentPortRPCAddress()));
} catch (javax.xml.rpc.ServiceException jre) {
if (jre.getLinkedCause() != null)
jre.getLinkedCause().printStackTrace();
@@ -81,7 +87,8 @@ public class AttachmentTestCase extends
public void test4AttachmentPortRPCEchoPlainText() throws Exception {
test.wsdl.attachments.Pt1 binding;
try {
- binding = new test.wsdl.attachments.AttachmentLocator().getAttachmentPortRPC();
+ AttachmentLocator loc = new AttachmentLocator();
+ binding = loc.getAttachmentPortRPC(HttpTestUtil.getTestEndpoint(loc.getAttachmentPortRPCAddress()));
} catch (javax.xml.rpc.ServiceException jre) {
if (jre.getLinkedCause() != null)
jre.getLinkedCause().printStackTrace();
@@ -99,7 +106,8 @@ public class AttachmentTestCase extends
public void test5AttachmentPortRPCOutputPlainText() throws Exception {
test.wsdl.attachments.Pt1 binding;
try {
- binding = new test.wsdl.attachments.AttachmentLocator().getAttachmentPortRPC();
+ AttachmentLocator loc = new AttachmentLocator();
+ binding = loc.getAttachmentPortRPC(HttpTestUtil.getTestEndpoint(loc.getAttachmentPortRPCAddress()));
} catch (javax.xml.rpc.ServiceException jre) {
if (jre.getLinkedCause() != null)
jre.getLinkedCause().printStackTrace();
@@ -117,7 +125,8 @@ public class AttachmentTestCase extends
public void test6AttachmentPortRPCInputMimeMultipart() throws Exception {
test.wsdl.attachments.Pt1 binding;
try {
- binding = new test.wsdl.attachments.AttachmentLocator().getAttachmentPortRPC();
+ AttachmentLocator loc = new AttachmentLocator();
+ binding = loc.getAttachmentPortRPC(HttpTestUtil.getTestEndpoint(loc.getAttachmentPortRPCAddress()));
} catch (javax.xml.rpc.ServiceException jre) {
if (jre.getLinkedCause() != null)
jre.getLinkedCause().printStackTrace();
@@ -133,7 +142,8 @@ public class AttachmentTestCase extends
public void test7AttachmentPortRPCInoutMimeMultipart() throws Exception {
test.wsdl.attachments.Pt1 binding;
try {
- binding = new test.wsdl.attachments.AttachmentLocator().getAttachmentPortRPC();
+ AttachmentLocator loc = new AttachmentLocator();
+ binding = loc.getAttachmentPortRPC(HttpTestUtil.getTestEndpoint(loc.getAttachmentPortRPCAddress()));
} catch (javax.xml.rpc.ServiceException jre) {
if (jre.getLinkedCause() != null)
jre.getLinkedCause().printStackTrace();
@@ -150,7 +160,8 @@ public class AttachmentTestCase extends
public void test8AttachmentPortRPCEchoMimeMultipart() throws Exception {
test.wsdl.attachments.Pt1 binding;
try {
- binding = new test.wsdl.attachments.AttachmentLocator().getAttachmentPortRPC();
+ AttachmentLocator loc = new AttachmentLocator();
+ binding = loc.getAttachmentPortRPC(HttpTestUtil.getTestEndpoint(loc.getAttachmentPortRPCAddress()));
} catch (javax.xml.rpc.ServiceException jre) {
if (jre.getLinkedCause() != null)
jre.getLinkedCause().printStackTrace();
@@ -167,7 +178,8 @@ public class AttachmentTestCase extends
public void test9AttachmentPortRPCOutputMimeMultipart() throws Exception {
test.wsdl.attachments.Pt1 binding;
try {
- binding = new test.wsdl.attachments.AttachmentLocator().getAttachmentPortRPC();
+ AttachmentLocator loc = new AttachmentLocator();
+ binding = loc.getAttachmentPortRPC(HttpTestUtil.getTestEndpoint(loc.getAttachmentPortRPCAddress()));
} catch (javax.xml.rpc.ServiceException jre) {
if (jre.getLinkedCause() != null)
jre.getLinkedCause().printStackTrace();
@@ -184,7 +196,8 @@ public class AttachmentTestCase extends
public void test10AttachmentPortRPCEchoAttachment() throws Exception {
test.wsdl.attachments.Pt1 binding;
try {
- binding = new test.wsdl.attachments.AttachmentLocator().getAttachmentPortRPC();
+ AttachmentLocator loc = new AttachmentLocator();
+ binding = loc.getAttachmentPortRPC(HttpTestUtil.getTestEndpoint(loc.getAttachmentPortRPCAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
Modified: axis/axis1/java/trunk/integration/src/test/java/test/wsdl/axis2098/MyServiceTestCase.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/wsdl/axis2098/MyServiceTestCase.java?rev=1299078&r1=1299077&r2=1299078&view=diff
==============================================================================
--- axis/axis1/java/trunk/integration/src/test/java/test/wsdl/axis2098/MyServiceTestCase.java (original)
+++ axis/axis1/java/trunk/integration/src/test/java/test/wsdl/axis2098/MyServiceTestCase.java Fri Mar 9 22:24:59 2012
@@ -7,6 +7,8 @@
package test.wsdl.axis2098;
+import test.HttpTestUtil;
+
public class MyServiceTestCase extends junit.framework.TestCase {
public MyServiceTestCase(java.lang.String name) {
super(name);
@@ -14,7 +16,7 @@ public class MyServiceTestCase extends j
public void testHelloWorldWSDL() throws Exception {
javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
- java.net.URL url = new java.net.URL(new test.wsdl.axis2098.MyServiceLocator().getHelloWorldAddress() + "?WSDL");
+ java.net.URL url = HttpTestUtil.getTestEndpoint(new test.wsdl.axis2098.MyServiceLocator().getHelloWorldAddress() + "?WSDL");
javax.xml.rpc.Service service = serviceFactory.createService(url, new test.wsdl.axis2098.MyServiceLocator().getServiceName());
assertTrue(service != null);
}
@@ -22,9 +24,8 @@ public class MyServiceTestCase extends j
public void test1HelloWorldHelloWorld() throws Exception {
test.wsdl.axis2098.MySOAPBindingStub binding;
try {
- binding = (test.wsdl.axis2098.MySOAPBindingStub)
- new test.wsdl.axis2098.MyServiceLocator().getHelloWorld();
-
+ MyServiceLocator loc = new MyServiceLocator();
+ binding = (MySOAPBindingStub)loc.getHelloWorld(HttpTestUtil.getTestEndpoint(loc.getHelloWorldAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
Modified: axis/axis1/java/trunk/integration/src/test/java/test/wsdl/choice/ChoiceServiceTestCase.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/wsdl/choice/ChoiceServiceTestCase.java?rev=1299078&r1=1299077&r2=1299078&view=diff
==============================================================================
--- axis/axis1/java/trunk/integration/src/test/java/test/wsdl/choice/ChoiceServiceTestCase.java (original)
+++ axis/axis1/java/trunk/integration/src/test/java/test/wsdl/choice/ChoiceServiceTestCase.java Fri Mar 9 22:24:59 2012
@@ -15,6 +15,7 @@
*/
package test.wsdl.choice;
+import test.HttpTestUtil;
import junit.framework.TestCase;
import junit.framework.AssertionFailedError;
@@ -28,7 +29,7 @@ public class ChoiceServiceTestCase exten
ChoiceServiceSoap binding;
try {
ChoiceServiceLocator locator = new ChoiceServiceLocator();
- binding = locator.getChoiceServiceSoap();
+ binding = locator.getChoiceServiceSoap(HttpTestUtil.getTestEndpoint(locator.getChoiceServiceSoapAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
throw new AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
@@ -104,7 +105,7 @@ public class ChoiceServiceTestCase exten
ChoiceServiceSoap binding;
try {
ChoiceServiceLocator locator = new ChoiceServiceLocator();
- binding = locator.getChoiceServiceSoap();
+ binding = locator.getChoiceServiceSoap(HttpTestUtil.getTestEndpoint(locator.getChoiceServiceSoapAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
throw new AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
Modified: axis/axis1/java/trunk/integration/src/test/java/test/wsdl/datatypes/DataTypesTestCase.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/wsdl/datatypes/DataTypesTestCase.java?rev=1299078&r1=1299077&r2=1299078&view=diff
==============================================================================
--- axis/axis1/java/trunk/integration/src/test/java/test/wsdl/datatypes/DataTypesTestCase.java (original)
+++ axis/axis1/java/trunk/integration/src/test/java/test/wsdl/datatypes/DataTypesTestCase.java Fri Mar 9 22:24:59 2012
@@ -9,14 +9,17 @@ package test.wsdl.datatypes;
import javax.xml.namespace.QName;
+import test.HttpTestUtil;
+
public class DataTypesTestCase extends junit.framework.TestCase {
public DataTypesTestCase(String name) {
super(name);
}
- public void test1DataTypesSoapSayHello() {
+ public void test1DataTypesSoapSayHello() throws Exception {
DataTypes_PortType binding;
try {
- binding = new DataTypes_ServiceLocator().getDataTypes();
+ DataTypes_ServiceLocator loc = new DataTypes_ServiceLocator();
+ binding = loc.getDataTypes(HttpTestUtil.getTestEndpoint(loc.getDataTypesAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
@@ -33,10 +36,11 @@ public class DataTypesTestCase extends j
}
}
- public void test2DataTypesSoapSayHelloName() {
+ public void test2DataTypesSoapSayHelloName() throws Exception {
DataTypes_PortType binding;
try {
- binding = new DataTypes_ServiceLocator().getDataTypes();
+ DataTypes_ServiceLocator loc = new DataTypes_ServiceLocator();
+ binding = loc.getDataTypes(HttpTestUtil.getTestEndpoint(loc.getDataTypesAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
@@ -53,10 +57,11 @@ public class DataTypesTestCase extends j
}
}
- public void test3DataTypesSoapGetIntArray() {
+ public void test3DataTypesSoapGetIntArray() throws Exception {
DataTypes_PortType binding;
try {
- binding = new DataTypes_ServiceLocator().getDataTypes();
+ DataTypes_ServiceLocator loc = new DataTypes_ServiceLocator();
+ binding = loc.getDataTypes(HttpTestUtil.getTestEndpoint(loc.getDataTypesAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
@@ -77,10 +82,11 @@ public class DataTypesTestCase extends j
}
}
- public void test4DataTypesSoapGetMode() {
+ public void test4DataTypesSoapGetMode() throws Exception {
DataTypes_PortType binding;
try {
- binding = new DataTypes_ServiceLocator().getDataTypes();
+ DataTypes_ServiceLocator loc = new DataTypes_ServiceLocator();
+ binding = loc.getDataTypes(HttpTestUtil.getTestEndpoint(loc.getDataTypesAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
@@ -97,10 +103,11 @@ public class DataTypesTestCase extends j
}
}
- public void test5DataTypesSoapGetOrder() {
+ public void test5DataTypesSoapGetOrder() throws Exception {
DataTypes_PortType binding;
try {
- binding = new DataTypes_ServiceLocator().getDataTypes();
+ DataTypes_ServiceLocator loc = new DataTypes_ServiceLocator();
+ binding = loc.getDataTypes(HttpTestUtil.getTestEndpoint(loc.getDataTypesAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
@@ -118,10 +125,11 @@ public class DataTypesTestCase extends j
}
}
- public void test6DataTypesSoapGetOrders() {
+ public void test6DataTypesSoapGetOrders() throws Exception {
DataTypes_PortType binding;
try {
- binding = new DataTypes_ServiceLocator().getDataTypes();
+ DataTypes_ServiceLocator loc = new DataTypes_ServiceLocator();
+ binding = loc.getDataTypes(HttpTestUtil.getTestEndpoint(loc.getDataTypesAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
@@ -149,10 +157,11 @@ public class DataTypesTestCase extends j
}
}
- public void test7DataTypesSoapGetSimpleList() {
+ public void test7DataTypesSoapGetSimpleList() throws Exception {
DataTypes_PortType binding;
try {
- binding = new DataTypes_ServiceLocator().getDataTypes();
+ DataTypes_ServiceLocator loc = new DataTypes_ServiceLocator();
+ binding = loc.getDataTypes(HttpTestUtil.getTestEndpoint(loc.getDataTypesAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
@@ -180,7 +189,8 @@ public class DataTypesTestCase extends j
public void test5DataTypesGetUsageType() throws Exception {
DataTypes_PortType binding;
try {
- binding = new DataTypes_ServiceLocator().getDataTypes();
+ DataTypes_ServiceLocator loc = new DataTypes_ServiceLocator();
+ binding = loc.getDataTypes(HttpTestUtil.getTestEndpoint(loc.getDataTypesAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
Modified: axis/axis1/java/trunk/integration/src/test/java/test/wsdl/date/MyServiceServiceTestCase.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/wsdl/date/MyServiceServiceTestCase.java?rev=1299078&r1=1299077&r2=1299078&view=diff
==============================================================================
--- axis/axis1/java/trunk/integration/src/test/java/test/wsdl/date/MyServiceServiceTestCase.java (original)
+++ axis/axis1/java/trunk/integration/src/test/java/test/wsdl/date/MyServiceServiceTestCase.java Fri Mar 9 22:24:59 2012
@@ -7,6 +7,8 @@
package test.wsdl.date;
+import test.HttpTestUtil;
+
public class MyServiceServiceTestCase extends junit.framework.TestCase {
public MyServiceServiceTestCase(java.lang.String name) {
super(name);
@@ -14,7 +16,7 @@ public class MyServiceServiceTestCase ex
public void testtestdateWSDL() throws Exception {
javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
- java.net.URL url = new java.net.URL(new test.wsdl.date.MyServiceServiceLocator().gettestdateAddress() + "?WSDL");
+ java.net.URL url = HttpTestUtil.getTestEndpoint(new test.wsdl.date.MyServiceServiceLocator().gettestdateAddress() + "?WSDL");
javax.xml.rpc.Service service = serviceFactory.createService(url, new test.wsdl.date.MyServiceServiceLocator().getServiceName());
assertTrue(service != null);
}
@@ -22,8 +24,8 @@ public class MyServiceServiceTestCase ex
public void test1testdateGetInfo() throws Exception {
test.wsdl.date.TestdateSoapBindingStub binding;
try {
- binding = (test.wsdl.date.TestdateSoapBindingStub)
- new test.wsdl.date.MyServiceServiceLocator().gettestdate();
+ MyServiceServiceLocator loc = new MyServiceServiceLocator();
+ binding = (TestdateSoapBindingStub)loc.gettestdate(HttpTestUtil.getTestEndpoint(loc.gettestdateAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
Modified: axis/axis1/java/trunk/integration/src/test/java/test/wsdl/document/TestServiceServiceTestCase.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/wsdl/document/TestServiceServiceTestCase.java?rev=1299078&r1=1299077&r2=1299078&view=diff
==============================================================================
--- axis/axis1/java/trunk/integration/src/test/java/test/wsdl/document/TestServiceServiceTestCase.java (original)
+++ axis/axis1/java/trunk/integration/src/test/java/test/wsdl/document/TestServiceServiceTestCase.java Fri Mar 9 22:24:59 2012
@@ -10,6 +10,8 @@ package test.wsdl.document;
import org.apache.axis.utils.XMLUtils;
import org.w3c.dom.Element;
+import test.HttpTestUtil;
+
public class TestServiceServiceTestCase extends junit.framework.TestCase {
String xml = "<hello>world</hello>";
public TestServiceServiceTestCase(java.lang.String name) {
@@ -18,7 +20,7 @@ public class TestServiceServiceTestCase
public void testDocumentTestWSDL() throws Exception {
javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
- java.net.URL url = new java.net.URL(new test.wsdl.document.TestServiceServiceLocator().getDocumentTestAddress() + "?WSDL");
+ java.net.URL url = HttpTestUtil.getTestEndpoint(new test.wsdl.document.TestServiceServiceLocator().getDocumentTestAddress() + "?WSDL");
javax.xml.rpc.Service service = serviceFactory.createService(url, new test.wsdl.document.TestServiceServiceLocator().getServiceName());
assertTrue(service != null);
}
@@ -26,8 +28,8 @@ public class TestServiceServiceTestCase
public void test1DocumentTestGetElement() throws Exception {
test.wsdl.document.DocumentTestSoapBindingStub binding;
try {
- binding = (test.wsdl.document.DocumentTestSoapBindingStub)
- new test.wsdl.document.TestServiceServiceLocator().getDocumentTest();
+ TestServiceServiceLocator loc = new TestServiceServiceLocator();
+ binding = (DocumentTestSoapBindingStub)loc.getDocumentTest(HttpTestUtil.getTestEndpoint(loc.getDocumentTestAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
@@ -50,8 +52,8 @@ public class TestServiceServiceTestCase
public void test2DocumentTestGetDocument() throws Exception {
test.wsdl.document.DocumentTestSoapBindingStub binding;
try {
- binding = (test.wsdl.document.DocumentTestSoapBindingStub)
- new test.wsdl.document.TestServiceServiceLocator().getDocumentTest();
+ TestServiceServiceLocator loc = new TestServiceServiceLocator();
+ binding = (DocumentTestSoapBindingStub)loc.getDocumentTest(HttpTestUtil.getTestEndpoint(loc.getDocumentTestAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
Modified: axis/axis1/java/trunk/integration/src/test/java/test/wsdl/echo/ComplexEchoServiceTestCase.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/wsdl/echo/ComplexEchoServiceTestCase.java?rev=1299078&r1=1299077&r2=1299078&view=diff
==============================================================================
--- axis/axis1/java/trunk/integration/src/test/java/test/wsdl/echo/ComplexEchoServiceTestCase.java (original)
+++ axis/axis1/java/trunk/integration/src/test/java/test/wsdl/echo/ComplexEchoServiceTestCase.java Fri Mar 9 22:24:59 2012
@@ -7,6 +7,8 @@
package test.wsdl.echo;
+import test.HttpTestUtil;
+
public class ComplexEchoServiceTestCase extends junit.framework.TestCase {
public ComplexEchoServiceTestCase(String name) {
super(name);
@@ -14,15 +16,16 @@ public class ComplexEchoServiceTestCase
public void testComplexEchoServiceWSDL() throws Exception {
javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
- java.net.URL url = new java.net.URL(new test.wsdl.echo.ComplexEchoServiceLocator().getComplexEchoServiceAddress() + "?WSDL");
+ java.net.URL url = HttpTestUtil.getTestEndpoint(new test.wsdl.echo.ComplexEchoServiceLocator().getComplexEchoServiceAddress() + "?WSDL");
javax.xml.rpc.Service service = serviceFactory.createService(url, new test.wsdl.echo.ComplexEchoServiceLocator().getServiceName());
assertTrue(service != null);
}
- public void test1ComplexEchoServiceEcho() {
+ public void test1ComplexEchoServiceEcho() throws Exception {
test.wsdl.echo.Echo binding;
try {
- binding = new test.wsdl.echo.ComplexEchoServiceLocator().getComplexEchoService();
+ ComplexEchoServiceLocator loc = new ComplexEchoServiceLocator();
+ binding = loc.getComplexEchoService(HttpTestUtil.getTestEndpoint(loc.getComplexEchoServiceAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
@@ -44,8 +47,8 @@ public class ComplexEchoServiceTestCase
public void test2ComplexEchoServiceEcho2() throws Exception {
test.wsdl.echo.ComplexEchoServiceSoapBindingStub binding;
try {
- binding = (test.wsdl.echo.ComplexEchoServiceSoapBindingStub)
- new test.wsdl.echo.ComplexEchoServiceLocator().getComplexEchoService();
+ ComplexEchoServiceLocator loc = new ComplexEchoServiceLocator();
+ binding = (ComplexEchoServiceSoapBindingStub)loc.getComplexEchoService(HttpTestUtil.getTestEndpoint(loc.getComplexEchoServiceAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
if (jre.getLinkedCause() != null)
@@ -75,8 +78,8 @@ public class ComplexEchoServiceTestCase
public void test2ComplexEchoServiceEcho21() throws Exception {
test.wsdl.echo.ComplexEchoServiceSoapBindingStub binding;
try {
- binding = (test.wsdl.echo.ComplexEchoServiceSoapBindingStub)
- new test.wsdl.echo.ComplexEchoServiceLocator().getComplexEchoService();
+ ComplexEchoServiceLocator loc = new ComplexEchoServiceLocator();
+ binding = (ComplexEchoServiceSoapBindingStub)loc.getComplexEchoService(HttpTestUtil.getTestEndpoint(loc.getComplexEchoServiceAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
if (jre.getLinkedCause() != null)
Modified: axis/axis1/java/trunk/integration/src/test/java/test/wsdl/echo2/Echo2ServiceTestCase.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/wsdl/echo2/Echo2ServiceTestCase.java?rev=1299078&r1=1299077&r2=1299078&view=diff
==============================================================================
--- axis/axis1/java/trunk/integration/src/test/java/test/wsdl/echo2/Echo2ServiceTestCase.java (original)
+++ axis/axis1/java/trunk/integration/src/test/java/test/wsdl/echo2/Echo2ServiceTestCase.java Fri Mar 9 22:24:59 2012
@@ -13,6 +13,8 @@ import org.apache.axis.message.MessageEl
import org.apache.axis.message.PrefixedQName;
import org.apache.axis.message.SOAPBody;
+import test.HttpTestUtil;
+
public class Echo2ServiceTestCase extends junit.framework.TestCase {
public Echo2ServiceTestCase(java.lang.String name) {
super(name);
@@ -21,7 +23,7 @@ public class Echo2ServiceTestCase extend
public void testEcho2WSDL() throws Exception {
javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory
.newInstance();
- java.net.URL url = new java.net.URL(
+ java.net.URL url = HttpTestUtil.getTestEndpoint(
new test.wsdl.echo2.Echo2ServiceLocator().getEcho2Address()
+ "?WSDL");
javax.xml.rpc.Service service = serviceFactory.createService(url,
@@ -31,8 +33,8 @@ public class Echo2ServiceTestCase extend
public void test1Echo2EchoMyBase64Bean() throws Exception {
test.wsdl.echo2.Echo2SoapBindingStub binding;
- binding = (test.wsdl.echo2.Echo2SoapBindingStub) new test.wsdl.echo2.Echo2ServiceLocator()
- .getEcho2();
+ Echo2ServiceLocator loc = new Echo2ServiceLocator();
+ binding = (Echo2SoapBindingStub)loc.getEcho2(HttpTestUtil.getTestEndpoint(loc.getEcho2Address()));
assertNotNull("binding is null", binding);
// Time out after a minute
binding.setTimeout(60000);
@@ -126,8 +128,8 @@ public class Echo2ServiceTestCase extend
public void test1Echo2EchoArrayOfMyBase64Bean() throws Exception {
test.wsdl.echo2.Echo2SoapBindingStub binding;
- binding = (test.wsdl.echo2.Echo2SoapBindingStub) new test.wsdl.echo2.Echo2ServiceLocator()
- .getEcho2();
+ Echo2ServiceLocator loc = new Echo2ServiceLocator();
+ binding = (Echo2SoapBindingStub)loc.getEcho2(HttpTestUtil.getTestEndpoint(loc.getEcho2Address()));
assertNotNull("binding is null", binding);
// Time out after a minute
binding.setTimeout(60000);
@@ -158,7 +160,7 @@ public class Echo2ServiceTestCase extend
test.wsdl.echo2.Echo2SoapBindingStub binding;
Echo2ServiceLocator loc = new test.wsdl.echo2.Echo2ServiceLocator();
try {
- binding = (test.wsdl.echo2.Echo2SoapBindingStub)loc.getEcho2();
+ binding = (Echo2SoapBindingStub)loc.getEcho2(HttpTestUtil.getTestEndpoint(loc.getEcho2Address()));
} catch (javax.xml.rpc.ServiceException jre) {
if (jre.getLinkedCause() != null)
jre.getLinkedCause().printStackTrace();
@@ -205,8 +207,8 @@ public class Echo2ServiceTestCase extend
public void test3Echo2EchoArrayOfString_SoapEncArray() throws Exception {
test.wsdl.echo2.Echo2SoapBindingStub binding;
try {
- binding = (test.wsdl.echo2.Echo2SoapBindingStub) new test.wsdl.echo2.Echo2ServiceLocator()
- .getEcho2();
+ Echo2ServiceLocator loc = new Echo2ServiceLocator();
+ binding = (Echo2SoapBindingStub)loc.getEcho2(HttpTestUtil.getTestEndpoint(loc.getEcho2Address()));
} catch (javax.xml.rpc.ServiceException jre) {
if (jre.getLinkedCause() != null)
jre.getLinkedCause().printStackTrace();
Modified: axis/axis1/java/trunk/integration/src/test/java/test/wsdl/esr/EsrTestServiceTestCase.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/wsdl/esr/EsrTestServiceTestCase.java?rev=1299078&r1=1299077&r2=1299078&view=diff
==============================================================================
--- axis/axis1/java/trunk/integration/src/test/java/test/wsdl/esr/EsrTestServiceTestCase.java (original)
+++ axis/axis1/java/trunk/integration/src/test/java/test/wsdl/esr/EsrTestServiceTestCase.java Fri Mar 9 22:24:59 2012
@@ -7,8 +7,7 @@
package test.wsdl.esr;
-import org.apache.axis.transport.http.SimpleAxisWorker;
-import org.apache.axis.utils.NetworkUtils;
+import test.HttpTestUtil;
import javax.xml.namespace.QName;
@@ -19,7 +18,7 @@ public class EsrTestServiceTestCase exte
public void testEsrTestWSDL() throws Exception {
javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
- java.net.URL url = new java.net.URL(new test.wsdl.esr.EsrTestServiceLocator().getEsrTestAddress() + "?WSDL");
+ java.net.URL url = HttpTestUtil.getTestEndpoint(new test.wsdl.esr.EsrTestServiceLocator().getEsrTestAddress() + "?WSDL");
javax.xml.rpc.Service service = serviceFactory.createService(url, new test.wsdl.esr.EsrTestServiceLocator().getServiceName());
assertTrue(service != null);
}
@@ -27,11 +26,8 @@ public class EsrTestServiceTestCase exte
public void test1EsrTestEsrInOut() {
// Using WSDL file to make a SOAP call
try {
- String thisHost = NetworkUtils.getLocalHostname();
- String thisPort = System.getProperty("test.functional.ServicePort", "8080");
-
//load wsdl file
- String wsdlLocation = "http://" + thisHost + ":" + thisPort + "/axis/services/EsrTest?WSDL";
+ String wsdlLocation = HttpTestUtil.getTestEndpoint("http://localhost:8080/axis/services/EsrTest") + "?WSDL";
javax.xml.rpc.Service svc =
new org.apache.axis.client.Service(
wsdlLocation,
@@ -85,11 +81,8 @@ public class EsrTestServiceTestCase exte
public void test1EsrTestEsrInOut2() {
// Using WSDL file to make a SOAP call
try {
- String thisHost = NetworkUtils.getLocalHostname();
- String thisPort = System.getProperty("test.functional.ServicePort", "8080");
-
//load wsdl file
- String wsdlLocation = "http://" + thisHost + ":" + thisPort + "/axis/services/EsrTest?WSDL";
+ String wsdlLocation = HttpTestUtil.getTestEndpoint("http://localhost:8080/axis/services/EsrTest") + "?WSDL";
javax.xml.rpc.Service svc =
new org.apache.axis.client.Service(
wsdlLocation,
Modified: axis/axis1/java/trunk/integration/src/test/java/test/wsdl/extension/PlanWSTestCase.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/wsdl/extension/PlanWSTestCase.java?rev=1299078&r1=1299077&r2=1299078&view=diff
==============================================================================
--- axis/axis1/java/trunk/integration/src/test/java/test/wsdl/extension/PlanWSTestCase.java (original)
+++ axis/axis1/java/trunk/integration/src/test/java/test/wsdl/extension/PlanWSTestCase.java Fri Mar 9 22:24:59 2012
@@ -7,6 +7,8 @@
package test.wsdl.extension;
+import test.HttpTestUtil;
+
public class PlanWSTestCase extends junit.framework.TestCase {
public PlanWSTestCase(java.lang.String name) {
super(name);
@@ -14,7 +16,7 @@ public class PlanWSTestCase extends juni
public void testPlanWSSoapWSDL() throws Exception {
javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
- java.net.URL url = new java.net.URL(new test.wsdl.extension.PlanWSLocator().getPlanWSSoapAddress() + "?WSDL");
+ java.net.URL url = HttpTestUtil.getTestEndpoint(new test.wsdl.extension.PlanWSLocator().getPlanWSSoapAddress() + "?WSDL");
javax.xml.rpc.Service service = serviceFactory.createService(url, new test.wsdl.extension.PlanWSLocator().getServiceName());
assertTrue(service != null);
}
@@ -22,8 +24,8 @@ public class PlanWSTestCase extends juni
public void test1PlanWSSoapGetPlan() throws Exception {
test.wsdl.extension.PlanWSSoapStub binding;
try {
- binding = (test.wsdl.extension.PlanWSSoapStub)
- new test.wsdl.extension.PlanWSLocator().getPlanWSSoap();
+ PlanWSLocator loc = new PlanWSLocator();
+ binding = (PlanWSSoapStub)loc.getPlanWSSoap(HttpTestUtil.getTestEndpoint(loc.getPlanWSSoapAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
Modified: axis/axis1/java/trunk/integration/src/test/java/test/wsdl/faults/FaultServiceTestCase.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/wsdl/faults/FaultServiceTestCase.java?rev=1299078&r1=1299077&r2=1299078&view=diff
==============================================================================
--- axis/axis1/java/trunk/integration/src/test/java/test/wsdl/faults/FaultServiceTestCase.java (original)
+++ axis/axis1/java/trunk/integration/src/test/java/test/wsdl/faults/FaultServiceTestCase.java Fri Mar 9 22:24:59 2012
@@ -7,6 +7,8 @@
package test.wsdl.faults;
+import test.HttpTestUtil;
+
@@ -24,10 +26,11 @@ public class FaultServiceTestCase extend
}
*/
- public void testFaultServiceGetQuote() {
+ public void testFaultServiceGetQuote() throws Exception {
test.wsdl.faults.FaultServicePortType binding;
try {
- binding = new FaultServiceLocator().getFaultService();
+ FaultServiceLocator loc = new FaultServiceLocator();
+ binding = loc.getFaultService(HttpTestUtil.getTestEndpoint(loc.getFaultServiceAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
throw new junit.framework.
@@ -57,7 +60,8 @@ public class FaultServiceTestCase extend
public void testFaultServiceThrowFault() throws Exception {
test.wsdl.faults.FaultServicePortType binding;
try {
- binding = new FaultServiceLocator().getFaultService();
+ FaultServiceLocator loc = new FaultServiceLocator();
+ binding = loc.getFaultService(HttpTestUtil.getTestEndpoint(loc.getFaultServiceAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
throw new junit.framework.
@@ -94,10 +98,11 @@ public class FaultServiceTestCase extend
}
}
- public void testFaultServiceThrowExtensionFault() {
+ public void testFaultServiceThrowExtensionFault() throws Exception {
test.wsdl.faults.FaultServicePortType binding;
try {
- binding = new FaultServiceLocator().getFaultService();
+ FaultServiceLocator loc = new FaultServiceLocator();
+ binding = loc.getFaultService(HttpTestUtil.getTestEndpoint(loc.getFaultServiceAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
throw new junit.framework.
Modified: axis/axis1/java/trunk/integration/src/test/java/test/wsdl/gateway/GatewayServiceTestCase.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/wsdl/gateway/GatewayServiceTestCase.java?rev=1299078&r1=1299077&r2=1299078&view=diff
==============================================================================
--- axis/axis1/java/trunk/integration/src/test/java/test/wsdl/gateway/GatewayServiceTestCase.java (original)
+++ axis/axis1/java/trunk/integration/src/test/java/test/wsdl/gateway/GatewayServiceTestCase.java Fri Mar 9 22:24:59 2012
@@ -7,6 +7,8 @@
package test.wsdl.gateway;
+import test.HttpTestUtil;
+
public class GatewayServiceTestCase extends junit.framework.TestCase {
public GatewayServiceTestCase(java.lang.String name) {
super(name);
@@ -14,7 +16,8 @@ public class GatewayServiceTestCase exte
public void test1GatewayTest1() throws Exception {
test.wsdl.gateway.Gateway binding;
try {
- binding = new test.wsdl.gateway.GatewayServiceLocator().getGateway();
+ GatewayServiceLocator loc = new GatewayServiceLocator();
+ binding = loc.getGateway(HttpTestUtil.getTestEndpoint(loc.getGatewayAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
@@ -34,7 +37,8 @@ public class GatewayServiceTestCase exte
public void test2GatewayTest2() throws Exception {
test.wsdl.gateway.Gateway binding;
try {
- binding = new test.wsdl.gateway.GatewayServiceLocator().getGateway();
+ GatewayServiceLocator loc = new GatewayServiceLocator();
+ binding = loc.getGateway(HttpTestUtil.getTestEndpoint(loc.getGatewayAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
@@ -53,7 +57,8 @@ public class GatewayServiceTestCase exte
public void test3GatewayTest3() throws Exception {
test.wsdl.gateway.Gateway binding;
try {
- binding = new test.wsdl.gateway.GatewayServiceLocator().getGateway();
+ GatewayServiceLocator loc = new GatewayServiceLocator();
+ binding = loc.getGateway(HttpTestUtil.getTestEndpoint(loc.getGatewayAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
@@ -71,7 +76,8 @@ public class GatewayServiceTestCase exte
public void test4GatewayTest4() throws Exception {
test.wsdl.gateway.Gateway binding;
try {
- binding = new test.wsdl.gateway.GatewayServiceLocator().getGateway();
+ GatewayServiceLocator loc = new GatewayServiceLocator();
+ binding = loc.getGateway(HttpTestUtil.getTestEndpoint(loc.getGatewayAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
Modified: axis/axis1/java/trunk/integration/src/test/java/test/wsdl/header/HeaderServiceTestCase.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/wsdl/header/HeaderServiceTestCase.java?rev=1299078&r1=1299077&r2=1299078&view=diff
==============================================================================
--- axis/axis1/java/trunk/integration/src/test/java/test/wsdl/header/HeaderServiceTestCase.java (original)
+++ axis/axis1/java/trunk/integration/src/test/java/test/wsdl/header/HeaderServiceTestCase.java Fri Mar 9 22:24:59 2012
@@ -7,6 +7,8 @@
package test.wsdl.header;
+import test.HttpTestUtil;
+
public class HeaderServiceTestCase extends junit.framework.TestCase {
public HeaderServiceTestCase(java.lang.String name) {
super(name);
@@ -25,8 +27,8 @@ public class HeaderServiceTestCase exten
public void test1headerOp1() throws Exception {
test.wsdl.header.BindingStub binding;
try {
- binding = (test.wsdl.header.BindingStub)
- new test.wsdl.header.HeaderServiceLocator().getheader();
+ HeaderServiceLocator loc = new HeaderServiceLocator();
+ binding = (BindingStub)loc.getheader(HttpTestUtil.getTestEndpoint(loc.getheaderAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
@@ -52,8 +54,8 @@ public class HeaderServiceTestCase exten
public void test2headerOp2() throws Exception {
test.wsdl.header.BindingStub binding;
try {
- binding = (test.wsdl.header.BindingStub)
- new test.wsdl.header.HeaderServiceLocator().getheader();
+ HeaderServiceLocator loc = new HeaderServiceLocator();
+ binding = (BindingStub)loc.getheader(HttpTestUtil.getTestEndpoint(loc.getheaderAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
Added: axis/axis1/java/trunk/integration/src/test/java/test/wsdl/include/IncludeTestTestCase.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/wsdl/include/IncludeTestTestCase.java?rev=1299078&view=auto
==============================================================================
--- axis/axis1/java/trunk/integration/src/test/java/test/wsdl/include/IncludeTestTestCase.java (added)
+++ axis/axis1/java/trunk/integration/src/test/java/test/wsdl/include/IncludeTestTestCase.java Fri Mar 9 22:24:59 2012
@@ -0,0 +1,67 @@
+/**
+ * IncludeTestTestCase.java
+ *
+ * This file was auto-generated from WSDL
+ * by the Apache Axis 1.4.1-SNAPSHOT Mar 09, 2012 (11:21:16 GMT) WSDL2Java emitter.
+ */
+
+package test.wsdl.include;
+
+import test.HttpTestUtil;
+
+public class IncludeTestTestCase extends junit.framework.TestCase {
+ public IncludeTestTestCase(java.lang.String name) {
+ super(name);
+ }
+
+ public void testIncludeTestWSDL() throws Exception {
+ javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
+ java.net.URL url = HttpTestUtil.getTestEndpoint(new test.wsdl.include.IncludeTestLocator().getIncludeTestAddress() + "?WSDL");
+ javax.xml.rpc.Service service = serviceFactory.createService(url, new test.wsdl.include.IncludeTestLocator().getServiceName());
+ assertTrue(service != null);
+ }
+
+ public void test1IncludeTestAddEntry() throws Exception {
+ test.wsdl.include.AddressBookSOAPBindingStub binding;
+ try {
+ IncludeTestLocator loc = new IncludeTestLocator();
+ binding = (AddressBookSOAPBindingStub)loc.getIncludeTest(HttpTestUtil.getTestEndpoint(loc.getIncludeTestAddress()));
+ }
+ catch (javax.xml.rpc.ServiceException jre) {
+ if(jre.getLinkedCause()!=null)
+ jre.getLinkedCause().printStackTrace();
+ throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
+ }
+ assertNotNull("binding is null", binding);
+
+ // Time out after a minute
+ binding.setTimeout(60000);
+
+ // Test operation
+ binding.addEntry(new java.lang.String(), new test.wsdl.include.Address());
+ // TBD - validate results
+ }
+
+ public void test2IncludeTestGetAddressFromName() throws Exception {
+ test.wsdl.include.AddressBookSOAPBindingStub binding;
+ try {
+ IncludeTestLocator loc = new IncludeTestLocator();
+ binding = (AddressBookSOAPBindingStub)loc.getIncludeTest(HttpTestUtil.getTestEndpoint(loc.getIncludeTestAddress()));
+ }
+ catch (javax.xml.rpc.ServiceException jre) {
+ if(jre.getLinkedCause()!=null)
+ jre.getLinkedCause().printStackTrace();
+ throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught: " + jre);
+ }
+ assertNotNull("binding is null", binding);
+
+ // Time out after a minute
+ binding.setTimeout(60000);
+
+ // Test operation
+ test.wsdl.include.Address value = null;
+ value = binding.getAddressFromName(new java.lang.String());
+ // TBD - validate results
+ }
+
+}
Propchange: axis/axis1/java/trunk/integration/src/test/java/test/wsdl/include/IncludeTestTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: axis/axis1/java/trunk/integration/src/test/java/test/wsdl/inout/DetailedInoutTestCase.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/wsdl/inout/DetailedInoutTestCase.java?rev=1299078&r1=1299077&r2=1299078&view=diff
==============================================================================
--- axis/axis1/java/trunk/integration/src/test/java/test/wsdl/inout/DetailedInoutTestCase.java (original)
+++ axis/axis1/java/trunk/integration/src/test/java/test/wsdl/inout/DetailedInoutTestCase.java Fri Mar 9 22:24:59 2012
@@ -3,6 +3,8 @@ package test.wsdl.inout;
import junit.framework.AssertionFailedError;
import junit.framework.TestCase;
import org.apache.axis.holders.DateHolder;
+
+import test.HttpTestUtil;
import test.wsdl.inout.holders.AddressHolder;
import test.wsdl.inout.holders.PhoneHolder;
@@ -50,9 +52,10 @@ public class DetailedInoutTestCase exten
returnPhone.setNumber("two");
returnAddress.setPhoneNumber(returnPhone);
try {
- io = new InoutServiceLocator().getInoutService();
+ InoutServiceLocator loc = new InoutServiceLocator();
+ io = loc.getInoutService(HttpTestUtil.getTestEndpoint(loc.getInoutServiceAddress()));
}
- catch (ServiceException jre) {
+ catch (Exception jre) {
throw new AssertionFailedError("JAX-RPC ServiceException: " + jre);
}
}
Modified: axis/axis1/java/trunk/integration/src/test/java/test/wsdl/jaxrpcdynproxy/JAXRPCDynProxyTestCase.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/wsdl/jaxrpcdynproxy/JAXRPCDynProxyTestCase.java?rev=1299078&r1=1299077&r2=1299078&view=diff
==============================================================================
--- axis/axis1/java/trunk/integration/src/test/java/test/wsdl/jaxrpcdynproxy/JAXRPCDynProxyTestCase.java (original)
+++ axis/axis1/java/trunk/integration/src/test/java/test/wsdl/jaxrpcdynproxy/JAXRPCDynProxyTestCase.java Fri Mar 9 22:24:59 2012
@@ -4,6 +4,8 @@ import javax.xml.namespace.QName;
import javax.xml.rpc.Service;
import javax.xml.rpc.ServiceFactory;
import java.net.URL;
+
+import test.HttpTestUtil;
import test.wsdl.jaxrpcdynproxy.holders.AddressBeanHolder;
import junit.framework.TestCase;
import java.net.URL;
@@ -29,7 +31,7 @@ public class JAXRPCDynProxyTestCase exte
}
public void testInOut() throws Exception {
- URL urlWsdl = new URL("http://localhost:8080/axis/services/AddressInOut?wsdl");
+ URL urlWsdl = HttpTestUtil.getTestEndpoint("http://localhost:8080/axis/services/AddressInOut?wsdl");
String nameSpaceUri = "http://jaxrpcdynproxy.wsdl.test";
String serviceName = "AddressInOut";
String portName = "AddressInOut";
Modified: axis/axis1/java/trunk/integration/src/test/java/test/wsdl/jaxrpchandler2/JAXRPCHandler2TestCase.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/wsdl/jaxrpchandler2/JAXRPCHandler2TestCase.java?rev=1299078&r1=1299077&r2=1299078&view=diff
==============================================================================
--- axis/axis1/java/trunk/integration/src/test/java/test/wsdl/jaxrpchandler2/JAXRPCHandler2TestCase.java (original)
+++ axis/axis1/java/trunk/integration/src/test/java/test/wsdl/jaxrpchandler2/JAXRPCHandler2TestCase.java Fri Mar 9 22:24:59 2012
@@ -6,6 +6,9 @@ import javax.xml.namespace.QName;
import javax.xml.rpc.Call;
import javax.xml.rpc.Service;
import javax.xml.rpc.ServiceFactory;
+
+import test.HttpTestUtil;
+
import java.rmi.RemoteException;
public class JAXRPCHandler2TestCase extends TestCase {
@@ -16,7 +19,7 @@ public class JAXRPCHandler2TestCase exte
public void testJAXRPCHandler2() throws Exception {
String serviceEndpointUrl =
- "http://localhost:8080/axis/services/EchoService2";
+ HttpTestUtil.getTestEndpoint("http://localhost:8080/axis/services/EchoService2").toString();
String qnameService = "EchoService2";
String qnamePort = "EchoServicePort";
Call call;
@@ -40,7 +43,7 @@ public class JAXRPCHandler2TestCase exte
public void testJAXRPCHandler3() throws Exception {
String serviceEndpointUrl =
- "http://localhost:8080/axis/services/EchoService3";
+ HttpTestUtil.getTestEndpoint("http://localhost:8080/axis/services/EchoService3").toString();
String qnameService = "EchoService3";
String qnamePort = "EchoServicePort";
Call call;
Modified: axis/axis1/java/trunk/integration/src/test/java/test/wsdl/map/MapServiceTestCase.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/wsdl/map/MapServiceTestCase.java?rev=1299078&r1=1299077&r2=1299078&view=diff
==============================================================================
--- axis/axis1/java/trunk/integration/src/test/java/test/wsdl/map/MapServiceTestCase.java (original)
+++ axis/axis1/java/trunk/integration/src/test/java/test/wsdl/map/MapServiceTestCase.java Fri Mar 9 22:24:59 2012
@@ -8,6 +8,8 @@ package test.wsdl.map;
import java.util.Map;
import java.util.HashMap;
+import test.HttpTestUtil;
+
public class MapServiceTestCase extends junit.framework.TestCase {
public MapServiceTestCase(java.lang.String name) {
super(name);
@@ -15,7 +17,8 @@ public class MapServiceTestCase extends
public void test1EchoMap() throws Exception {
test.wsdl.map.MapService binding;
try {
- binding = new MapServiceServiceLocator().getMapService();
+ MapServiceServiceLocator loc = new MapServiceServiceLocator();
+ binding = loc.getMapService(HttpTestUtil.getTestEndpoint(loc.getMapServiceAddress()));
}
catch (javax.xml.rpc.ServiceException jre) {
if(jre.getLinkedCause()!=null)
Modified: axis/axis1/java/trunk/integration/src/test/java/test/wsdl/marrays/MArrayTestsServiceTestCase.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/src/test/java/test/wsdl/marrays/MArrayTestsServiceTestCase.java?rev=1299078&r1=1299077&r2=1299078&view=diff
==============================================================================
--- axis/axis1/java/trunk/integration/src/test/java/test/wsdl/marrays/MArrayTestsServiceTestCase.java (original)
+++ axis/axis1/java/trunk/integration/src/test/java/test/wsdl/marrays/MArrayTestsServiceTestCase.java Fri Mar 9 22:24:59 2012
@@ -10,6 +10,8 @@ package test.wsdl.marrays;
import java.util.HashMap;
import java.util.Map;
+import test.HttpTestUtil;
+
public class MArrayTestsServiceTestCase extends junit.framework.TestCase {
test.wsdl.marrays.MArrayTests binding;
@@ -19,13 +21,14 @@ public class MArrayTestsServiceTestCase
protected void setUp() throws Exception {
super.setUp();
- binding = new MArrayTestsServiceLocator().getMArrayTests();
+ MArrayTestsServiceLocator loc = new MArrayTestsServiceLocator();
+ binding = loc.getMArrayTests(HttpTestUtil.getTestEndpoint(loc.getMArrayTestsAddress()));
assertTrue("binding is null", binding != null);
}
public void testMArrayTestsWSDL() throws Exception {
javax.xml.rpc.ServiceFactory serviceFactory = javax.xml.rpc.ServiceFactory.newInstance();
- java.net.URL url = new java.net.URL(new test.wsdl.marrays.MArrayTestsServiceLocator().getMArrayTestsAddress() + "?WSDL");
+ java.net.URL url = HttpTestUtil.getTestEndpoint(new test.wsdl.marrays.MArrayTestsServiceLocator().getMArrayTestsAddress() + "?WSDL");
javax.xml.rpc.Service service = serviceFactory.createService(url, new test.wsdl.marrays.MArrayTestsServiceLocator().getServiceName());
assertTrue(service != null);
}