Author: heiko.braun(a)jboss.com
Date: 2007-01-26 06:06:40 -0500 (Fri, 26 Jan 2007)
New Revision: 2134
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/interop/wsa/AddressingTestCase.java
Log:
Keep ports as static members
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/interop/wsa/AddressingTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/interop/wsa/AddressingTestCase.java 2007-01-26
11:05:09 UTC (rev 2133)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/interop/wsa/AddressingTestCase.java 2007-01-26
11:06:40 UTC (rev 2134)
@@ -47,13 +47,13 @@
*/
public class AddressingTestCase extends JBossWSTest {
- private EchoPortType echoPort;
- private Notify notifyPort;
+ private static EchoPortType echoPort;
+ private static Notify notifyPort;
final static String WSA_FROM = "http://example.org/node/A";
final static String WSA_TO = "http://example.org/node/B";
- private URL wsdlLocation;
+ private static URL wsdlLocation;
private static AddressingBuilder BUILDER;
private static AddressingConstants CONSTANTS;
@@ -77,24 +77,25 @@
protected void setUp() throws Exception
{
- super.setUp();
+
+ if (echoPort==null || notifyPort==null)
+ {
+ this.wsdlLocation = new
File("resources/interop/wsa/WEB-INF/wsdl/service.wsdl").toURL();
- this.wsdlLocation = new
File("resources/interop/wsa/WEB-INF/wsdl/service.wsdl").toURL();
-
- if (echoPort == null || notifyPort==null)
- {
Service service = Service.create(wsdlLocation, new
QName("http://tempuri.org/", "WSAddressingCR"));
echoPort = service.getPort(EchoPortType.class);
notifyPort= service.getPort(Notify.class);
+
+ ((StubExt)echoPort).setConfigName("Standard WSAddressing Client");
+ ((StubExt)notifyPort).setConfigName("Standard WSAddressing Client");
+
+
((BindingProvider)echoPort).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
"http://"+getServerHost()+":8080/wsa10/echo");
+
((BindingProvider)notifyPort).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
"http://"+getServerHost()+":8080/wsa10/notify");
+
configureClient();
}
- ((StubExt)echoPort).setConfigName("Standard WSAddressing Client");
- ((StubExt)notifyPort).setConfigName("Standard WSAddressing Client");
-
((BindingProvider)echoPort).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
"http://"+getServerHost()+":8080/wsa10/echo");
-
((BindingProvider)notifyPort).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
"http://"+getServerHost()+":8080/wsa10/notify");
-
customerParam = DOMUtils.parse("<customer:CustomerKey
xmlns:customer=\"http://example.org/customer\">Key#123456789...);
faultParam = DOMUtils.parse("<customer:CustomerKey
xmlns:customer=\"http://example.org/customer\">Fault#1234567...);
wsdl1Param = DOMUtils.parse("<definitions
xmlns=\"http://schemas.xmlsoap.org/wsdl/\">insert WSDL 1.1
here!</definitions>");