JBossWS SVN: r12940 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: sergeyb
Date: 2010-09-09 09:22:31 -0400 (Thu, 09 Sep 2010)
New Revision: 12940
Modified:
stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt
Log:
[JBWS-2945] : Enabling AddressingStatefulTestCase on AS 6.x
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-09-09 12:31:32 UTC (rev 12939)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt 2010-09-09 13:22:31 UTC (rev 12940)
@@ -32,7 +32,6 @@
# [JBWS-2945] JAX-WS 2.2 implementation not yet available for CXF stack
org/jboss/test/ws/jaxws/jbws2942/**
org/jboss/test/ws/jaxws/jbws3031/**
-org/jboss/test/ws/jaxws/samples/addressing/AddressingStatefulTestCase.*
# [JBWS-2987] Review JMS integration
org/jboss/test/ws/jaxws/samples/jmstransport/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-09-09 12:31:32 UTC (rev 12939)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss601.txt 2010-09-09 13:22:31 UTC (rev 12940)
@@ -32,7 +32,6 @@
# [JBWS-2945] JAX-WS 2.2 implementation not yet available for CXF stack
org/jboss/test/ws/jaxws/jbws2942/**
org/jboss/test/ws/jaxws/jbws3031/**
-org/jboss/test/ws/jaxws/samples/addressing/AddressingStatefulTestCase.*
# [JBWS-2987] Review JMS integration
org/jboss/test/ws/jaxws/samples/jmstransport/**
15 years, 2 months
JBossWS SVN: r12939 - stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2010-09-09 08:31:32 -0400 (Thu, 09 Sep 2010)
New Revision: 12939
Modified:
stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/pom.xml
Log:
[JBPAPP-5053] Set patch version.
Modified: stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/pom.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/pom.xml 2010-09-09 12:30:52 UTC (rev 12938)
+++ stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/pom.xml 2010-09-09 12:31:32 UTC (rev 12939)
@@ -47,8 +47,8 @@
<!-- Properties -->
<properties>
- <jbossws.common.version>1.1.0.SP2_CP01</jbossws.common.version>
- <jbossws.framework.version>3.1.2.SP4_CP01</jbossws.framework.version>
+ <jbossws.common.version>1.1.0.SP2_CP01_JBPAPP-5053</jbossws.common.version>
+ <jbossws.framework.version>3.1.2.SP4_CP01_JBPAPP-5053</jbossws.framework.version>
<jbossws.spi.version>1.1.2.SP1_CP01</jbossws.spi.version>
<!-- [JBWS-2505] -->
<!-- START -->
15 years, 2 months
JBossWS SVN: r12938 - framework/branches/jbossws-framework-3.1.2.SP4_CP01_JBPAPP-5053.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2010-09-09 08:30:52 -0400 (Thu, 09 Sep 2010)
New Revision: 12938
Modified:
framework/branches/jbossws-framework-3.1.2.SP4_CP01_JBPAPP-5053/pom.xml
Log:
[JBPAPP-5053] Set patch version.
Modified: framework/branches/jbossws-framework-3.1.2.SP4_CP01_JBPAPP-5053/pom.xml
===================================================================
--- framework/branches/jbossws-framework-3.1.2.SP4_CP01_JBPAPP-5053/pom.xml 2010-09-09 12:03:47 UTC (rev 12937)
+++ framework/branches/jbossws-framework-3.1.2.SP4_CP01_JBPAPP-5053/pom.xml 2010-09-09 12:30:52 UTC (rev 12938)
@@ -6,7 +6,7 @@
<artifactId>jbossws-framework</artifactId>
<packaging>jar</packaging>
- <version>3.1.2.SP4_CP01</version>
+ <version>3.1.2.SP4_CP01_JBPAPP-5053</version>
<!-- Parent -->
<parent>
@@ -24,7 +24,7 @@
<!-- Properties -->
<properties>
- <jbossws.common.version>1.1.0.SP2_CP01</jbossws.common.version>
+ <jbossws.common.version>1.1.0.SP2_CP01_JBPAPP-5053</jbossws.common.version>
<jbossws.spi.version>1.1.2.SP1_CP01</jbossws.spi.version>
<jboss.common.version>1.2.1.GA</jboss.common.version>
<jbossxb.version>1.0.0.SP1</jbossxb.version>
15 years, 2 months
JBossWS SVN: r12937 - framework/branches.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2010-09-09 08:03:47 -0400 (Thu, 09 Sep 2010)
New Revision: 12937
Added:
framework/branches/jbossws-framework-3.1.2.SP4_CP01_JBPAPP-5053/
Log:
[JBPAPP-5053] Branch for patch.
Copied: framework/branches/jbossws-framework-3.1.2.SP4_CP01_JBPAPP-5053 (from rev 12936, framework/tags/jbossws-framework-3.1.2.SP4_CP01)
15 years, 2 months
JBossWS SVN: r12936 - common/branches/jbossws-common-1.1.0.SP2_CP01_JBPAPP-5053.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2010-09-09 08:00:22 -0400 (Thu, 09 Sep 2010)
New Revision: 12936
Modified:
common/branches/jbossws-common-1.1.0.SP2_CP01_JBPAPP-5053/pom.xml
Log:
[JBPAPP-5053] Set patch version.
Modified: common/branches/jbossws-common-1.1.0.SP2_CP01_JBPAPP-5053/pom.xml
===================================================================
--- common/branches/jbossws-common-1.1.0.SP2_CP01_JBPAPP-5053/pom.xml 2010-09-09 11:46:09 UTC (rev 12935)
+++ common/branches/jbossws-common-1.1.0.SP2_CP01_JBPAPP-5053/pom.xml 2010-09-09 12:00:22 UTC (rev 12936)
@@ -8,7 +8,7 @@
<artifactId>jbossws-common</artifactId>
<packaging>jar</packaging>
- <version>1.1.0.SP2_CP01</version>
+ <version>1.1.0.SP2_CP01_JBPAPP-5053</version>
<!-- Parent -->
<parent>
15 years, 2 months
JBossWS SVN: r12935 - common/branches.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2010-09-09 07:46:09 -0400 (Thu, 09 Sep 2010)
New Revision: 12935
Added:
common/branches/jbossws-common-1.1.0.SP2_CP01_JBPAPP-5053/
Log:
[JBPAPP-5053] Branch for patch.
Copied: common/branches/jbossws-common-1.1.0.SP2_CP01_JBPAPP-5053 (from rev 12934, common/tags/jbossws-common-1.1.0.SP2_CP01)
15 years, 2 months
JBossWS SVN: r12934 - stack/native/branches.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2010-09-09 07:29:40 -0400 (Thu, 09 Sep 2010)
New Revision: 12934
Added:
stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053/
Log:
[JBPAPP-5053] Branch for patch.
Copied: stack/native/branches/jbossws-native-3.1.2.SP3_CP01_JBPAPP-5053 (from rev 12933, stack/native/tags/jbossws-native-3.1.2.SP3_CP01)
15 years, 2 months
JBossWS SVN: r12933 - in stack/native/branches/jbossws-native-2.0.1.SP2_CP/src: main/java/org/jboss/ws/core/jaxws/spi and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2010-09-08 07:31:56 -0400 (Wed, 08 Sep 2010)
New Revision: 12933
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/client/ResponseImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws3071/StringHandler.java
Log:
[JBPAPP-4515] JAX-WS Asynchronous Client Exception issues.
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/client/ResponseImpl.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/client/ResponseImpl.java 2010-09-08 10:45:47 UTC (rev 12932)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/client/ResponseImpl.java 2010-09-08 11:31:56 UTC (rev 12933)
@@ -47,7 +47,6 @@
private Exception exception;
private Map<String, Object> context = new HashMap<String, Object>();
-
public void setException(Exception ex)
{
this.exception = ex;
@@ -69,16 +68,16 @@
throw new WebServiceException(exception);
}
}
-
+
return delegate;
}
-
+
private Future getFutureInternal()
{
if (delegate == null)
- throw new IllegalStateException("Future not available");
-
- return delegate;
+ throw new IllegalStateException("Future not available");
+
+ return delegate;
}
public void setFuture(Future delegate)
@@ -95,7 +94,7 @@
{
this.result = result;
}
-
+
public boolean cancel(boolean mayInterruptIfRunning)
{
return getFutureInternal().cancel(mayInterruptIfRunning);
@@ -103,24 +102,34 @@
public Object get() throws InterruptedException, ExecutionException
{
- if (result == null)
+ Object response = getResult();
+ if (response != null)
{
- getFutureInternal().get();
+ return response;
}
-
- if (exception != null)
- throw new ExecutionException(exception);
- return result;
+ getFutureInternal().get();
+ response = getResult();
+
+ return response;
}
public Object get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
{
- if (result == null)
+ Object response = getResult();
+ if (response != null)
{
- getFutureInternal().get(timeout, unit);
+ return response;
}
+ getFutureInternal().get(timeout, unit);
+ response = getResult();
+
+ return response;
+ }
+
+ private Object getResult() throws ExecutionException
+ {
if (exception != null)
throw new ExecutionException(exception);
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2010-09-08 10:45:47 UTC (rev 12932)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2010-09-08 11:31:56 UTC (rev 12933)
@@ -89,8 +89,11 @@
// provide logging
private final Logger log = Logger.getLogger(ServiceDelegateImpl.class);
+ // Lock to ensure only one thread can initialise the defaultExecutor.
+ private static final Object DEFAULT_EXECUTOR_LOCK = new Object();
// The executor service
- private static ExecutorService defaultExecutor = Executors.newCachedThreadPool();
+ private static ExecutorService defaultExecutor = null;
+
// The service meta data that is associated with this JAXWS Service
private ServiceMetaData serviceMetaData;
// The ServiceRefMetaData supplied by the ServiceObjectFactory
@@ -363,12 +366,32 @@
this.handlerResolver = handlerResolver;
}
+ private ExecutorService getDefaultExecutor()
+ {
+ if (defaultExecutor == null)
+ {
+ synchronized (DEFAULT_EXECUTOR_LOCK)
+ {
+ if (defaultExecutor == null)
+ {
+ defaultExecutor = Executors.newCachedThreadPool();
+ if (log.isTraceEnabled())
+ {
+ log.trace("Created new defaultExecutor", new Throwable("Call Trace"));
+ }
+ }
+ }
+ }
+
+ return defaultExecutor;
+ }
+
@Override
public Executor getExecutor()
{
if (executor == null)
{
- executor = defaultExecutor;
+ executor = getDefaultExecutor();
}
return executor;
}
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws3071/StringHandler.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws3071/StringHandler.java 2010-09-08 10:45:47 UTC (rev 12932)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbws3071/StringHandler.java 2010-09-08 11:31:56 UTC (rev 12933)
@@ -21,6 +21,10 @@
*/
package org.jboss.test.ws.jaxws.jbws3071;
+import java.util.concurrent.ExecutionException;
+
+import org.jboss.logging.Logger;
+
import javax.xml.ws.AsyncHandler;
import javax.xml.ws.Response;
@@ -30,11 +34,26 @@
*/
public class StringHandler implements AsyncHandler<String>
{
+ private static final Logger log = Logger.getLogger(StringHandler.class);
private Response<String> response;
public void handleResponse(Response<String> res)
{
+ try
+ {
+ Object response = res.get();
+ log.debug("Obtained Response - " + response.toString());
+ }
+ catch (InterruptedException e)
+ {
+ log.debug("Caught InterruptedException", e);
+ }
+ catch (ExecutionException e)
+ {
+ log.debug("Caught ExecutionException", e);
+
+ }
this.response = res;
}
15 years, 2 months
JBossWS SVN: r12932 - in stack/native/branches/jbossws-native-3.1.2/modules: core/src/main/java/org/jboss/ws/core/jaxws/spi and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2010-09-08 06:45:47 -0400 (Wed, 08 Sep 2010)
New Revision: 12932
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ResponseImpl.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3071/JBWS3071TestCase.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3071/StringHandler.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3071/TestEndpointImpl.java
Log:
[JBPAPP-4515] JAX-WS Asynchronous Client Exception issues.
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java 2010-09-08 10:20:13 UTC (rev 12931)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientProxy.java 2010-09-08 10:45:47 UTC (rev 12932)
@@ -265,15 +265,15 @@
log.debug("Finished task " + getTaskID().toString() + ": " + result);
response.set(result);
-
- // Call the handler if available
- if (handler != null)
- handler.handleResponse(response);
}
catch (Exception ex)
{
handleAsynInvokeException(ex);
}
+
+ // Call the handler if available
+ if (handler != null)
+ handler.handleResponse(response);
}
// 2.3.4.5 Conformance (Asychronous fault cause): An ExecutionException that is thrown by the get method
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ResponseImpl.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ResponseImpl.java 2010-09-08 10:20:13 UTC (rev 12931)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ResponseImpl.java 2010-09-08 10:45:47 UTC (rev 12932)
@@ -45,7 +45,6 @@
private Exception exception;
private Map<String, Object> context = new HashMap<String, Object>();
-
public void setException(Exception ex)
{
this.exception = ex;
@@ -67,16 +66,16 @@
throw new WebServiceException(exception);
}
}
-
+
return delegate;
}
-
+
private Future getFutureInternal()
{
if (delegate == null)
- throw new IllegalStateException("Future not available");
-
- return delegate;
+ throw new IllegalStateException("Future not available");
+
+ return delegate;
}
public void setFuture(Future delegate)
@@ -93,7 +92,7 @@
{
this.result = result;
}
-
+
public boolean cancel(boolean mayInterruptIfRunning)
{
return getFutureInternal().cancel(mayInterruptIfRunning);
@@ -101,24 +100,34 @@
public Object get() throws InterruptedException, ExecutionException
{
- if (result == null)
+ Object response = getResult();
+ if (response != null)
{
- getFutureInternal().get();
+ return response;
}
-
- if (exception != null)
- throw new ExecutionException(exception);
- return result;
+ getFutureInternal().get();
+ response = getResult();
+
+ return response;
}
public Object get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
{
- if (result == null)
+ Object response = getResult();
+ if (response != null)
{
- getFutureInternal().get(timeout, unit);
+ return response;
}
+ getFutureInternal().get(timeout, unit);
+ response = getResult();
+
+ return response;
+ }
+
+ private Object getResult() throws ExecutionException
+ {
if (exception != null)
throw new ExecutionException(exception);
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2010-09-08 10:20:13 UTC (rev 12931)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/spi/ServiceDelegateImpl.java 2010-09-08 10:45:47 UTC (rev 12932)
@@ -98,8 +98,11 @@
// provide logging
private final Logger log = Logger.getLogger(ServiceDelegateImpl.class);
+ // Lock to ensure only one thread can initialise the defaultExecutor.
+ private static final Object DEFAULT_EXECUTOR_LOCK = new Object();
// The executor service
- private static ExecutorService defaultExecutor = Executors.newCachedThreadPool();
+ private static ExecutorService defaultExecutor = null;
+
// The service meta data that is associated with this JAXWS Service
private ServiceMetaData serviceMetaData;
// The ServiceRefMetaData supplied by the ServiceObjectFactory
@@ -392,12 +395,32 @@
this.handlerResolver = handlerResolver;
}
+ private ExecutorService getDefaultExecutor()
+ {
+ if (defaultExecutor == null)
+ {
+ synchronized (DEFAULT_EXECUTOR_LOCK)
+ {
+ if (defaultExecutor == null)
+ {
+ defaultExecutor = Executors.newCachedThreadPool();
+ if (log.isTraceEnabled())
+ {
+ log.trace("Created new defaultExecutor", new Throwable("Call Trace"));
+ }
+ }
+ }
+ }
+
+ return defaultExecutor;
+ }
+
@Override
public Executor getExecutor()
{
if (executor == null)
{
- executor = defaultExecutor;
+ executor = getDefaultExecutor();
}
return executor;
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3071/JBWS3071TestCase.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3071/JBWS3071TestCase.java 2010-09-08 10:20:13 UTC (rev 12931)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3071/JBWS3071TestCase.java 2010-09-08 10:45:47 UTC (rev 12932)
@@ -130,4 +130,26 @@
}
}
+ public void testEchoFailAsyncFuture_isDone() throws Exception
+ {
+ StringHandler handler = new StringHandler();
+
+ Future future = port.echoAsync("FAIL SLEEP", handler);
+ while (future.isDone() == false)
+ {
+ Thread.sleep(200);
+ }
+
+ try
+ {
+ handler.getResponse().get();
+ fail("Expected 'ExecutionException' not thrown.");
+ }
+ catch (ExecutionException ee)
+ {
+ Exception cause = (Exception)ee.getCause();
+ assertEquals("Cause Type", TestException.class, cause.getClass());
+ }
+ }
+
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3071/StringHandler.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3071/StringHandler.java 2010-09-08 10:20:13 UTC (rev 12931)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3071/StringHandler.java 2010-09-08 10:45:47 UTC (rev 12932)
@@ -21,6 +21,10 @@
*/
package org.jboss.test.ws.jaxws.jbws3071;
+import java.util.concurrent.ExecutionException;
+
+import org.jboss.logging.Logger;
+
import javax.xml.ws.AsyncHandler;
import javax.xml.ws.Response;
@@ -30,12 +34,27 @@
*/
public class StringHandler implements AsyncHandler<String>
{
+ private static final Logger log = Logger.getLogger(StringHandler.class);
private Response<String> response;
@Override
public void handleResponse(Response<String> res)
{
+ try
+ {
+ Object response = res.get();
+ log.debug("Obtained Response - " + response.toString());
+ }
+ catch (InterruptedException e)
+ {
+ log.debug("Caught InterruptedException", e);
+ }
+ catch (ExecutionException e)
+ {
+ log.debug("Caught ExecutionException", e);
+
+ }
this.response = res;
}
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3071/TestEndpointImpl.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3071/TestEndpointImpl.java 2010-09-08 10:20:13 UTC (rev 12931)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbws3071/TestEndpointImpl.java 2010-09-08 10:45:47 UTC (rev 12932)
@@ -34,8 +34,20 @@
public String echo(String message) throws TestException
{
- if ("FAIL".equals(message))
+ if (message.contains("SLEEP"))
{
+ try
+ {
+ Thread.sleep(5000);
+ }
+ catch (InterruptedException e)
+ {
+ throw new RuntimeException("Unable to sleep", e);
+ }
+ }
+
+ if (message.contains("FAIL"))
+ {
throw new TestException(message);
}
15 years, 2 months
JBossWS SVN: r12931 - in stack/cxf/trunk/modules/client: src/main/java/org/jboss/wsf/stack/cxf/client and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-09-08 06:20:13 -0400 (Wed, 08 Sep 2010)
New Revision: 12931
Modified:
stack/cxf/trunk/modules/client/pom.xml
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceObjectFactory.java
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceRefBinderJAXWS.java
Log:
[JBWS-3122] implementing @WebServiceRef with @Addressing feature
Modified: stack/cxf/trunk/modules/client/pom.xml
===================================================================
--- stack/cxf/trunk/modules/client/pom.xml 2010-09-08 09:58:59 UTC (rev 12930)
+++ stack/cxf/trunk/modules/client/pom.xml 2010-09-08 10:20:13 UTC (rev 12931)
@@ -231,6 +231,37 @@
<build>
<plugins>
<plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <showDeprecation>false</showDeprecation>
+ <compilerArguments>
+ <endorseddirs>${project.build.directory}/endorsed</endorseddirs>
+ </compilerArguments>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.jboss.spec.javax.xml.ws</groupId>
+ <artifactId>jboss-jaxws-api_2.2_spec</artifactId>
+ <type>jar</type>
+ <overWrite>true</overWrite>
+ <outputDirectory>${project.build.directory}/endorsed</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<artifactId>maven-jar-plugin</artifactId>
<dependencies>
<dependency>
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceObjectFactory.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceObjectFactory.java 2010-09-08 09:58:59 UTC (rev 12930)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceObjectFactory.java 2010-09-08 10:20:13 UTC (rev 12931)
@@ -38,6 +38,8 @@
import javax.naming.spi.ObjectFactory;
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceFeature;
+import javax.xml.ws.soap.AddressingFeature;
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
@@ -139,6 +141,20 @@
// Receives either a javax.xml.ws.Service or a dynamic proxy
Object target;
+ // configure addressing
+ AddressingFeature addressingFeature = null;
+ if (serviceRef.isAddressingEnabled()) {
+ final boolean enabled = serviceRef.isAddressingEnabled();
+ final boolean required = serviceRef.isAddressingRequired();
+ final String refResponses = serviceRef.getAddressingResponses();
+ AddressingFeature.Responses responses = AddressingFeature.Responses.ALL;
+ if ("ANONYMOUS".equals(refResponses))
+ responses = AddressingFeature.Responses.ANONYMOUS;
+ if ("NON_ANONYMOUS".equals(refResponses))
+ responses = AddressingFeature.Responses.NON_ANONYMOUS;
+ addressingFeature = new AddressingFeature(enabled, required, responses);
+ }
+
// Get the URL to the wsdl
URL wsdlURL = serviceRef.getWsdlLocation();
@@ -147,7 +163,11 @@
{
if (wsdlURL != null)
{
- target = Service.create(wsdlURL, serviceQName);
+ if (addressingFeature != null) {
+ target = Service.create(wsdlURL, serviceQName, new WebServiceFeature[] { addressingFeature });
+ } else {
+ target = Service.create(wsdlURL, serviceQName);
+ }
}
else
{
@@ -159,12 +179,22 @@
{
if (wsdlURL != null)
{
- Constructor ctor = serviceClass.getConstructor(new Class[] { URL.class, QName.class });
- target = ctor.newInstance(new Object[] { wsdlURL, serviceQName });
+ if (addressingFeature != null) {
+ Constructor ctor = serviceClass.getConstructor(new Class[] { URL.class, QName.class, WebServiceFeature[].class });
+ target = ctor.newInstance(new Object[] { wsdlURL, serviceQName, new WebServiceFeature[] { addressingFeature } });
+ } else {
+ Constructor ctor = serviceClass.getConstructor(new Class[] { URL.class, QName.class });
+ target = ctor.newInstance(new Object[] { wsdlURL, serviceQName });
+ }
}
else
{
- target = (Service)serviceClass.newInstance();
+ if (addressingFeature != null) {
+ Constructor ctor = serviceClass.getConstructor(new Class[] { WebServiceFeature[].class });
+ target = ctor.newInstance(new Object[] { new WebServiceFeature[] { addressingFeature } });
+ } else {
+ target = (Service)serviceClass.newInstance();
+ }
}
}
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceRefBinderJAXWS.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceRefBinderJAXWS.java 2010-09-08 09:58:59 UTC (rev 12930)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceRefBinderJAXWS.java 2010-09-08 10:20:13 UTC (rev 12931)
@@ -39,6 +39,8 @@
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceRef;
import javax.xml.ws.WebServiceRefs;
+import javax.xml.ws.soap.Addressing;
+import javax.xml.ws.soap.AddressingFeature;
import org.jboss.logging.Logger;
import org.jboss.util.naming.Util;
@@ -65,11 +67,15 @@
// Build the list of @WebServiceRef relevant annotations
List<WebServiceRef> wsrefList = new ArrayList<WebServiceRef>();
+ Addressing addressing = null;
if (anElement != null)
{
for (Annotation an : anElement.getAnnotations())
{
+ if (an instanceof Addressing)
+ addressing = (Addressing)an;
+
if (an instanceof WebServiceRef)
wsrefList.add((WebServiceRef)an);
@@ -82,6 +88,22 @@
}
}
+ if (addressing != null)
+ {
+ if (addressing.enabled())
+ serviceRef.setAddressingEnabled();
+
+ if (addressing.required())
+ serviceRef.setAddressingRequired();
+
+ if (addressing.responses() == AddressingFeature.Responses.ANONYMOUS)
+ serviceRef.setAddressingResponses("ANONYMOUS");
+ else if (addressing.responses() == AddressingFeature.Responses.NON_ANONYMOUS)
+ serviceRef.setAddressingResponses("NON_ANONYMOUS");
+ else
+ serviceRef.setAddressingResponses("ALL");
+ }
+
// Use the single @WebServiceRef
if (wsrefList.size() == 1)
{
@@ -121,7 +143,7 @@
String serviceImplClass = null;
// #1 Use the explicit @WebServiceRef.value
- if (wsref != null && wsref.value() != Object.class && wsref.value() != Service.class)
+ if (wsref != null && wsref.value() != Service.class)
serviceImplClass = wsref.value().getName();
// #2 Use the target ref type
15 years, 2 months