JBossWS SVN: r5141 - legacy/branches.
by jbossws-commits@lists.jboss.org
Author: mageshbk(a)jboss.com
Date: 2007-11-29 02:51:46 -0500 (Thu, 29 Nov 2007)
New Revision: 5141
Added:
legacy/branches/jbossws-1.2.1.GA_CP01_JBPAPP-459/
Log:
Branch for [JBPAPP-459]
Copied: legacy/branches/jbossws-1.2.1.GA_CP01_JBPAPP-459 (from rev 5140, legacy/tags/jbossws-1.2.1.GA_CP01)
17 years, 3 months
JBossWS SVN: r5140 - in stack/native/trunk/src/test: java/org/jboss/test/ws/jaxws/wsrm/reqres and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-11-28 13:03:42 -0500 (Wed, 28 Nov 2007)
New Revision: 5140
Added:
stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAbstractOneWayTest.properties
stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAbstractReqResTest.properties
Removed:
stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAddressableOneWayTestCase.properties
stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAddressableReqResTestCase.properties
stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAnonymousOneWayTestCase.properties
stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAnonymousReqResTestCase.properties
Modified:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAbstractOneWayTest.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAddressableOneWayTestCase.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAnonymousOneWayTestCase.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAbstractReqResTest.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAddressableReqResTestCase.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAnonymousReqResTestCase.java
Log:
refactoring - removing duplicities
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAbstractOneWayTest.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAbstractOneWayTest.java 2007-11-28 17:37:19 UTC (rev 5139)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAbstractOneWayTest.java 2007-11-28 18:03:42 UTC (rev 5140)
@@ -23,7 +23,11 @@
import static org.jboss.test.ws.jaxws.wsrm.Helper.*;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
import java.net.URL;
+import java.util.Properties;
import java.util.concurrent.TimeUnit;
import javax.xml.namespace.QName;
@@ -44,15 +48,33 @@
*/
public abstract class RMAbstractOneWayTest extends JBossWSTest
{
+ private static final Properties props = new Properties();
+ private final boolean emulatorOn = Boolean.parseBoolean((String)props.get("emulator"));
+ private final String serviceURL = "http://" + getServerHost() + ":" + props.getProperty("port") + props.getProperty("path");
+
private String targetNS = "http://wsrm.jaxws.ws.test.jboss.org/";
private OneWayServiceIface proxy;
+ static
+ {
+ // load test properties
+ File propertiesFile = new File("resources/jaxws/wsrm/properties/RMAbstractOneWayTest.properties");
+ try
+ {
+ props.load(new FileInputStream(propertiesFile));
+ }
+ catch (IOException ignore)
+ {
+ ignore.printStackTrace();
+ }
+ }
+
@Override
protected void setUp() throws Exception
{
super.setUp();
QName serviceName = new QName(targetNS, "OneWayService");
- URL wsdlURL = new URL(getServiceURL() + "?wsdl");
+ URL wsdlURL = new URL(serviceURL + "?wsdl");
Service service = Service.create(wsdlURL, serviceName);
proxy = (OneWayServiceIface)service.getPort(OneWayServiceIface.class);
}
@@ -65,19 +87,19 @@
if (true) return; // disable WS-RM tests - they cause regression in hudson
RMSequence sequence = null;
- if (isEmulatorOn())
+ if (emulatorOn)
{
RMProvider wsrmProvider = (RMProvider)proxy;
sequence = wsrmProvider.createSequence(getAddressingType(), RMSequenceType.SIMPLEX);
System.out.println("Created sequence with id=" + sequence.getOutboundId());
}
- setAddrProps(proxy, "http://useless/action1", getServiceURL());
+ setAddrProps(proxy, "http://useless/action1", serviceURL);
proxy.method1();
- setAddrProps(proxy, "http://useless/action2", getServiceURL());
+ setAddrProps(proxy, "http://useless/action2", serviceURL);
proxy.method2("Hello World");
- setAddrProps(proxy, "http://useless/action3", getServiceURL());
+ setAddrProps(proxy, "http://useless/action3", serviceURL);
proxy.method3(new String[] {"Hello","World"});
- if (isEmulatorOn())
+ if (emulatorOn)
{
if (!sequence.isCompleted(1000, TimeUnit.MILLISECONDS)) {
fail("Sequence not completed within specified time amount");
@@ -87,8 +109,11 @@
}
}
+ public static String getClasspath()
+ {
+ return props.getProperty("archives");
+ }
+
protected abstract RMAddressingType getAddressingType();
- protected abstract boolean isEmulatorOn();
- protected abstract String getServiceURL();
}
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAddressableOneWayTestCase.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAddressableOneWayTestCase.java 2007-11-28 17:37:19 UTC (rev 5139)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAddressableOneWayTestCase.java 2007-11-28 18:03:42 UTC (rev 5140)
@@ -21,11 +21,6 @@
*/
package org.jboss.test.ws.jaxws.wsrm.oneway;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.util.Properties;
-
import junit.framework.Test;
import org.jboss.ws.extensions.wsrm.api.RMAddressingType;
@@ -41,27 +36,9 @@
public final class RMAddressableOneWayTestCase extends RMAbstractOneWayTest
{
- private static final Properties props = new Properties();
- private final boolean emulatorOn = Boolean.parseBoolean((String)props.get("emulator"));
- private final String serviceURL = "http://" + getServerHost() + ":" + props.getProperty("port") + props.getProperty("path");
-
- static
- {
- // load test properties
- File propertiesFile = new File("resources/jaxws/wsrm/properties/RMAddressableOneWayTestCase.properties");
- try
- {
- props.load(new FileInputStream(propertiesFile));
- }
- catch (IOException ignore)
- {
- ignore.printStackTrace();
- }
- }
-
public static Test suite()
{
- return new JBossWSTestSetup(RMAddressableOneWayTestCase.class, props.getProperty("archives"));
+ return new JBossWSTestSetup(RMAddressableOneWayTestCase.class, getClasspath());
}
public final RMAddressingType getAddressingType()
@@ -69,14 +46,4 @@
return RMAddressingType.ADDRESSABLE;
}
- public final boolean isEmulatorOn()
- {
- return this.emulatorOn;
- }
-
- public final String getServiceURL()
- {
- return this.serviceURL;
- }
-
}
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAnonymousOneWayTestCase.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAnonymousOneWayTestCase.java 2007-11-28 17:37:19 UTC (rev 5139)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAnonymousOneWayTestCase.java 2007-11-28 18:03:42 UTC (rev 5140)
@@ -41,43 +41,14 @@
public final class RMAnonymousOneWayTestCase extends RMAbstractOneWayTest
{
- private static final Properties props = new Properties();
- private final boolean emulatorOn = Boolean.parseBoolean((String)props.get("emulator"));
- private final String serviceURL = "http://" + getServerHost() + ":" + props.getProperty("port") + props.getProperty("path");
-
- static
- {
- // load test properties
- File propertiesFile = new File("resources/jaxws/wsrm/properties/RMAnonymousOneWayTestCase.properties");
- try
- {
- props.load(new FileInputStream(propertiesFile));
- }
- catch (IOException ignore)
- {
- ignore.printStackTrace();
- }
- }
-
public static Test suite()
{
- return new JBossWSTestSetup(RMAnonymousOneWayTestCase.class, props.getProperty("archives"));
+ return new JBossWSTestSetup(RMAnonymousOneWayTestCase.class, getClasspath());
}
-
public final RMAddressingType getAddressingType()
{
return RMAddressingType.ANONYMOUS;
}
-
- public final boolean isEmulatorOn()
- {
- return this.emulatorOn;
- }
-
- public final String getServiceURL()
- {
- return this.serviceURL;
- }
}
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAbstractReqResTest.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAbstractReqResTest.java 2007-11-28 17:37:19 UTC (rev 5139)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAbstractReqResTest.java 2007-11-28 18:03:42 UTC (rev 5140)
@@ -23,7 +23,11 @@
import static org.jboss.test.ws.jaxws.wsrm.Helper.*;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
import java.net.URL;
+import java.util.Properties;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
@@ -50,10 +54,27 @@
{
private static final String HELLO_WORLD_MSG = "Hello World";
private static final String TARGET_NS = "http://org.jboss.ws/jaxws/wsrm";
+ private static final Properties props = new Properties();
+ private final String serviceURL = "http://" + getServerHost() + ":" + props.getProperty("port") + props.getProperty("path");
+ private final boolean emulatorOn = Boolean.parseBoolean((String)props.get("emulator"));
private Exception handlerException;
private boolean asyncHandlerCalled;
private ReqResServiceIface proxy;
+ static
+ {
+ // load test properties
+ File propertiesFile = new File("resources/jaxws/wsrm/properties/RMAbstractReqResTest.properties");
+ try
+ {
+ props.load(new FileInputStream(propertiesFile));
+ }
+ catch (IOException ioe)
+ {
+ ioe.printStackTrace();
+ }
+ }
+
private enum InvocationType
{
SYNC, ASYNC, ASYNC_FUTURE
@@ -67,7 +88,7 @@
if (proxy == null)
{
QName serviceName = new QName(TARGET_NS, "ReqResService");
- URL wsdlURL = new URL(getServiceURL() + "?wsdl");
+ URL wsdlURL = new URL(serviceURL + "?wsdl");
Service service = Service.create(wsdlURL, serviceName);
proxy = (ReqResServiceIface)service.getPort(ReqResServiceIface.class);
}
@@ -148,20 +169,20 @@
if (true) return; // disable WS-RM tests - they cause regression in hudson
RMSequence sequence = null;
- if (isEmulatorOn())
+ if (emulatorOn)
{
RMProvider wsrmProvider = (RMProvider)proxyObject;
sequence = wsrmProvider.createSequence(getAddressingType(), RMSequenceType.DUPLEX);
System.out.println("Created sequence with outbound id=" + sequence.getOutboundId());
System.out.println("Created sequence with inbound id=" + sequence.getInboundId());
}
- setAddrProps(proxy, "http://useless/action", getServiceURL());
+ setAddrProps(proxy, "http://useless/action", serviceURL);
invokeWebServiceMethod(invocationType);
- setAddrProps(proxy, "http://useless/action", getServiceURL());
+ setAddrProps(proxy, "http://useless/action", serviceURL);
invokeWebServiceMethod(invocationType);
- setAddrProps(proxy, "http://useless/action", getServiceURL());
+ setAddrProps(proxy, "http://useless/action", serviceURL);
invokeWebServiceMethod(invocationType);
- if (isEmulatorOn())
+ if (emulatorOn)
{
if (!sequence.isCompleted(1000, TimeUnit.MILLISECONDS)) {
sequence.discard();
@@ -172,8 +193,11 @@
}
}
+ public static String getClasspath()
+ {
+ return props.getProperty("archives");
+ }
+
protected abstract RMAddressingType getAddressingType();
- protected abstract boolean isEmulatorOn();
- protected abstract String getServiceURL();
}
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAddressableReqResTestCase.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAddressableReqResTestCase.java 2007-11-28 17:37:19 UTC (rev 5139)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAddressableReqResTestCase.java 2007-11-28 18:03:42 UTC (rev 5140)
@@ -21,11 +21,6 @@
*/
package org.jboss.test.ws.jaxws.wsrm.reqres;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.util.Properties;
-
import junit.framework.Test;
import org.jboss.ws.extensions.wsrm.api.RMAddressingType;
@@ -41,27 +36,9 @@
public final class RMAddressableReqResTestCase extends RMAbstractReqResTest
{
- private static final Properties props = new Properties();
- private final String serviceURL = "http://" + getServerHost() + ":" + props.getProperty("port") + props.getProperty("path");
- private final boolean emulatorOn = Boolean.parseBoolean((String)props.get("emulator"));
-
- static
- {
- // load test properties
- File propertiesFile = new File("resources/jaxws/wsrm/properties/RMAddressableReqResTestCase.properties");
- try
- {
- props.load(new FileInputStream(propertiesFile));
- }
- catch (IOException ioe)
- {
- ioe.printStackTrace();
- }
- }
-
public static Test suite()
{
- return new JBossWSTestSetup(RMAddressableReqResTestCase.class, props.getProperty("archives"));
+ return new JBossWSTestSetup(RMAddressableReqResTestCase.class, getClasspath());
}
public final RMAddressingType getAddressingType()
@@ -69,14 +46,4 @@
return RMAddressingType.ADDRESSABLE;
}
- public final boolean isEmulatorOn()
- {
- return this.emulatorOn;
- }
-
- public final String getServiceURL()
- {
- return this.serviceURL;
- }
-
}
Modified: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAnonymousReqResTestCase.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAnonymousReqResTestCase.java 2007-11-28 17:37:19 UTC (rev 5139)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAnonymousReqResTestCase.java 2007-11-28 18:03:42 UTC (rev 5140)
@@ -21,11 +21,6 @@
*/
package org.jboss.test.ws.jaxws.wsrm.reqres;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.util.Properties;
-
import junit.framework.Test;
import org.jboss.ws.extensions.wsrm.api.RMAddressingType;
@@ -41,27 +36,9 @@
public final class RMAnonymousReqResTestCase extends RMAbstractReqResTest
{
- private static final Properties props = new Properties();
- private final String serviceURL = "http://" + getServerHost() + ":" + props.getProperty("port") + props.getProperty("path");
- private final boolean emulatorOn = Boolean.parseBoolean((String)props.get("emulator"));
-
- static
- {
- // load test properties
- File propertiesFile = new File("resources/jaxws/wsrm/properties/RMAnonymousReqResTestCase.properties");
- try
- {
- props.load(new FileInputStream(propertiesFile));
- }
- catch (IOException ioe)
- {
- ioe.printStackTrace();
- }
- }
-
public static Test suite()
{
- return new JBossWSTestSetup(RMAnonymousReqResTestCase.class, props.getProperty("archives"));
+ return new JBossWSTestSetup(RMAnonymousReqResTestCase.class, getClasspath());
}
public final RMAddressingType getAddressingType()
@@ -69,14 +46,4 @@
return RMAddressingType.ANONYMOUS;
}
- public final boolean isEmulatorOn()
- {
- return this.emulatorOn;
- }
-
- public final String getServiceURL()
- {
- return this.serviceURL;
- }
-
}
Added: stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAbstractOneWayTest.properties
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAbstractOneWayTest.properties (rev 0)
+++ stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAbstractOneWayTest.properties 2007-11-28 18:03:42 UTC (rev 5140)
@@ -0,0 +1,7 @@
+port=8080
+#path=/jaxws-wsrm/OneWayService
+path=/jaxws-wsrm-one-way-emulator/OneWayService
+#archives=jaxws-wsrm.war, jaxws-wsrm-client.jar
+archives=jaxws-wsrm-one-way-emulator.war, jaxws-wsrm-client.jar
+emulator=true
+
Added: stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAbstractReqResTest.properties
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAbstractReqResTest.properties (rev 0)
+++ stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAbstractReqResTest.properties 2007-11-28 18:03:42 UTC (rev 5140)
@@ -0,0 +1,7 @@
+port=8080
+#path=/jaxws-wsrm/ReqResService
+path=/jaxws-wsrm-req-res-emulator/ReqResService
+#archives=jaxws-wsrm.war, jaxws-wsrm-client.jar
+archives=jaxws-wsrm-req-res-emulator.war, jaxws-wsrm-client.jar
+emulator=true
+
Deleted: stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAddressableOneWayTestCase.properties
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAddressableOneWayTestCase.properties 2007-11-28 17:37:19 UTC (rev 5139)
+++ stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAddressableOneWayTestCase.properties 2007-11-28 18:03:42 UTC (rev 5140)
@@ -1,7 +0,0 @@
-port=8080
-#path=/jaxws-wsrm/OneWayService
-path=/jaxws-wsrm-one-way-emulator/OneWayService
-#archives=jaxws-wsrm.war, jaxws-wsrm-client.jar
-archives=jaxws-wsrm-one-way-emulator.war, jaxws-wsrm-client.jar
-emulator=true
-
Deleted: stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAddressableReqResTestCase.properties
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAddressableReqResTestCase.properties 2007-11-28 17:37:19 UTC (rev 5139)
+++ stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAddressableReqResTestCase.properties 2007-11-28 18:03:42 UTC (rev 5140)
@@ -1,7 +0,0 @@
-port=8080
-#path=/jaxws-wsrm/ReqResService
-path=/jaxws-wsrm-req-res-emulator/ReqResService
-#archives=jaxws-wsrm.war, jaxws-wsrm-client.jar
-archives=jaxws-wsrm-req-res-emulator.war, jaxws-wsrm-client.jar
-emulator=true
-
Deleted: stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAnonymousOneWayTestCase.properties
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAnonymousOneWayTestCase.properties 2007-11-28 17:37:19 UTC (rev 5139)
+++ stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAnonymousOneWayTestCase.properties 2007-11-28 18:03:42 UTC (rev 5140)
@@ -1,7 +0,0 @@
-port=8080
-#path=/jaxws-wsrm/OneWayService
-path=/jaxws-wsrm-one-way-emulator/OneWayService
-#archives=jaxws-wsrm.war, jaxws-wsrm-client.jar
-archives=jaxws-wsrm-one-way-emulator.war, jaxws-wsrm-client.jar
-emulator=true
-
Deleted: stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAnonymousReqResTestCase.properties
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAnonymousReqResTestCase.properties 2007-11-28 17:37:19 UTC (rev 5139)
+++ stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAnonymousReqResTestCase.properties 2007-11-28 18:03:42 UTC (rev 5140)
@@ -1,7 +0,0 @@
-port=8080
-#path=/jaxws-wsrm/ReqResService
-path=/jaxws-wsrm-req-res-emulator/ReqResService
-#archives=jaxws-wsrm.war, jaxws-wsrm-client.jar
-archives=jaxws-wsrm-req-res-emulator.war, jaxws-wsrm-client.jar
-emulator=true
-
17 years, 3 months
JBossWS SVN: r5139 - stack/cxf/trunk/src/main/distro.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-11-28 12:37:19 -0500 (Wed, 28 Nov 2007)
New Revision: 5139
Modified:
stack/cxf/trunk/src/main/distro/ant.properties.example
stack/cxf/trunk/src/main/distro/bin-dist-build.xml
Log:
Fix bin dist
Modified: stack/cxf/trunk/src/main/distro/ant.properties.example
===================================================================
--- stack/cxf/trunk/src/main/distro/ant.properties.example 2007-11-28 17:26:05 UTC (rev 5138)
+++ stack/cxf/trunk/src/main/distro/ant.properties.example 2007-11-28 17:37:19 UTC (rev 5139)
@@ -4,11 +4,11 @@
# $Id: ant.properties.example 3137 2007-05-18 13:41:57Z thomas.diesler(a)jboss.com $
# Optional JBoss Home
-jboss50.home=(a)jboss50.home@
-jboss42.home=(a)jboss42.home@
+jboss500.home=(a)jboss500.home@
+jboss422.home=(a)jboss422.home@
-# The JBoss server under test. This can be [jboss50|jboss42]
-jbossws.integration.target=jboss42
+# The JBoss server under test. This can be [jboss422|jboss500]
+jbossws.integration.target=jboss500
# The JBoss settings
jboss.server.instance=default
Modified: stack/cxf/trunk/src/main/distro/bin-dist-build.xml
===================================================================
--- stack/cxf/trunk/src/main/distro/bin-dist-build.xml 2007-11-28 17:26:05 UTC (rev 5138)
+++ stack/cxf/trunk/src/main/distro/bin-dist-build.xml 2007-11-28 17:37:19 UTC (rev 5139)
@@ -49,6 +49,13 @@
<available property="jboss500.available" file="${jboss500.available.file}"/>
<available property="jboss422.available" file="${jboss422.available.file}"/>
+ <condition property="jbossws.integration.jboss42" value="true">
+ <equals arg1="${jbossws.integration.target}" arg2="jboss422"/>
+ </condition>
+ <condition property="jbossws.integration.jboss50" value="true">
+ <equals arg1="${jbossws.integration.target}" arg2="jboss500"/>
+ </condition>
+
<!-- JDK Detection -->
<available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
<available classname="java.io.Console" property="HAVE_JDK_1.6"/>
17 years, 3 months
JBossWS SVN: r5138 - in stack/native/trunk/src: main/java/org/jboss/ws/extensions/wsrm/transport/backchannel and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-11-28 12:26:05 -0500 (Wed, 28 Nov 2007)
New Revision: 5138
Added:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAbstractOneWayTest.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAddressableOneWayTestCase.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAnonymousOneWayTestCase.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAbstractReqResTest.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAddressableReqResTestCase.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAnonymousReqResTestCase.java
stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAddressableOneWayTestCase.properties
stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAddressableReqResTestCase.properties
stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAnonymousOneWayTestCase.properties
stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAnonymousReqResTestCase.properties
Removed:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMOneWayTestCase.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMReqResTestCase.java
stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMOneWayTestCase.properties
stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMReqResTestCase.properties
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/transport/RMChannelRequest.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/transport/backchannel/RMCallbackHandlerImpl.java
Log:
minor refactoring again
Modified: stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/transport/RMChannelRequest.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/transport/RMChannelRequest.java 2007-11-28 17:01:49 UTC (rev 5137)
+++ stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/transport/RMChannelRequest.java 2007-11-28 17:26:05 UTC (rev 5138)
@@ -31,8 +31,6 @@
import org.jboss.logging.Logger;
import org.jboss.remoting.Client;
import org.jboss.remoting.InvokerLocator;
-import org.jboss.remoting.callback.Callback;
-import org.jboss.remoting.callback.HandleCallbackException;
import org.jboss.ws.core.MessageTrace;
import org.jboss.ws.extensions.wsrm.RMSequenceImpl;
import org.jboss.ws.extensions.wsrm.transport.backchannel.RMCallbackHandler;
@@ -45,7 +43,7 @@
*/
public final class RMChannelRequest implements Callable<RMChannelResponse>
{
- private static final Logger log = Logger.getLogger(RMChannelRequest.class);
+ private static final Logger logger = Logger.getLogger(RMChannelRequest.class);
private static final String JBOSSWS_SUBSYSTEM = "jbossws";
private final RMMessage rmRequest;
@@ -55,15 +53,6 @@
this.rmRequest = rmRequest;
}
-
-
- public void handleCallback(Callback callback)
- throws HandleCallbackException
- {
- System.out.println("Handling callback: " + callback);
- // TODO: implement this method
- }
-
public RMChannelResponse call()
{
InvokerLocator locator = null;
@@ -81,7 +70,7 @@
URI backPort = RMTransportHelper.getBackPortURI(rmRequest);
String messageId = RMTransportHelper.getMessageId(rmRequest);
- System.out.println("[WS-RM] backport URI is: " + backPort);
+ logger.debug("[WS-RM] backport URI is: " + backPort);
RMCallbackHandler callbackHandler = null;
// TODO: we should remember WSA:MessageId here too
@@ -94,7 +83,7 @@
callbackHandler.addUnassignedMessageListener(sequence);
}
}
- boolean oneWay = RMTransportHelper.isOneWayOperation(rmRequest) && (backPort == null); // TODO: backport support
+ boolean oneWay = /*RMTransportHelper.isOneWayOperation(rmRequest) && */(backPort != null); // TODO: backport support
Client client = new Client(locator, JBOSSWS_SUBSYSTEM, rmRequest.getMetadata().getContext(REMOTING_CONFIGURATION_CONTEXT));
client.connect();
@@ -105,8 +94,8 @@
client.setUnMarshaller(RMUnMarshaller.getInstance());
Map<String, Object> remotingInvocationContext = rmRequest.getMetadata().getContext(REMOTING_INVOCATION_CONTEXT);
- if (log.isDebugEnabled())
- log.debug("Remoting metadata: " + remotingInvocationContext);
+ if (logger.isDebugEnabled())
+ logger.debug("Remoting metadata: " + remotingInvocationContext);
// debug the outgoing request message
MessageTrace.traceMessage("Outgoing RM Request Message", rmRequest.getPayload());
Modified: stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/transport/backchannel/RMCallbackHandlerImpl.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/transport/backchannel/RMCallbackHandlerImpl.java 2007-11-28 17:01:49 UTC (rev 5137)
+++ stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/transport/backchannel/RMCallbackHandlerImpl.java 2007-11-28 17:26:05 UTC (rev 5138)
@@ -43,7 +43,7 @@
*/
public final class RMCallbackHandlerImpl implements RMCallbackHandler
{
- private static final Logger LOG = Logger.getLogger(RMCallbackHandlerImpl.class);
+ private static final Logger logger = Logger.getLogger(RMCallbackHandlerImpl.class);
private final String handledPath;
private final Object instanceLock = new Object();
private Map<String, RMMessage> arrivedMessages = new HashMap<String, RMMessage>();
@@ -54,6 +54,7 @@
{
super();
this.handledPath = handledPath;
+ logger.debug("Registered callback handler listening on '" + handledPath + "' request path");
}
public Throwable getFault(String messageId)
@@ -70,12 +71,9 @@
public final void handle(InvocationRequest request)
{
String requestMessage = (String)request.getParameter();
- System.out.println("=================================================");
- System.out.println("4 - " + request.getRequestPayload());
- System.out.println("5 - " + request.getReturnPayload());
synchronized (instanceLock)
{
- LOG.debug("Setting response object");
+ logger.debug("Setting response object");
MessageTrace.traceMessage("Incoming RM Response Message", requestMessage.getBytes());
RMMessage message = RMMessageFactory.newMessage(requestMessage.getBytes(), new RMMetadata(new java.util.HashMap<String, Object>())); // TODO create map metadata
String startPattern = "<wsa:RelatesTo>"; // TODO: remove this with XML content inspection
@@ -85,20 +83,19 @@
if (begin != -1)
{
String messageId = requestMessage.substring(begin, end);
- System.out.println("Arrived message id: " + messageId);
+ logger.debug("Arrived message id: " + messageId);
this.arrivedMessages.put(messageId, message);
}
else
{
- System.out.println("Arrived message has no id");
+ logger.debug("Arrived message has no id");
this.arrivedUnassignedMessages.add(message);
if (this.listener != null)
{
this.listener.unassignedMessageReceived();
}
}
- System.out.println("Message content is: " + requestMessage);
- System.out.println("=================================================");
+ logger.debug("Message content is: " + requestMessage);
}
}
@@ -121,7 +118,7 @@
{
try
{
- LOG.debug("waiting for response object associated with message id: " + messageId);
+ logger.debug("waiting for response object associated with message id: " + messageId);
instanceLock.wait(100);
}
catch (InterruptedException ignore)
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAbstractOneWayTest.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAbstractOneWayTest.java (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAbstractOneWayTest.java 2007-11-28 17:26:05 UTC (rev 5138)
@@ -0,0 +1,94 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.wsrm.oneway;
+
+import static org.jboss.test.ws.jaxws.wsrm.Helper.*;
+
+import java.net.URL;
+import java.util.concurrent.TimeUnit;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import org.jboss.ws.extensions.wsrm.api.RMAddressingType;
+import org.jboss.ws.extensions.wsrm.api.RMProvider;
+import org.jboss.ws.extensions.wsrm.api.RMSequence;
+import org.jboss.ws.extensions.wsrm.api.RMSequenceType;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.test.ws.jaxws.wsrm.OneWayServiceIface;
+
+/**
+ * Reliable JBoss WebService client invoking one way methods
+ *
+ * @author richard.opalka(a)jboss.com
+ * @since 22-Aug-2007
+ */
+public abstract class RMAbstractOneWayTest extends JBossWSTest
+{
+ private String targetNS = "http://wsrm.jaxws.ws.test.jboss.org/";
+ private OneWayServiceIface proxy;
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ QName serviceName = new QName(targetNS, "OneWayService");
+ URL wsdlURL = new URL(getServiceURL() + "?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ proxy = (OneWayServiceIface)service.getPort(OneWayServiceIface.class);
+ }
+
+ public void testOneWayMethods() throws Exception
+ {
+ System.out.println("FIXME [JBWS-515] Provide an initial implementation for WS-ReliableMessaging");
+ System.out.println("FIXME [JBWS-1699] Implement the basic message exchange that is required for WS-RM");
+ System.out.println("FIXME [JBWS-1700] Provide a comprehensive test case for WS-RM");
+ if (true) return; // disable WS-RM tests - they cause regression in hudson
+
+ RMSequence sequence = null;
+ if (isEmulatorOn())
+ {
+ RMProvider wsrmProvider = (RMProvider)proxy;
+ sequence = wsrmProvider.createSequence(getAddressingType(), RMSequenceType.SIMPLEX);
+ System.out.println("Created sequence with id=" + sequence.getOutboundId());
+ }
+ setAddrProps(proxy, "http://useless/action1", getServiceURL());
+ proxy.method1();
+ setAddrProps(proxy, "http://useless/action2", getServiceURL());
+ proxy.method2("Hello World");
+ setAddrProps(proxy, "http://useless/action3", getServiceURL());
+ proxy.method3(new String[] {"Hello","World"});
+ if (isEmulatorOn())
+ {
+ if (!sequence.isCompleted(1000, TimeUnit.MILLISECONDS)) {
+ fail("Sequence not completed within specified time amount");
+ } else {
+ sequence.close();
+ }
+ }
+ }
+
+ protected abstract RMAddressingType getAddressingType();
+ protected abstract boolean isEmulatorOn();
+ protected abstract String getServiceURL();
+
+}
Property changes on: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAbstractOneWayTest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAddressableOneWayTestCase.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAddressableOneWayTestCase.java (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAddressableOneWayTestCase.java 2007-11-28 17:26:05 UTC (rev 5138)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.wsrm.oneway;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.Properties;
+
+import junit.framework.Test;
+
+import org.jboss.ws.extensions.wsrm.api.RMAddressingType;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * Addressable version of one way WS-RM message exchange
+ *
+ * @author richard.opalka(a)jboss.com
+ *
+ * @since Nov 28, 2007
+ */
+public final class RMAddressableOneWayTestCase extends RMAbstractOneWayTest
+{
+
+ private static final Properties props = new Properties();
+ private final boolean emulatorOn = Boolean.parseBoolean((String)props.get("emulator"));
+ private final String serviceURL = "http://" + getServerHost() + ":" + props.getProperty("port") + props.getProperty("path");
+
+ static
+ {
+ // load test properties
+ File propertiesFile = new File("resources/jaxws/wsrm/properties/RMAddressableOneWayTestCase.properties");
+ try
+ {
+ props.load(new FileInputStream(propertiesFile));
+ }
+ catch (IOException ignore)
+ {
+ ignore.printStackTrace();
+ }
+ }
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(RMAddressableOneWayTestCase.class, props.getProperty("archives"));
+ }
+
+ public final RMAddressingType getAddressingType()
+ {
+ return RMAddressingType.ADDRESSABLE;
+ }
+
+ public final boolean isEmulatorOn()
+ {
+ return this.emulatorOn;
+ }
+
+ public final String getServiceURL()
+ {
+ return this.serviceURL;
+ }
+
+}
Property changes on: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAddressableOneWayTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAnonymousOneWayTestCase.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAnonymousOneWayTestCase.java (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAnonymousOneWayTestCase.java 2007-11-28 17:26:05 UTC (rev 5138)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.wsrm.oneway;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.Properties;
+
+import junit.framework.Test;
+
+import org.jboss.ws.extensions.wsrm.api.RMAddressingType;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * Anonymous version of one way WS-RM message exchange
+ *
+ * @author richard.opalka(a)jboss.com
+ *
+ * @since Nov 28, 2007
+ */
+public final class RMAnonymousOneWayTestCase extends RMAbstractOneWayTest
+{
+
+ private static final Properties props = new Properties();
+ private final boolean emulatorOn = Boolean.parseBoolean((String)props.get("emulator"));
+ private final String serviceURL = "http://" + getServerHost() + ":" + props.getProperty("port") + props.getProperty("path");
+
+ static
+ {
+ // load test properties
+ File propertiesFile = new File("resources/jaxws/wsrm/properties/RMAnonymousOneWayTestCase.properties");
+ try
+ {
+ props.load(new FileInputStream(propertiesFile));
+ }
+ catch (IOException ignore)
+ {
+ ignore.printStackTrace();
+ }
+ }
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(RMAnonymousOneWayTestCase.class, props.getProperty("archives"));
+ }
+
+
+ public final RMAddressingType getAddressingType()
+ {
+ return RMAddressingType.ANONYMOUS;
+ }
+
+ public final boolean isEmulatorOn()
+ {
+ return this.emulatorOn;
+ }
+
+ public final String getServiceURL()
+ {
+ return this.serviceURL;
+ }
+
+}
Property changes on: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMAnonymousOneWayTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMOneWayTestCase.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMOneWayTestCase.java 2007-11-28 17:01:49 UTC (rev 5137)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/oneway/RMOneWayTestCase.java 2007-11-28 17:26:05 UTC (rev 5138)
@@ -1,125 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.wsrm.oneway;
-
-import static org.jboss.test.ws.jaxws.wsrm.Helper.*;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.net.URL;
-import java.util.Properties;
-import java.util.concurrent.TimeUnit;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-
-import junit.framework.Test;
-
-import org.jboss.ws.extensions.wsrm.api.RMAddressingType;
-import org.jboss.ws.extensions.wsrm.api.RMProvider;
-import org.jboss.ws.extensions.wsrm.api.RMSequence;
-import org.jboss.ws.extensions.wsrm.api.RMSequenceType;
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestSetup;
-import org.jboss.test.ws.jaxws.wsrm.OneWayServiceIface;
-
-/**
- * Reliable JBoss WebService client invoking one way methods
- *
- * @author richard.opalka(a)jboss.com
- * @since 22-Aug-2007
- */
-public class RMOneWayTestCase extends JBossWSTest
-{
- private static final Properties props = new Properties();
- private String targetNS = "http://wsrm.jaxws.ws.test.jboss.org/";
- private OneWayServiceIface proxy;
- private final boolean emulatorOn = Boolean.parseBoolean((String)props.get("emulator"));
- private final boolean addressable = Boolean.parseBoolean((String)props.get("addressable"));
- private final String serviceURL = "http://" + getServerHost() + ":" + props.getProperty("port") + props.getProperty("path");
-
- static
- {
- // load test properties
- File propertiesFile = new File("resources/jaxws/wsrm/properties/RMOneWayTestCase.properties");
- try
- {
- props.load(new FileInputStream(propertiesFile));
- }
- catch (IOException ignore)
- {
- ignore.printStackTrace();
- }
- }
-
- public static Test suite()
- {
- return new JBossWSTestSetup(RMOneWayTestCase.class, props.getProperty("archives"));
- }
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- QName serviceName = new QName(targetNS, "OneWayService");
- URL wsdlURL = new URL(serviceURL + "?wsdl");
- Service service = Service.create(wsdlURL, serviceName);
- proxy = (OneWayServiceIface)service.getPort(OneWayServiceIface.class);
- }
-
- public void testOneWayMethods() throws Exception
- {
- System.out.println("FIXME [JBWS-515] Provide an initial implementation for WS-ReliableMessaging");
- System.out.println("FIXME [JBWS-1699] Implement the basic message exchange that is required for WS-RM");
- System.out.println("FIXME [JBWS-1700] Provide a comprehensive test case for WS-RM");
- if (true) return; // disable WS-RM tests - they cause regression in hudson
-
- RMSequence sequence = null;
- if (emulatorOn)
- {
- RMProvider wsrmProvider = (RMProvider)proxy;
- sequence = wsrmProvider.createSequence(getAddressingType(), RMSequenceType.SIMPLEX);
- System.out.println("Created sequence with id=" + sequence.getOutboundId());
- }
- setAddrProps(proxy, "http://useless/action1", serviceURL);
- proxy.method1();
- setAddrProps(proxy, "http://useless/action2", serviceURL);
- proxy.method2("Hello World");
- setAddrProps(proxy, "http://useless/action3", serviceURL);
- proxy.method3(new String[] {"Hello","World"});
- if (emulatorOn)
- {
- if (!sequence.isCompleted(1000, TimeUnit.MILLISECONDS)) {
- fail("Sequence not completed within specified time amount");
- } else {
- sequence.close();
- }
- }
- }
-
- private RMAddressingType getAddressingType()
- {
- return addressable ? RMAddressingType.ADDRESSABLE : RMAddressingType.ANONYMOUS;
- }
-
-}
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAbstractReqResTest.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAbstractReqResTest.java (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAbstractReqResTest.java 2007-11-28 17:26:05 UTC (rev 5138)
@@ -0,0 +1,179 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.wsrm.reqres;
+
+import static org.jboss.test.ws.jaxws.wsrm.Helper.*;
+
+import java.net.URL;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.AsyncHandler;
+import javax.xml.ws.Response;
+import javax.xml.ws.Service;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.test.ws.jaxws.wsrm.ReqResServiceIface;
+
+import org.jboss.ws.extensions.wsrm.api.RMAddressingType;
+import org.jboss.ws.extensions.wsrm.api.RMProvider;
+import org.jboss.ws.extensions.wsrm.api.RMSequence;
+import org.jboss.ws.extensions.wsrm.api.RMSequenceType;
+
+/**
+ * Reliable JBoss WebService client invoking req/res methods
+ *
+ * @author richard.opalka(a)jboss.com
+ * @since 22-Aug-2007
+ */
+public abstract class RMAbstractReqResTest extends JBossWSTest
+{
+ private static final String HELLO_WORLD_MSG = "Hello World";
+ private static final String TARGET_NS = "http://org.jboss.ws/jaxws/wsrm";
+ private Exception handlerException;
+ private boolean asyncHandlerCalled;
+ private ReqResServiceIface proxy;
+
+ private enum InvocationType
+ {
+ SYNC, ASYNC, ASYNC_FUTURE
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ if (proxy == null)
+ {
+ QName serviceName = new QName(TARGET_NS, "ReqResService");
+ URL wsdlURL = new URL(getServiceURL() + "?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ proxy = (ReqResServiceIface)service.getPort(ReqResServiceIface.class);
+ }
+ }
+
+ public void testSynchronousInvocation() throws Exception
+ {
+ doReliableMessageExchange(proxy, InvocationType.SYNC);
+ }
+
+ public void testAsynchronousInvocation() throws Exception
+ {
+ doReliableMessageExchange(proxy, InvocationType.ASYNC);
+ }
+
+ public void testAsynchronousInvocationUsingFuture() throws Exception
+ {
+ doReliableMessageExchange(proxy, InvocationType.ASYNC_FUTURE);
+ }
+
+ private void doSynchronousInvocation() throws Exception
+ {
+ assertEquals(proxy.echo(HELLO_WORLD_MSG), HELLO_WORLD_MSG);
+ }
+
+ private void doAsynchronousInvocation() throws Exception
+ {
+ Response<String> response = proxy.echoAsync(HELLO_WORLD_MSG);
+ assertEquals(response.get(), HELLO_WORLD_MSG); // hidden future pattern
+ }
+
+ private void doAsynchronousInvocationUsingFuture() throws Exception
+ {
+ AsyncHandler<String> handler = new AsyncHandler<String>()
+ {
+ public void handleResponse(Response<String> response)
+ {
+ try
+ {
+ String retStr = (String) response.get(1000, TimeUnit.MILLISECONDS);
+ assertEquals(HELLO_WORLD_MSG, retStr);
+ asyncHandlerCalled = true;
+ }
+ catch (Exception ex)
+ {
+ handlerException = ex;
+ }
+ }
+ };
+ Future<?> future = proxy.echoAsync(HELLO_WORLD_MSG, handler);
+ future.get(1000, TimeUnit.MILLISECONDS);
+ ensureAsyncStatus();
+ }
+
+ private void ensureAsyncStatus() throws Exception
+ {
+ if (handlerException != null) throw handlerException;
+ assertTrue("Async handler called", asyncHandlerCalled);
+ handlerException = null;
+ asyncHandlerCalled = false;
+ }
+
+ private void invokeWebServiceMethod(InvocationType invocationType) throws Exception
+ {
+ switch (invocationType) {
+ case SYNC: doSynchronousInvocation(); break;
+ case ASYNC: doAsynchronousInvocation(); break;
+ case ASYNC_FUTURE: doAsynchronousInvocationUsingFuture(); break;
+ default : fail("Unknown invocation type");
+ }
+ }
+
+ private void doReliableMessageExchange(Object proxyObject, InvocationType invocationType) throws Exception
+ {
+ System.out.println("FIXME [JBWS-515] Provide an initial implementation for WS-ReliableMessaging");
+ System.out.println("FIXME [JBWS-1699] Implement the basic message exchange that is required for WS-RM");
+ System.out.println("FIXME [JBWS-1700] Provide a comprehensive test case for WS-RM");
+ if (true) return; // disable WS-RM tests - they cause regression in hudson
+
+ RMSequence sequence = null;
+ if (isEmulatorOn())
+ {
+ RMProvider wsrmProvider = (RMProvider)proxyObject;
+ sequence = wsrmProvider.createSequence(getAddressingType(), RMSequenceType.DUPLEX);
+ System.out.println("Created sequence with outbound id=" + sequence.getOutboundId());
+ System.out.println("Created sequence with inbound id=" + sequence.getInboundId());
+ }
+ setAddrProps(proxy, "http://useless/action", getServiceURL());
+ invokeWebServiceMethod(invocationType);
+ setAddrProps(proxy, "http://useless/action", getServiceURL());
+ invokeWebServiceMethod(invocationType);
+ setAddrProps(proxy, "http://useless/action", getServiceURL());
+ invokeWebServiceMethod(invocationType);
+ if (isEmulatorOn())
+ {
+ if (!sequence.isCompleted(1000, TimeUnit.MILLISECONDS)) {
+ sequence.discard();
+ fail("Sequence not completed within specified time amount");
+ } else {
+ sequence.close();
+ }
+ }
+ }
+
+ protected abstract RMAddressingType getAddressingType();
+ protected abstract boolean isEmulatorOn();
+ protected abstract String getServiceURL();
+
+}
Property changes on: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAbstractReqResTest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAddressableReqResTestCase.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAddressableReqResTestCase.java (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAddressableReqResTestCase.java 2007-11-28 17:26:05 UTC (rev 5138)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.wsrm.reqres;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.Properties;
+
+import junit.framework.Test;
+
+import org.jboss.ws.extensions.wsrm.api.RMAddressingType;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * Addressable version of request reply WS-RM message exchange
+ *
+ * @author richard.opalka(a)jboss.com
+ *
+ * @since Nov 28, 2007
+ */
+public final class RMAddressableReqResTestCase extends RMAbstractReqResTest
+{
+
+ private static final Properties props = new Properties();
+ private final String serviceURL = "http://" + getServerHost() + ":" + props.getProperty("port") + props.getProperty("path");
+ private final boolean emulatorOn = Boolean.parseBoolean((String)props.get("emulator"));
+
+ static
+ {
+ // load test properties
+ File propertiesFile = new File("resources/jaxws/wsrm/properties/RMAddressableReqResTestCase.properties");
+ try
+ {
+ props.load(new FileInputStream(propertiesFile));
+ }
+ catch (IOException ioe)
+ {
+ ioe.printStackTrace();
+ }
+ }
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(RMAddressableReqResTestCase.class, props.getProperty("archives"));
+ }
+
+ public final RMAddressingType getAddressingType()
+ {
+ return RMAddressingType.ADDRESSABLE;
+ }
+
+ public final boolean isEmulatorOn()
+ {
+ return this.emulatorOn;
+ }
+
+ public final String getServiceURL()
+ {
+ return this.serviceURL;
+ }
+
+}
Property changes on: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAddressableReqResTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAnonymousReqResTestCase.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAnonymousReqResTestCase.java (rev 0)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAnonymousReqResTestCase.java 2007-11-28 17:26:05 UTC (rev 5138)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.ws.jaxws.wsrm.reqres;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.Properties;
+
+import junit.framework.Test;
+
+import org.jboss.ws.extensions.wsrm.api.RMAddressingType;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * Anonymous version of request reply WS-RM message exchange
+ *
+ * @author richard.opalka(a)jboss.com
+ *
+ * @since Nov 28, 2007
+ */
+public final class RMAnonymousReqResTestCase extends RMAbstractReqResTest
+{
+
+ private static final Properties props = new Properties();
+ private final String serviceURL = "http://" + getServerHost() + ":" + props.getProperty("port") + props.getProperty("path");
+ private final boolean emulatorOn = Boolean.parseBoolean((String)props.get("emulator"));
+
+ static
+ {
+ // load test properties
+ File propertiesFile = new File("resources/jaxws/wsrm/properties/RMAnonymousReqResTestCase.properties");
+ try
+ {
+ props.load(new FileInputStream(propertiesFile));
+ }
+ catch (IOException ioe)
+ {
+ ioe.printStackTrace();
+ }
+ }
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(RMAnonymousReqResTestCase.class, props.getProperty("archives"));
+ }
+
+ public final RMAddressingType getAddressingType()
+ {
+ return RMAddressingType.ANONYMOUS;
+ }
+
+ public final boolean isEmulatorOn()
+ {
+ return this.emulatorOn;
+ }
+
+ public final String getServiceURL()
+ {
+ return this.serviceURL;
+ }
+
+}
Property changes on: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMAnonymousReqResTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMReqResTestCase.java
===================================================================
--- stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMReqResTestCase.java 2007-11-28 17:01:49 UTC (rev 5137)
+++ stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/wsrm/reqres/RMReqResTestCase.java 2007-11-28 17:26:05 UTC (rev 5138)
@@ -1,210 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.ws.jaxws.wsrm.reqres;
-
-import static org.jboss.test.ws.jaxws.wsrm.Helper.*;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.net.URL;
-import java.util.Properties;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.AsyncHandler;
-import javax.xml.ws.Response;
-import javax.xml.ws.Service;
-
-import junit.framework.Test;
-
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestSetup;
-import org.jboss.test.ws.jaxws.wsrm.ReqResServiceIface;
-
-import org.jboss.ws.extensions.wsrm.api.RMAddressingType;
-import org.jboss.ws.extensions.wsrm.api.RMProvider;
-import org.jboss.ws.extensions.wsrm.api.RMSequence;
-import org.jboss.ws.extensions.wsrm.api.RMSequenceType;
-
-/**
- * Reliable JBoss WebService client invoking req/res methods
- *
- * @author richard.opalka(a)jboss.com
- * @since 22-Aug-2007
- */
-public class RMReqResTestCase extends JBossWSTest
-{
- private static final Properties props = new Properties();
- private static final String HELLO_WORLD_MSG = "Hello World";
- private static final String TARGET_NS = "http://org.jboss.ws/jaxws/wsrm";
- private final String serviceURL = "http://" + getServerHost() + ":" + props.getProperty("port") + props.getProperty("path");
- private Exception handlerException;
- private boolean asyncHandlerCalled;
- private ReqResServiceIface proxy;
- private final boolean emulatorOn = Boolean.parseBoolean((String)props.get("emulator"));
- private final boolean addressable = Boolean.parseBoolean((String)props.get("addressable"));
-
- static
- {
- // load test properties
- File propertiesFile = new File("resources/jaxws/wsrm/properties/RMReqResTestCase.properties");
- try
- {
- props.load(new FileInputStream(propertiesFile));
- }
- catch (IOException ignore)
- {
- ignore.printStackTrace();
- }
- }
-
- private enum InvocationType
- {
- SYNC, ASYNC, ASYNC_FUTURE
- }
-
- public static Test suite()
- {
- return new JBossWSTestSetup(RMReqResTestCase.class, props.getProperty("archives"));
- }
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-
- if (proxy == null)
- {
- QName serviceName = new QName(TARGET_NS, "ReqResService");
- URL wsdlURL = new URL(serviceURL + "?wsdl");
- Service service = Service.create(wsdlURL, serviceName);
- proxy = (ReqResServiceIface)service.getPort(ReqResServiceIface.class);
- }
- }
-
- public void testSynchronousInvocation() throws Exception
- {
- doReliableMessageExchange(proxy, InvocationType.SYNC);
- }
-
- public void testAsynchronousInvocation() throws Exception
- {
- doReliableMessageExchange(proxy, InvocationType.ASYNC);
- }
-
- public void testAsynchronousInvocationUsingFuture() throws Exception
- {
- doReliableMessageExchange(proxy, InvocationType.ASYNC_FUTURE);
- }
-
- private void doSynchronousInvocation() throws Exception
- {
- assertEquals(proxy.echo(HELLO_WORLD_MSG), HELLO_WORLD_MSG);
- }
-
- private void doAsynchronousInvocation() throws Exception
- {
- Response<String> response = proxy.echoAsync(HELLO_WORLD_MSG);
- assertEquals(response.get(), HELLO_WORLD_MSG); // hidden future pattern
- }
-
- private void doAsynchronousInvocationUsingFuture() throws Exception
- {
- AsyncHandler<String> handler = new AsyncHandler<String>()
- {
- public void handleResponse(Response<String> response)
- {
- try
- {
- String retStr = (String) response.get(1000, TimeUnit.MILLISECONDS);
- assertEquals(HELLO_WORLD_MSG, retStr);
- asyncHandlerCalled = true;
- }
- catch (Exception ex)
- {
- handlerException = ex;
- }
- }
- };
- Future<?> future = proxy.echoAsync(HELLO_WORLD_MSG, handler);
- future.get(1000, TimeUnit.MILLISECONDS);
- ensureAsyncStatus();
- }
-
- private void ensureAsyncStatus() throws Exception
- {
- if (handlerException != null) throw handlerException;
- assertTrue("Async handler called", asyncHandlerCalled);
- handlerException = null;
- asyncHandlerCalled = false;
- }
-
- private void invokeWebServiceMethod(InvocationType invocationType) throws Exception
- {
- switch (invocationType) {
- case SYNC: doSynchronousInvocation(); break;
- case ASYNC: doAsynchronousInvocation(); break;
- case ASYNC_FUTURE: doAsynchronousInvocationUsingFuture(); break;
- default : fail("Unknown invocation type");
- }
- }
-
- private void doReliableMessageExchange(Object proxyObject, InvocationType invocationType) throws Exception
- {
- System.out.println("FIXME [JBWS-515] Provide an initial implementation for WS-ReliableMessaging");
- System.out.println("FIXME [JBWS-1699] Implement the basic message exchange that is required for WS-RM");
- System.out.println("FIXME [JBWS-1700] Provide a comprehensive test case for WS-RM");
- if (true) return; // disable WS-RM tests - they cause regression in hudson
-
- RMSequence sequence = null;
- if (emulatorOn)
- {
- RMProvider wsrmProvider = (RMProvider)proxyObject;
- sequence = wsrmProvider.createSequence(getAddressingType(), RMSequenceType.DUPLEX);
- System.out.println("Created sequence with outbound id=" + sequence.getOutboundId());
- System.out.println("Created sequence with inbound id=" + sequence.getInboundId());
- }
- setAddrProps(proxy, "http://useless/action", serviceURL);
- invokeWebServiceMethod(invocationType);
- setAddrProps(proxy, "http://useless/action", serviceURL);
- invokeWebServiceMethod(invocationType);
- setAddrProps(proxy, "http://useless/action", serviceURL);
- invokeWebServiceMethod(invocationType);
- if (emulatorOn)
- {
- if (!sequence.isCompleted(1000, TimeUnit.MILLISECONDS)) {
- sequence.discard();
- fail("Sequence not completed within specified time amount");
- } else {
- sequence.close();
- }
- }
- }
-
- private RMAddressingType getAddressingType()
- {
- return addressable ? RMAddressingType.ADDRESSABLE : RMAddressingType.ANONYMOUS;
- }
-
-}
Added: stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAddressableOneWayTestCase.properties
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAddressableOneWayTestCase.properties (rev 0)
+++ stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAddressableOneWayTestCase.properties 2007-11-28 17:26:05 UTC (rev 5138)
@@ -0,0 +1,7 @@
+port=8080
+#path=/jaxws-wsrm/OneWayService
+path=/jaxws-wsrm-one-way-emulator/OneWayService
+#archives=jaxws-wsrm.war, jaxws-wsrm-client.jar
+archives=jaxws-wsrm-one-way-emulator.war, jaxws-wsrm-client.jar
+emulator=true
+
Added: stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAddressableReqResTestCase.properties
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAddressableReqResTestCase.properties (rev 0)
+++ stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAddressableReqResTestCase.properties 2007-11-28 17:26:05 UTC (rev 5138)
@@ -0,0 +1,7 @@
+port=8080
+#path=/jaxws-wsrm/ReqResService
+path=/jaxws-wsrm-req-res-emulator/ReqResService
+#archives=jaxws-wsrm.war, jaxws-wsrm-client.jar
+archives=jaxws-wsrm-req-res-emulator.war, jaxws-wsrm-client.jar
+emulator=true
+
Added: stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAnonymousOneWayTestCase.properties
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAnonymousOneWayTestCase.properties (rev 0)
+++ stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAnonymousOneWayTestCase.properties 2007-11-28 17:26:05 UTC (rev 5138)
@@ -0,0 +1,7 @@
+port=8080
+#path=/jaxws-wsrm/OneWayService
+path=/jaxws-wsrm-one-way-emulator/OneWayService
+#archives=jaxws-wsrm.war, jaxws-wsrm-client.jar
+archives=jaxws-wsrm-one-way-emulator.war, jaxws-wsrm-client.jar
+emulator=true
+
Added: stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAnonymousReqResTestCase.properties
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAnonymousReqResTestCase.properties (rev 0)
+++ stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMAnonymousReqResTestCase.properties 2007-11-28 17:26:05 UTC (rev 5138)
@@ -0,0 +1,7 @@
+port=8080
+#path=/jaxws-wsrm/ReqResService
+path=/jaxws-wsrm-req-res-emulator/ReqResService
+#archives=jaxws-wsrm.war, jaxws-wsrm-client.jar
+archives=jaxws-wsrm-req-res-emulator.war, jaxws-wsrm-client.jar
+emulator=true
+
Deleted: stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMOneWayTestCase.properties
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMOneWayTestCase.properties 2007-11-28 17:01:49 UTC (rev 5137)
+++ stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMOneWayTestCase.properties 2007-11-28 17:26:05 UTC (rev 5138)
@@ -1,7 +0,0 @@
-port=8080
-#path=/jaxws-wsrm/OneWayService
-path=/jaxws-wsrm-one-way-emulator/OneWayService
-#archives=jaxws-wsrm.war, jaxws-wsrm-client.jar
-archives=jaxws-wsrm-one-way-emulator.war, jaxws-wsrm-client.jar
-emulator=true
-addressable=true
\ No newline at end of file
Deleted: stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMReqResTestCase.properties
===================================================================
--- stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMReqResTestCase.properties 2007-11-28 17:01:49 UTC (rev 5137)
+++ stack/native/trunk/src/test/resources/jaxws/wsrm/properties/RMReqResTestCase.properties 2007-11-28 17:26:05 UTC (rev 5138)
@@ -1,7 +0,0 @@
-port=8080
-#path=/jaxws-wsrm/ReqResService
-path=/jaxws-wsrm-req-res-emulator/ReqResService
-#archives=jaxws-wsrm.war, jaxws-wsrm-client.jar
-archives=jaxws-wsrm-req-res-emulator.war, jaxws-wsrm-client.jar
-emulator=true
-addressable=true
17 years, 3 months
JBossWS SVN: r5137 - stack/native/trunk/ant-import.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-11-28 12:01:49 -0500 (Wed, 28 Nov 2007)
New Revision: 5137
Modified:
stack/native/trunk/ant-import/build-deploy.xml
stack/native/trunk/ant-import/macros-deploy-native.xml
Log:
Fix deploy-jboss422
Modified: stack/native/trunk/ant-import/build-deploy.xml
===================================================================
--- stack/native/trunk/ant-import/build-deploy.xml 2007-11-28 16:39:06 UTC (rev 5136)
+++ stack/native/trunk/ant-import/build-deploy.xml 2007-11-28 17:01:49 UTC (rev 5137)
@@ -57,7 +57,7 @@
<!-- Deploy jbossws to jboss422 -->
<target name="deploy-jboss422" depends="jars-jboss42,undeploy-jboss422,deploy-jboss422-endorsed" description="Deploy jbossws to jboss422">
<fail message="Not available: ${jboss422.available.file}" unless="jboss422.available"/>
- <macro-deploy-native422 jbosshome="${jboss422.home}" stacklibs="${core.dir}/output/lib" thirdpartylibs="${core.dir}/thirdparty"/>
+ <macro-deploy-native422 stacklibs="${core.dir}/output/lib" thirdpartylibs="${core.dir}/thirdparty"/>
<macro-deploy-framework thirdpartylibs="${core.dir}/thirdparty" jbosshome="${jboss422.home}"/>
</target>
@@ -68,7 +68,7 @@
<!-- Remove jbossws from jboss422 -->
<target name="undeploy-jboss422" depends="prepare,undeploy-jboss422-endorsed" description="Remove jbossws from jboss422">
<fail message="Not available: ${jboss422.available.file}" unless="jboss422.available"/>
- <macro-undeploy-native422 jbosshome="${jboss422.home}"/>
+ <macro-undeploy-native422/>
<macro-undeploy-framework jbosshome="${jboss422.home}"/>
</target>
<target name="undeploy-jboss422-endorsed" depends="prepare">
Modified: stack/native/trunk/ant-import/macros-deploy-native.xml
===================================================================
--- stack/native/trunk/ant-import/macros-deploy-native.xml 2007-11-28 16:39:06 UTC (rev 5136)
+++ stack/native/trunk/ant-import/macros-deploy-native.xml 2007-11-28 17:01:49 UTC (rev 5137)
@@ -309,16 +309,14 @@
<macrodef name="macro-deploy-native422">
<attribute name="stacklibs"/>
<attribute name="thirdpartylibs"/>
- <attribute name="jbosshome"/>
<sequential>
-
<!-- BIN SCRIPTS -->
- <unzip dest="@{jbosshome}/bin" src="@{stacklibs}/jbossws-core-scripts.zip"/>
- <chmod dir="@{jbosshome}/bin" perm="+x" includes="*.sh"/>
+ <unzip dest="${jboss422.home}/bin" src="@{stacklibs}/jbossws-core-scripts.zip"/>
+ <chmod dir="${jboss422.home}/bin" perm="+x" includes="*.sh"/>
<!-- CLIENT JARS -->
- <copy todir="@{jbosshome}/client" overwrite="true">
+ <copy todir="${jboss422.home}/client" overwrite="true">
<fileset dir="@{stacklibs}">
<include name="jboss-jaxrpc.jar"/>
<include name="jboss-jaxws.jar"/>
@@ -340,21 +338,20 @@
</copy>
<!-- SERVER JARS -->
- <mkdir dir="@{jbosshome}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
- <unjar dest="@{jbosshome}/server/${jboss.server.instance}/deploy/jbossws.sar" src="@{stacklibs}/jbossws-native42.sar"/>
- <mkdir dir="@{jbosshome}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
- <unzip dest="@{jbosshome}/server/${jboss.server.instance}/deploy/juddi-service.sar" src="@{thirdpartylibs}/juddi-service.sar"/>
+ <mkdir dir="${jboss422.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
+ <unjar dest="${jboss422.home}/server/${jboss.server.instance}/deploy/jbossws.sar" src="@{stacklibs}/jbossws-native42.sar"/>
+ <mkdir dir="${jboss422.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
+ <unzip dest="${jboss422.home}/server/${jboss.server.instance}/deploy/juddi-service.sar" src="@{thirdpartylibs}/juddi-service.sar"/>
</sequential>
</macrodef>
<macrodef name="macro-undeploy-native422">
- <attribute name="jbosshome"/>
<sequential>
<delete>
<!-- BIN SCRIPTS -->
- <fileset dir="@{jbosshome}/bin">
+ <fileset dir="${jboss422.home}/bin">
<include name="wsconsume.*"/>
<include name="wsprovide.*"/>
<include name="wsrunclient.*"/>
@@ -362,7 +359,7 @@
</fileset>
<!-- CLIENT JARS -->
- <fileset dir="@{jbosshome}/client">
+ <fileset dir="${jboss422.home}/client">
<include name="jaxb-api.jar"/>
<include name="jaxb-impl.jar"/>
<include name="jaxb-xjc.jar"/>
@@ -382,14 +379,14 @@
</fileset>
<!-- SERVER JARS -->
- <fileset dir="@{jbosshome}/lib/endorsed">
+ <fileset dir="${jboss422.home}/lib/endorsed">
<include name="jaxb-api.jar"/>
</fileset>
- <fileset dir="@{jbosshome}/lib">
+ <fileset dir="${jboss422.home}/lib">
<!-- Remove only, do not deploy -->
<include name="jbossws-integration.jar"/>
</fileset>
- <fileset dir="@{jbosshome}/server/${jboss.server.instance}/lib">
+ <fileset dir="${jboss422.home}/server/${jboss.server.instance}/lib">
<include name="jboss-jaxrpc.jar"/>
<include name="jboss-jaxws.jar"/>
<include name="jboss-jaxws-ext.jar"/>
@@ -398,8 +395,8 @@
<include name="jbossws-integration.jar"/>
</fileset>
</delete>
- <delete dir="@{jbosshome}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
- <delete dir="@{jbosshome}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
+ <delete dir="${jboss422.home}/server/${jboss.server.instance}/deploy/jbossws.sar"/>
+ <delete dir="${jboss422.home}/server/${jboss.server.instance}/deploy/juddi-service.sar"/>
</sequential>
</macrodef>
17 years, 3 months
JBossWS SVN: r5136 - in stack/native/trunk: src/main/distro and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-11-28 11:39:06 -0500 (Wed, 28 Nov 2007)
New Revision: 5136
Modified:
stack/native/trunk/ant-import/build-deploy.xml
stack/native/trunk/src/main/distro/bin-dist-deploy.xml
Log:
Fix deploy-jboss405 for distro
Modified: stack/native/trunk/ant-import/build-deploy.xml
===================================================================
--- stack/native/trunk/ant-import/build-deploy.xml 2007-11-28 16:38:12 UTC (rev 5135)
+++ stack/native/trunk/ant-import/build-deploy.xml 2007-11-28 16:39:06 UTC (rev 5136)
@@ -17,14 +17,14 @@
<import file="${core.dir}/ant-import/macros-deploy-native.xml"/>
<!-- Deploy jbossws to jboss405 -->
- <target name="deploy-jboss405" depends="jars-jboss40,undeploy-jboss405,deploy-jboss405-no-ejb3" description="Deploy jbossws to jboss405"/>
+ <target name="deploy-jboss405" depends="deploy-jboss405-ejb3,deploy-jboss405-no-ejb3" description="Deploy jbossws to jboss405"/>
- <target name="deploy-jboss405-ejb3">
+ <target name="deploy-jboss405-ejb3" depends="jars-jboss40,undeploy-jboss405">
<macro-deploy-native405 stacklibs="${core.dir}/output/lib" thirdpartylibs="${core.dir}/thirdparty"/>
<macro-deploy-framework thirdpartylibs="${core.dir}/thirdparty" jbosshome="${jboss405.home}"/>
</target>
- <target name="deploy-jboss405-no-ejb3" depends="jars-jboss40,undeploy-jboss405,deploy-jboss405-ejb3" unless="jboss405.ejb3.available"
+ <target name="deploy-jboss405-no-ejb3" depends="deploy-jboss405-ejb3" unless="jboss405.ejb3.available"
description="Deploy jbossws to jboss405 without EJB3 support">
<macro-deploy-native405-no-ejb3/>
</target>
Modified: stack/native/trunk/src/main/distro/bin-dist-deploy.xml
===================================================================
--- stack/native/trunk/src/main/distro/bin-dist-deploy.xml 2007-11-28 16:38:12 UTC (rev 5135)
+++ stack/native/trunk/src/main/distro/bin-dist-deploy.xml 2007-11-28 16:39:06 UTC (rev 5136)
@@ -14,16 +14,15 @@
<project>
<!-- Deploy jbossws/native to jboss405 -->
- <target name="deploy-jboss405" depends="deploy-jboss405-no-ejb3" description="Deploy jbossws/native to jboss405"/>
+ <target name="deploy-jboss405" depends="deploy-jboss405-ejb3,deploy-jboss405-no-ejb3" description="Deploy jbossws/native to jboss405"/>
<target name="deploy-jboss405-ejb3" depends="undeploy-jboss405">
<macro-deploy-native405 stacklibs="${lib.dir}" thirdpartylibs="${lib.dir}"/>
-
<macro-deploy-framework thirdpartylibs="${lib.dir}" jbosshome="${jboss405.home}"/>
</target>
<target name="deploy-jboss405-no-ejb3" depends="deploy-jboss405-ejb3" unless="jboss405.ejb3.available">
- <macro-setup-native40-no-ejb3/>
+ <macro-deploy-native405-no-ejb3/>
<echo>*********************************</echo>
<echo>* JBossWS EJB3 support disabled *</echo>
<echo>* All EJB3 tests will fail. *</echo>
17 years, 3 months
JBossWS SVN: r5135 - framework/trunk/hudson/hudson-home/jobs/Core-Tests-AS-4.0.5-No-EJB3.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-11-28 11:38:12 -0500 (Wed, 28 Nov 2007)
New Revision: 5135
Modified:
framework/trunk/hudson/hudson-home/jobs/Core-Tests-AS-4.0.5-No-EJB3/config.xml
Log:
ant deploy-jboss405
Modified: framework/trunk/hudson/hudson-home/jobs/Core-Tests-AS-4.0.5-No-EJB3/config.xml
===================================================================
--- framework/trunk/hudson/hudson-home/jobs/Core-Tests-AS-4.0.5-No-EJB3/config.xml 2007-11-28 15:05:41 UTC (rev 5134)
+++ framework/trunk/hudson/hudson-home/jobs/Core-Tests-AS-4.0.5-No-EJB3/config.xml 2007-11-28 16:38:12 UTC (rev 5135)
@@ -27,7 +27,7 @@
#
cd $STACKNATIVE
cp ant.properties.example ant.properties
-./build.sh $ENVIRONMENT -Dforce.thirdparty.get=true clean deploy-jboss405-no-ejb3
+./build.sh $ENVIRONMENT -Dforce.thirdparty.get=true clean deploy-jboss405
#
# start jbossas
17 years, 3 months
JBossWS SVN: r5134 - in stack/native/trunk/src/main/java/org/jboss/ws: extensions/wsrm and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2007-11-28 10:05:41 -0500 (Wed, 28 Nov 2007)
New Revision: 5134
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMClientHandler.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMSequenceImpl.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/transport/RMTransportHelper.java
Log:
minor refactoring
Modified: stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2007-11-28 13:49:16 UTC (rev 5133)
+++ stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2007-11-28 15:05:41 UTC (rev 5134)
@@ -73,9 +73,9 @@
import org.jboss.ws.extensions.wsrm.RMSequenceImpl;
import org.jboss.ws.extensions.wsrm.api.RMAddressingType;
import org.jboss.ws.extensions.wsrm.api.RMException;
-import org.jboss.ws.extensions.wsrm.api.RMProvider;
import org.jboss.ws.extensions.wsrm.api.RMSequence;
import org.jboss.ws.extensions.wsrm.api.RMSequenceType;
+import org.jboss.ws.extensions.wsrm.spi.RMProvider;
import org.jboss.ws.extensions.wsrm.spi.protocol.RMCreateSequenceResponse;
import org.jboss.ws.metadata.config.Configurable;
import org.jboss.ws.metadata.config.ConfigurationProvider;
@@ -90,7 +90,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 04-Jul-2006
*/
-public class ClientImpl extends CommonClient implements RMProvider, BindingProvider21, Configurable
+public class ClientImpl extends CommonClient implements org.jboss.ws.extensions.wsrm.api.RMProvider, BindingProvider21, Configurable
{
// provide logging
private static Logger log = Logger.getLogger(ClientImpl.class);
@@ -290,8 +290,8 @@
}
Map<String, Object> rmRequestContext = new HashMap<String, Object>();
List<QName> outMsgs = new LinkedList<QName>();
- outMsgs.add(org.jboss.ws.extensions.wsrm.spi.RMProvider.get().getConstants().getSequenceQName());
- outMsgs.add(org.jboss.ws.extensions.wsrm.spi.RMProvider.get().getConstants().getAckRequestedQName());
+ outMsgs.add(RMProvider.get().getConstants().getSequenceQName());
+ outMsgs.add(RMProvider.get().getConstants().getAckRequestedQName());
rmRequestContext.put(RMConstant.PROTOCOL_MESSAGES, outMsgs);
rmRequestContext.put(RMConstant.SEQUENCE_REFERENCE, wsrmSequence);
reqContext.put(RMConstant.REQUEST_CONTEXT, rmRequestContext);
@@ -495,19 +495,22 @@
{
if (this.wsrmSequence != null)
throw new IllegalStateException("Sequence already registered with proxy instance");
+ if (seqType == null)
+ throw new IllegalArgumentException("Sequence type cannot be null");
+ if (addrType == null)
+ throw new IllegalArgumentException("Addressing type cannot be null");
try
{
// set up addressing data
+ RMSequenceImpl candidateSequence = new RMSequenceImpl(addrType, seqType, getEndpointMetaData().getConfig().getRMMetaData());
String address = getEndpointMetaData().getEndpointAddress();
String action = RMConstant.CREATE_SEQUENCE_WSA_ACTION;
- URI backPort = null;
AddressingProperties addressingProps = null;
if (addrType == RMAddressingType.ADDRESSABLE)
{
- backPort = new URI("http://localhost:8888/temporary_listen_address/666"); // TODO: use generator
addressingProps = AddressingClientUtil.createDefaultProps(action, address);
- addressingProps.setReplyTo(AddressingBuilder.getAddressingBuilder().newEndpointReference(backPort));
+ addressingProps.setReplyTo(AddressingBuilder.getAddressingBuilder().newEndpointReference(candidateSequence.getBackPort()));
}
else
{
@@ -516,18 +519,22 @@
Map requestContext = getBindingProvider().getRequestContext();
requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProps);
// set up wsrm request context
- QName createSequenceQN = org.jboss.ws.extensions.wsrm.spi.RMProvider.get().getConstants().getCreateSequenceQName();
+ QName createSequenceQN = RMProvider.get().getConstants().getCreateSequenceQName();
Map rmRequestContext = new HashMap();
List outMsgs = new LinkedList();
outMsgs.add(createSequenceQN);
rmRequestContext.put(RMConstant.PROTOCOL_MESSAGES, outMsgs);
+ rmRequestContext.put(RMConstant.SEQUENCE_REFERENCE, candidateSequence);
requestContext.put(RMConstant.REQUEST_CONTEXT, rmRequestContext);
// invoke stub method
invoke(createSequenceQN, new Object[] {}, getBindingProvider().getResponseContext());
// read WSRM sequence id from response context
Map rmResponseContext = (Map)getBindingProvider().getResponseContext().get(RMConstant.RESPONSE_CONTEXT);
- String id = ((RMCreateSequenceResponse)((Map)rmResponseContext.get(RMConstant.PROTOCOL_MESSAGES_MAPPING)).get(org.jboss.ws.extensions.wsrm.spi.RMProvider.get().getConstants().getCreateSequenceResponseQName())).getIdentifier();
- return this.wsrmSequence = new RMSequenceImpl(this, id, backPort);
+ RMCreateSequenceResponse createSequenceResponse = ((RMCreateSequenceResponse)((Map)rmResponseContext.get(RMConstant.PROTOCOL_MESSAGES_MAPPING)).get(RMProvider.get().getConstants().getCreateSequenceResponseQName()));
+ String outboundId = createSequenceResponse.getIdentifier();
+ candidateSequence.setClient(this);
+ candidateSequence.setOutboundId(outboundId);
+ return this.wsrmSequence = candidateSequence;
}
catch (Exception e)
{
Modified: stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMClientHandler.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMClientHandler.java 2007-11-28 13:49:16 UTC (rev 5133)
+++ stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMClientHandler.java 2007-11-28 15:05:41 UTC (rev 5134)
@@ -89,6 +89,7 @@
rmRequestContext.put(RMConstant.WSA_MESSAGE_ID, optionalMessageId);
rmRequestContext.put(RMConstant.PROTOCOL_MESSAGES_MAPPING, data);
SOAPMessage soapMessage = ((SOAPMessageContext)commonMsgContext).getMessage();
+ RMSequenceImpl sequenceImpl = (RMSequenceImpl)rmRequestContext.get(RMConstant.SEQUENCE_REFERENCE);
QName msgQName = rmConstants.getCreateSequenceQName();
if (outMsgs.contains(msgQName))
@@ -106,7 +107,6 @@
if (outMsgs.contains(msgQName))
{
// try to serialize Sequence to message
- RMSequenceImpl sequenceImpl = (RMSequenceImpl)rmRequestContext.get(RMConstant.SEQUENCE_REFERENCE);
RMSequence sequence = rmFactory.newSequence();
sequence.setIdentifier(sequenceImpl.getOutboundId());
sequence.setMessageNumber(sequenceImpl.newMessageNumber());
@@ -119,7 +119,6 @@
if (outMsgs.contains(msgQName))
{
// try to serialize AckRequested to message
- RMSequenceImpl sequenceImpl = (RMSequenceImpl)rmRequestContext.get(RMConstant.SEQUENCE_REFERENCE);
RMAckRequested ackRequested = rmFactory.newAckRequested();
ackRequested.setIdentifier(sequenceImpl.getOutboundId());
ackRequested.setMessageNumber(sequenceImpl.getLastMessageNumber());
@@ -132,7 +131,6 @@
if (outMsgs.contains(msgQName))
{
// try to serialize CloseSequence to message
- RMSequenceImpl sequenceImpl = (RMSequenceImpl)rmRequestContext.get(RMConstant.SEQUENCE_REFERENCE);
RMCloseSequence closeSequence = rmFactory.newCloseSequence();
closeSequence.setIdentifier(sequenceImpl.getOutboundId());
closeSequence.setLastMsgNumber(sequenceImpl.getLastMessageNumber());
@@ -145,7 +143,6 @@
if (outMsgs.contains(msgQName))
{
// try to serialize CloseSequenceResponse to message
- RMSequenceImpl sequenceImpl = (RMSequenceImpl)rmRequestContext.get(RMConstant.SEQUENCE_REFERENCE);
RMCloseSequenceResponse closeSequenceResponse = rmFactory.newCloseSequenceResponse();
closeSequenceResponse.setIdentifier(sequenceImpl.getOutboundId());
data.put(msgQName, closeSequenceResponse);
@@ -156,7 +153,6 @@
if (outMsgs.contains(msgQName))
{
// try to serialize TerminateSequence to message
- RMSequenceImpl sequenceImpl = (RMSequenceImpl)rmRequestContext.get(RMConstant.SEQUENCE_REFERENCE);
RMTerminateSequence terminateSequence = rmFactory.newTerminateSequence();
terminateSequence.setIdentifier(sequenceImpl.getOutboundId());
terminateSequence.setLastMsgNumber(sequenceImpl.getLastMessageNumber());
@@ -169,7 +165,6 @@
if (outMsgs.contains(msgQName))
{
// try to serialize terminateSequenceResponse to message
- RMSequenceImpl sequenceImpl = (RMSequenceImpl)rmRequestContext.get(RMConstant.SEQUENCE_REFERENCE);
RMTerminateSequenceResponse terminateSequenceResponse = rmFactory.newTerminateSequenceResponse();
terminateSequenceResponse.setIdentifier(sequenceImpl.getOutboundId());
data.put(msgQName, terminateSequenceResponse);
Modified: stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMSequenceImpl.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMSequenceImpl.java 2007-11-28 13:49:16 UTC (rev 5133)
+++ stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/RMSequenceImpl.java 2007-11-28 15:05:41 UTC (rev 5134)
@@ -22,6 +22,7 @@
package org.jboss.ws.extensions.wsrm;
import java.net.URI;
+import java.net.URISyntaxException;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
@@ -40,8 +41,11 @@
import org.jboss.logging.Logger;
import org.jboss.ws.core.jaxws.client.ClientImpl;
import org.jboss.ws.extensions.addressing.AddressingClientUtil;
+import org.jboss.ws.extensions.wsrm.api.RMAddressingType;
import org.jboss.ws.extensions.wsrm.api.RMException;
import org.jboss.ws.extensions.wsrm.api.RMSequence;
+import org.jboss.ws.extensions.wsrm.api.RMSequenceType;
+import org.jboss.ws.extensions.wsrm.config.RMConfig;
import org.jboss.ws.extensions.wsrm.spi.RMConstants;
import org.jboss.ws.extensions.wsrm.spi.RMProvider;
import org.jboss.ws.extensions.wsrm.transport.RMUnassignedMessageListener;
@@ -60,10 +64,13 @@
private static final Logger logger = Logger.getLogger(RMSequenceImpl.class);
private static final RMConstants wsrmConstants = RMProvider.get().getConstants();
- private final String incomingSequenceId;
- private final String outgoingSequenceId;
- private final URI backPort;
- private final ClientImpl client;
+ private final String incomingSequenceId = "http://sequence/id/123"; // TODO: use generator
+ private final RMConfig wsrmConfig;
+ private final RMSequenceType sequenceType;
+ private final RMAddressingType addrType;
+ private String outgoingSequenceId;
+ private URI backPort;
+ private ClientImpl client;
// object states variables
private boolean terminated = false;
private boolean discarded = false;
@@ -71,11 +78,6 @@
private final Lock objectLock = new ReentrantLock();
private AtomicInteger countOfUnassignedMessagesAvailable = new AtomicInteger();
- public RMSequenceImpl(ClientImpl client, String outId, URI backPort)
- {
- this(client, outId, null, backPort);
- }
-
public void unassignedMessageReceived()
{
// we can't use objectLock in the method - possible deadlock
@@ -83,19 +85,55 @@
logger.debug("Unassigned message available in callback handler");
}
- public RMSequenceImpl(ClientImpl client, String outId, String inId, URI backPort)
+ public RMSequenceImpl(RMAddressingType addrType, RMSequenceType sequenceType, RMConfig wsrmConfig)
{
super();
- this.client = client;
- this.incomingSequenceId = inId;
- this.outgoingSequenceId = outId;
- this.backPort = backPort;
- RMSequenceManager.getInstance().register(this);
+ if ((addrType == null) || (sequenceType == null) || (wsrmConfig == null))
+ throw new IllegalArgumentException();
+
+ this.addrType = addrType;
+ this.sequenceType = sequenceType;
+ this.wsrmConfig = wsrmConfig;
+ try
+ {
+ this.backPort = new URI("http://localhost:8888/temporary_listen_address/666"); // TODO: use generator;;
+ }
+ catch (URISyntaxException use)
+ {
+ logger.warn(use);
+ }
}
+ public final void setOutboundId(String outboundId)
+ {
+ this.objectLock.lock();
+ try
+ {
+ this.outgoingSequenceId = outboundId;
+ }
+ finally
+ {
+ this.objectLock.unlock();
+ }
+ }
+
+ public final void setClient(ClientImpl client)
+ {
+ this.objectLock.lock();
+ try
+ {
+ this.client = client;
+ RMSequenceManager.getInstance().register(this);
+ }
+ finally
+ {
+ this.objectLock.unlock();
+ }
+ }
+
public final URI getBackPort()
{
- return this.backPort;
+ return (this.addrType == RMAddressingType.ADDRESSABLE) ? this.backPort : null;
}
public final long newMessageNumber()
Modified: stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/transport/RMTransportHelper.java
===================================================================
--- stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/transport/RMTransportHelper.java 2007-11-28 13:49:16 UTC (rev 5133)
+++ stack/native/trunk/src/main/java/org/jboss/ws/extensions/wsrm/transport/RMTransportHelper.java 2007-11-28 15:05:41 UTC (rev 5134)
@@ -3,22 +3,13 @@
import static org.jboss.ws.extensions.wsrm.RMConstant.*;
import java.net.URI;
-import java.util.List;
import java.util.Map;
-import javax.xml.namespace.QName;
-
-import org.jboss.logging.Logger;
import org.jboss.ws.extensions.wsrm.RMConstant;
import org.jboss.ws.extensions.wsrm.RMSequenceImpl;
-import org.jboss.ws.extensions.wsrm.spi.RMProvider;
-import org.jboss.ws.extensions.wsrm.spi.protocol.RMCreateSequence;
-import org.jboss.ws.extensions.wsrm.spi.protocol.RMSerializable;
public final class RMTransportHelper
{
- private static final Logger log = Logger.getLogger(RMTransportHelper.class);
-
private RMTransportHelper()
{
// no instances
@@ -31,44 +22,23 @@
public static String getMessageId(RMMessage rmRequest)
{
- Map<String, Object> invocationCtx = (Map<String, Object>)rmRequest.getMetadata().getContext(INVOCATION_CONTEXT);
- Map<String, Object> wsrmRequestCtx = (Map<String, Object>)invocationCtx.get(REQUEST_CONTEXT);
- return (String)wsrmRequestCtx.get(WSA_MESSAGE_ID);
+ return (String)getWsrmRequestContext(rmRequest).get(WSA_MESSAGE_ID);
}
public static URI getBackPortURI(RMMessage rmRequest)
{
+ return getSequence(rmRequest).getBackPort();
+ }
+
+ private static Map<String, Object> getWsrmRequestContext(RMMessage rmRequest)
+ {
Map<String, Object> invocationCtx = (Map<String, Object>)rmRequest.getMetadata().getContext(INVOCATION_CONTEXT);
- Map<String, Object> wsrmRequestCtx = (Map<String, Object>)invocationCtx.get(REQUEST_CONTEXT);
- List<RMSerializable> outMsgs = (List<RMSerializable>)wsrmRequestCtx.get(PROTOCOL_MESSAGES);
- Map<QName, RMSerializable> msgs = (Map<QName, RMSerializable>)wsrmRequestCtx.get(PROTOCOL_MESSAGES_MAPPING);
- QName createSequenceQName = RMProvider.get().getConstants().getCreateSequenceQName();
- URI retVal = null;
- if (outMsgs.contains(createSequenceQName))
- {
- RMCreateSequence cs = (RMCreateSequence)msgs.get(createSequenceQName);
- try
- {
- retVal = RMConstant.WSA_ANONYMOUS_URI.equals(cs.getAcksTo()) ? null : new URI(cs.getAcksTo());;
- }
- catch (Exception e)
- {
- log.warn(e.getMessage(), e);
- }
- }
- else
- {
- retVal = ((RMSequenceImpl)wsrmRequestCtx.get(SEQUENCE_REFERENCE)).getBackPort();
- }
-
- return retVal;
+ return (Map<String, Object>)invocationCtx.get(REQUEST_CONTEXT);
}
public static RMSequenceImpl getSequence(RMMessage rmRequest)
{
- Map<String, Object> invocationCtx = (Map<String, Object>)rmRequest.getMetadata().getContext(INVOCATION_CONTEXT);
- Map<String, Object> wsrmRequestCtx = (Map<String, Object>)invocationCtx.get(REQUEST_CONTEXT);
- return (RMSequenceImpl)wsrmRequestCtx.get(SEQUENCE_REFERENCE);
+ return (RMSequenceImpl)getWsrmRequestContext(rmRequest).get(SEQUENCE_REFERENCE);
}
public static boolean isOneWayOperation(RMMessage rmRequest)
17 years, 3 months
JBossWS SVN: r5133 - stack/cxf/trunk.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-11-28 08:49:16 -0500 (Wed, 28 Nov 2007)
New Revision: 5133
Modified:
stack/cxf/trunk/
Log:
Add clibboard to svn:ignore
Property changes on: stack/cxf/trunk
___________________________________________________________________
Name: svn:ignore
- ant.properties
apache-cxf
output*
thirdparty
version.properties.md5
+ ant.properties
apache-cxf
output*
thirdparty
version.properties.md5
clipboard.*
17 years, 3 months
JBossWS SVN: r5132 - stack/cxf/trunk/src/main/java/org/jboss/wsf/stack/cxf.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2007-11-28 08:47:42 -0500 (Wed, 28 Nov 2007)
New Revision: 5132
Modified:
stack/cxf/trunk/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java
Log:
Fix cxf integration
Modified: stack/cxf/trunk/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java
===================================================================
--- stack/cxf/trunk/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java 2007-11-28 12:54:15 UTC (rev 5131)
+++ stack/cxf/trunk/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java 2007-11-28 13:47:42 UTC (rev 5132)
@@ -35,19 +35,18 @@
import javax.servlet.http.HttpServletResponse;
import javax.xml.ws.WebServiceException;
-import org.apache.cxf.transport.DestinationFactory;
import org.apache.cxf.transport.servlet.CXFServlet;
import org.apache.cxf.transport.servlet.ServletController;
import org.apache.cxf.transport.servlet.ServletTransportFactory;
import org.jboss.logging.Logger;
import org.jboss.wsf.common.ObjectNameFactory;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.invocation.EndpointAssociation;
-import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.invocation.RequestHandler;
import org.jboss.wsf.spi.management.EndpointRegistry;
import org.jboss.wsf.spi.management.EndpointRegistryFactory;
-import org.jboss.wsf.spi.SPIProviderResolver;
-import org.jboss.wsf.spi.SPIProvider;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.GenericApplicationContext;
@@ -69,6 +68,7 @@
protected EndpointRegistry epRegistry;
protected GenericApplicationContext childCtx;
+ @Override
public void init(ServletConfig servletConfig) throws ServletException
{
super.init(servletConfig);
@@ -76,22 +76,34 @@
// Init the Endpoint
SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
epRegistry = spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
-
+
ServletContext context = servletConfig.getServletContext();
String contextPath = context.getContextPath();
endpoint = initServiceEndpoint(contextPath);
-
+
context.setAttribute(ServletController.class.getName(), getController());
}
- public ServletController createServletController()
+ @Override
+ public ServletController createServletController(ServletConfig servletConfig)
{
ServletTransportFactory stf = (ServletTransportFactory)createServletTransportFactory();
return new ServletControllerExt(stf, this);
}
- protected void loadAdditionalConfig(ApplicationContext ctx, ServletConfig servletConfig) throws ServletException
+ @Override
+ public void loadBus(ServletConfig servletConfig) throws ServletException
{
+ super.loadBus(servletConfig);
+
+ ServletContext svCtx = getServletContext();
+ ApplicationContext appCtx = (ApplicationContext)svCtx.getAttribute("org.springframework.web.context.WebApplicationContext.ROOT");
+
+ loadAdditionalConfigExt(appCtx, servletConfig);
+ }
+
+ private void loadAdditionalConfigExt(ApplicationContext ctx, ServletConfig servletConfig) throws ServletException
+ {
String location = servletConfig.getServletContext().getInitParameter(PARAM_CXF_BEANS_URL);
InputStream is;
@@ -115,6 +127,7 @@
}
}
+ @Override
public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
{
try
@@ -129,15 +142,18 @@
}
}
+ @Override
public void destroy()
{
if (childCtx != null)
childCtx.destroy();
+
+ super.destroy();
}
/** Initialize the service endpoint
*/
- protected Endpoint initServiceEndpoint(String contextPath)
+ private Endpoint initServiceEndpoint(String contextPath)
{
if (contextPath.startsWith("/"))
contextPath = contextPath.substring(1);
17 years, 3 months