JBossWS SVN: r13415 - common/trunk/src/main/java/org/jboss/wsf/common/invocation.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-12-06 09:21:34 -0500 (Mon, 06 Dec 2010)
New Revision: 13415
Modified:
common/trunk/src/main/java/org/jboss/wsf/common/invocation/AbstractInvocationHandlerJSE.java
common/trunk/src/main/java/org/jboss/wsf/common/invocation/InvocationHandlerJAXWS.java
Log:
[JBWS-3179] refactoring JSE endpoint injections from CXF to COMMON
Modified: common/trunk/src/main/java/org/jboss/wsf/common/invocation/AbstractInvocationHandlerJSE.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/common/invocation/AbstractInvocationHandlerJSE.java 2010-12-06 14:19:39 UTC (rev 13414)
+++ common/trunk/src/main/java/org/jboss/wsf/common/invocation/AbstractInvocationHandlerJSE.java 2010-12-06 14:21:34 UTC (rev 13415)
@@ -23,6 +23,10 @@
import java.lang.reflect.Method;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.invocation.InvocationContext;
@@ -36,6 +40,10 @@
public abstract class AbstractInvocationHandlerJSE extends AbstractInvocationHandler
{
+ private static final String POJO_JNDI_PREFIX = "java:comp/env/";
+
+ private boolean initialized;
+
/**
* Constructor.
*/
@@ -63,7 +71,8 @@
* @return endpoint implementation
* @throws Exception if any error occurs
*/
- protected final Object getTargetBean(final Endpoint endpoint, final Invocation invocation) throws Exception
+ protected synchronized final Object getTargetBean(final Endpoint endpoint, final Invocation invocation)
+ throws Exception
{
final InvocationContext invocationContext = invocation.getInvocationContext();
Object targetBean = invocationContext.getTargetBean();
@@ -76,9 +85,6 @@
final Class<?> endpointImplClass = endpoint.getTargetBeanClass();
targetBean = endpointImplClass.newInstance();
invocationContext.setTargetBean(targetBean);
-
- // notify subclasses
- this.onEndpointInstantiated(endpoint, invocation);
}
catch (Exception ex)
{
@@ -86,6 +92,13 @@
}
}
+ if (!this.initialized)
+ {
+ // notify subclasses
+ this.onEndpointInstantiated(endpoint, invocation);
+ this.initialized = true;
+ }
+
return targetBean;
}
@@ -144,4 +157,10 @@
}
}
+ @Override
+ public Context getJNDIContext(final Endpoint ep) throws NamingException
+ {
+ return (Context) new InitialContext().lookup(POJO_JNDI_PREFIX);
+ }
+
}
Modified: common/trunk/src/main/java/org/jboss/wsf/common/invocation/InvocationHandlerJAXWS.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/common/invocation/InvocationHandlerJAXWS.java 2010-12-06 14:19:39 UTC (rev 13414)
+++ common/trunk/src/main/java/org/jboss/wsf/common/invocation/InvocationHandlerJAXWS.java 2010-12-06 14:21:34 UTC (rev 13415)
@@ -21,9 +21,6 @@
*/
package org.jboss.wsf.common.invocation;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
import javax.xml.ws.WebServiceContext;
import org.jboss.wsf.common.injection.InjectionHelper;
@@ -47,8 +44,6 @@
public final class InvocationHandlerJAXWS extends AbstractInvocationHandlerJSE
{
- private static final String POJO_JNDI_PREFIX = "java:comp/env/";
-
/**
* Constructor.
*/
@@ -108,11 +103,6 @@
ThreadLocalAwareWebServiceContext.getInstance().setMessageContext(null);
}
- public Context getJNDIContext(final Endpoint ep) throws NamingException
- {
- return (Context) new InitialContext().lookup(POJO_JNDI_PREFIX);
- }
-
/**
* Returns WebServiceContext associated with this invocation.
*
13 years, 5 months
JBossWS SVN: r13414 - common/branches/jbossws-common-1.4.1/src/main/java/org/jboss/wsf/common/invocation.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-12-06 09:19:39 -0500 (Mon, 06 Dec 2010)
New Revision: 13414
Modified:
common/branches/jbossws-common-1.4.1/src/main/java/org/jboss/wsf/common/invocation/AbstractInvocationHandlerJSE.java
common/branches/jbossws-common-1.4.1/src/main/java/org/jboss/wsf/common/invocation/InvocationHandlerJAXWS.java
Log:
[JBWS-3179] refactoring JSE endpoint injections from CXF to COMMON
Modified: common/branches/jbossws-common-1.4.1/src/main/java/org/jboss/wsf/common/invocation/AbstractInvocationHandlerJSE.java
===================================================================
--- common/branches/jbossws-common-1.4.1/src/main/java/org/jboss/wsf/common/invocation/AbstractInvocationHandlerJSE.java 2010-12-06 14:17:33 UTC (rev 13413)
+++ common/branches/jbossws-common-1.4.1/src/main/java/org/jboss/wsf/common/invocation/AbstractInvocationHandlerJSE.java 2010-12-06 14:19:39 UTC (rev 13414)
@@ -23,6 +23,10 @@
import java.lang.reflect.Method;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.invocation.InvocationContext;
@@ -36,6 +40,10 @@
public abstract class AbstractInvocationHandlerJSE extends AbstractInvocationHandler
{
+ private static final String POJO_JNDI_PREFIX = "java:comp/env/";
+
+ private boolean initialized;
+
/**
* Constructor.
*/
@@ -63,7 +71,8 @@
* @return endpoint implementation
* @throws Exception if any error occurs
*/
- protected final Object getTargetBean(final Endpoint endpoint, final Invocation invocation) throws Exception
+ protected synchronized final Object getTargetBean(final Endpoint endpoint, final Invocation invocation)
+ throws Exception
{
final InvocationContext invocationContext = invocation.getInvocationContext();
Object targetBean = invocationContext.getTargetBean();
@@ -76,9 +85,6 @@
final Class<?> endpointImplClass = endpoint.getTargetBeanClass();
targetBean = endpointImplClass.newInstance();
invocationContext.setTargetBean(targetBean);
-
- // notify subclasses
- this.onEndpointInstantiated(endpoint, invocation);
}
catch (Exception ex)
{
@@ -86,6 +92,13 @@
}
}
+ if (!this.initialized)
+ {
+ // notify subclasses
+ this.onEndpointInstantiated(endpoint, invocation);
+ this.initialized = true;
+ }
+
return targetBean;
}
@@ -144,4 +157,10 @@
}
}
+ @Override
+ public Context getJNDIContext(final Endpoint ep) throws NamingException
+ {
+ return (Context) new InitialContext().lookup(POJO_JNDI_PREFIX);
+ }
+
}
Modified: common/branches/jbossws-common-1.4.1/src/main/java/org/jboss/wsf/common/invocation/InvocationHandlerJAXWS.java
===================================================================
--- common/branches/jbossws-common-1.4.1/src/main/java/org/jboss/wsf/common/invocation/InvocationHandlerJAXWS.java 2010-12-06 14:17:33 UTC (rev 13413)
+++ common/branches/jbossws-common-1.4.1/src/main/java/org/jboss/wsf/common/invocation/InvocationHandlerJAXWS.java 2010-12-06 14:19:39 UTC (rev 13414)
@@ -21,9 +21,6 @@
*/
package org.jboss.wsf.common.invocation;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
import javax.xml.ws.WebServiceContext;
import org.jboss.wsf.common.injection.InjectionHelper;
@@ -47,8 +44,6 @@
public final class InvocationHandlerJAXWS extends AbstractInvocationHandlerJSE
{
- private static final String POJO_JNDI_PREFIX = "java:comp/env/";
-
/**
* Constructor.
*/
@@ -108,11 +103,6 @@
ThreadLocalAwareWebServiceContext.getInstance().setMessageContext(null);
}
- public Context getJNDIContext(final Endpoint ep) throws NamingException
- {
- return (Context) new InitialContext().lookup(POJO_JNDI_PREFIX);
- }
-
/**
* Returns WebServiceContext associated with this invocation.
*
13 years, 5 months
JBossWS SVN: r13413 - stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-12-06 09:17:33 -0500 (Mon, 06 Dec 2010)
New Revision: 13413
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java
Log:
[JBWS-3179] refactoring JSE endpoint injections from CXF to COMMON
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java 2010-12-06 14:15:56 UTC (rev 13412)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java 2010-12-06 14:17:33 UTC (rev 13413)
@@ -114,12 +114,6 @@
{
InjectionsMetaData metadata = endpoint.getAttachment(InjectionsMetaData.class);
Context jndiContext = endpoint.getJNDIContext();
- if (DeploymentType.JAXWS_EJB3 != endpoint.getService().getDeployment().getType()
- && factory.getServiceBean() != null)
- {
- InjectionHelper.injectResources(factory.getServiceBean(), metadata, jndiContext);
- InjectionHelper.callPostConstructMethod(factory.getServiceBean());
- }
List<Handler> chain = ((JaxWsEndpointImpl) factory.getServer().getEndpoint()).getJaxwsBinding()
.getHandlerChain();
if (chain != null)
13 years, 5 months
JBossWS SVN: r13412 - stack/cxf/branches/jbossws-cxf-3.4.1/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-12-06 09:15:56 -0500 (Mon, 06 Dec 2010)
New Revision: 13412
Modified:
stack/cxf/branches/jbossws-cxf-3.4.1/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java
Log:
[JBWS-3179] refactoring JSE endpoint injections from CXF to COMMON
Modified: stack/cxf/branches/jbossws-cxf-3.4.1/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java
===================================================================
--- stack/cxf/branches/jbossws-cxf-3.4.1/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java 2010-12-06 13:55:52 UTC (rev 13411)
+++ stack/cxf/branches/jbossws-cxf-3.4.1/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java 2010-12-06 14:15:56 UTC (rev 13412)
@@ -114,12 +114,6 @@
{
InjectionsMetaData metadata = endpoint.getAttachment(InjectionsMetaData.class);
Context jndiContext = endpoint.getJNDIContext();
- if (DeploymentType.JAXWS_EJB3 != endpoint.getService().getDeployment().getType()
- && factory.getServiceBean() != null)
- {
- InjectionHelper.injectResources(factory.getServiceBean(), metadata, jndiContext);
- InjectionHelper.callPostConstructMethod(factory.getServiceBean());
- }
List<Handler> chain = ((JaxWsEndpointImpl) factory.getServer().getEndpoint()).getJaxwsBinding()
.getHandlerChain();
if (chain != null)
13 years, 5 months
JBossWS SVN: r13411 - stack/cxf/branches/jbossws-cxf-3.4.0/src/main/distro.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2010-12-06 08:55:52 -0500 (Mon, 06 Dec 2010)
New Revision: 13411
Modified:
stack/cxf/branches/jbossws-cxf-3.4.0/src/main/distro/ReleaseNotes.txt
Log:
[JBWS-3160] Updating release notes
Modified: stack/cxf/branches/jbossws-cxf-3.4.0/src/main/distro/ReleaseNotes.txt
===================================================================
--- stack/cxf/branches/jbossws-cxf-3.4.0/src/main/distro/ReleaseNotes.txt 2010-12-03 20:31:12 UTC (rev 13410)
+++ stack/cxf/branches/jbossws-cxf-3.4.0/src/main/distro/ReleaseNotes.txt 2010-12-06 13:55:52 UTC (rev 13411)
@@ -28,19 +28,84 @@
Bug
- TODO: enumerate
+ * [JBWS-3039] - Spring 3 classpath scanning fails on AS 6
+ * [JBWS-3060] - java.lang.NoSuchMethodException when doing one-way calls to multiple endpoints belonging to the same deployment
+ * [JBWS-3069] - Latest CXF release in AS trunk breaks XTS
+ * [JBWS-3082] - org.jboss.test.ws.jaxws.samples.xop.doclit.XOPBareTestCase in framework tests Native stack implementation details
+ * [JBWS-3081] - HttpServletRequest.getScheme() returns null in one way webservice method
+ * [JBWS-3091] - org.jboss.test.ws.jaxws.samples.oneway.OnewayTestCase wrongly assumes the result will be set before the feedback() is invoked.
+ * [JBWS-3094] - Non-Spring JBossWS CXF deployment causes issues during the JBoss start up
+ * [JBWS-3098] - Ensure proper endpoint / bus lifecycle
+ * [JBWS-3099] - CXF tools generating wrong Java artifacts
+ * [JBWS-3100] - Investigate epr CXF tooling issue
+ * [JBWS-2951] - StringIndexOutOfBoundsException in JavaUtils#getPackageName()
+ * [JBWS-3090] - Deploy script does not remove jbossws-native-jaxws-ext.jar
+ * [JBWS-3112] - BusDeploymentAspect does not clear BusFactory threadlocals before starting deployment
+ * [JBWS-3142] - ServiceObjectFactory have to clean up threads after its job is finished
+ * [JBWS-3144] - Server side misuse of CXF default bus
+ * [JBWS-3141] - Mtom and RespectBinding configuration in webservices.xml DD doesn't work
+ * [JBWS-3143] - SubjectCreatingInterceptor incompatible with PolicyBasedWSS4JInInterceptor
+ * [JBWS-3152] - AS Meta Data should be complete before passing to JBossWS
+
Feature Request
- TODO: enumerate
+ * [JBWS-3028] - Complete UsernameToken JAAS integration
+ * [JBWS-3063] - Support Log4J in command line wsconsume and wsprovide
+ * [JBWS-2596] - @Resource and @EJB injection in jaxws endpoints and handlers
+ * [JBWS-3001] - Enable @PostConstruct and @Predestroy annotations support for POJO based endpoints
+ * [JBWS-3087] - Default enable WS-Policy engine when Spring is not used
+ * [JBWS-2957] - EJB webservices packaged in web archives (JSR 109 v.1.3 support)
+ * [JBWS-3114] - Stack agnostic configuration of connection timeout
+ * [JBWS-3122] - Implement @WebServiceRef to respect @Addressing, @MTOM & @RespectBinding annotations
+ * [JBWS-3123] - Implement @WebServiceRef support for annotation driven servlets
+ * [JBWS-3133] - Update UMDM for ServiceRef and PortComponentRef to support @Addressing, @MTOM & @RespectBinding settings
+ * [JBWS-3084] - Enable control of chunked encoding when using SOAPConnection
Task
- TODO: enumerate
+ * [JBWS-3002] - Ensure POJO endpoints are shared
+ * [JBWS-3006] - Review jbossws maven dependencies
+ * [JBWS-3049] - Hudson jobs need to test binary and src distros against vanilla JBoss AS
+ * [JBWS-3062] - Use CXF Log4jLogger and leverage our log redirection only when JDK logging is explicitly used
+ * [JBWS-3064] - Remove references to cxf jaxrs implementation
+ * [JBWS-3073] - Do not require SpringFramework dependencies for basic JAX-WS deployments
+ * [JBWS-3083] - Avoid double Maven lifecycle run for building src and bin distributions
+ * [JBWS-3089] - Upgrade to CXF 2.2.9-patch-01
+ * [JBWS-2987] - Review JMS integration
+ * [JBWS-3075] - Upgrade to Apache CXF 2.2.10
+ * [JBWS-3085] - Enrich testsuite with samples not requiring Spring configuration
+ * [JBWS-3092] - Do not distribute saaj-impl & jaxp-ri with CXF
+ * [JBWS-3093] - Configure maven compiler for JBossWS to be UTF-8 encoding based
+ * [JBWS-3102] - Remove bus-extensions.xml and extensions.xml from jbossws-cxf-client.jar
+ * [JBWS-3104] - Add a WS-Policy MTOM test to CXF tests not depending on Spring
+ * [JBWS-3110] - Add "-createxsdimports" flag to cxf wsprovider to generate schema elements in the seperate files
+ * [JBWS-3050] - Ignore HandlerChain configuration with improper leading namespace prefix
+ * [JBWS-2928] - Use JBoss provided EE APIs
+ * [JBWS-2945] - CXF JAX-WS 2.2 implementation
+ * [JBWS-3000] - Implement handler chains override through webservices.xml
+ * [JBWS-3078] - Fix the formatting for some of the java files
+ * [JBWS-3079] - Provide alternative solution to having jetty dependency for jaxws Endpoint API usage
+ * [JBWS-3086] - Review and merge CXF JMS prototype upstream
+ * [JBWS-3107] - Review org.jboss.test.ws.jaxws.endoint tests
+ * [JBWS-3111] - Enable WS-Trust client tests once the trunk gets updated to CXF 2.3 or 2.2.11
+ * [JBWS-3117] - Remove saaj-api.jar from distribution
+ * [JBWS-3124] - Remove JBWS2942TestCase framework test and create Native and CXF specific tests validating empty EPR Metadata are dropped
+ * [JBWS-3126] - Move to new EjbReferenceResolver
+ * [JBWS-3145] - Remove use of DummyBeanLocator (workaround for CXF-2927)
+ * [JBWS-3146] - Update to Apache CXF 2.3.0 relelase
+ * [JBWS-3121] - Prevent duplicated endpoints for EJB 3.1 beans in web archives
+ * [JBWS-2215] - Produce distributable docs from wiki
+ * [JBWS-2768] - Make sure SOAP stack test suite passes also when no internet connection is available
+ * [JBWS-3127] - Review JMS TestCase after SoapJMSInInterceptor is fixed in CXF trunk
+ * [JBWS-3140] - Process the <addressing> element in webservices.xml (JSR-109 v.1.3)
+ * [JBWS-3149] - Change CXF default MinimalAlternativeSelector to MaximalAlternativeSelector in sever side
+ * [JBWS-3156] - Refactor ThreadLocalAwareWebserviceContext
+ * [JBWS-3163] - Upgrade to Apache CXF 2.3.1
Errata
- See: TODO: reference to associated JIRA issue
+ See: https://jira.jboss.org/browse/JBWS-3178
This version of ${project.name} is based on Apache CXF ${cxf.version}
13 years, 5 months
JBossWS SVN: r13410 - stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/server.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-12-03 15:31:12 -0500 (Fri, 03 Dec 2010)
New Revision: 13410
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/server/RMInvocationHandler.java
Log:
allign with new SPI
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/server/RMInvocationHandler.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/server/RMInvocationHandler.java 2010-12-03 20:27:57 UTC (rev 13409)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/server/RMInvocationHandler.java 2010-12-03 20:31:12 UTC (rev 13410)
@@ -380,4 +380,10 @@
return this.delegate.getJNDIContext(ep);
}
+ public void onEndpointInstantiated(final Endpoint endpoint, final Invocation invocation) throws Exception {}
+
+ public void onBeforeInvocation(final Invocation invocation) throws Exception {}
+
+ public void onAfterInvocation(final Invocation invocation) throws Exception {}
+
}
13 years, 5 months
JBossWS SVN: r13409 - stack/native/branches/jbossws-native-3.4.1/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/server.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2010-12-03 15:27:57 -0500 (Fri, 03 Dec 2010)
New Revision: 13409
Modified:
stack/native/branches/jbossws-native-3.4.1/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/server/RMInvocationHandler.java
Log:
allign with new SPI
Modified: stack/native/branches/jbossws-native-3.4.1/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/server/RMInvocationHandler.java
===================================================================
--- stack/native/branches/jbossws-native-3.4.1/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/server/RMInvocationHandler.java 2010-12-03 19:19:56 UTC (rev 13408)
+++ stack/native/branches/jbossws-native-3.4.1/modules/core/src/main/java/org/jboss/ws/extensions/wsrm/server/RMInvocationHandler.java 2010-12-03 20:27:57 UTC (rev 13409)
@@ -380,4 +380,10 @@
return this.delegate.getJNDIContext(ep);
}
+ public void onEndpointInstantiated(final Endpoint endpoint, final Invocation invocation) throws Exception {}
+
+ public void onBeforeInvocation(final Invocation invocation) throws Exception {}
+
+ public void onAfterInvocation(final Invocation invocation) throws Exception {}
+
}
13 years, 5 months
JBossWS SVN: r13408 - in stack/native/branches/jbossws-native-2.0.1.SP2_CP: src/main/java/org/jboss/ws/core and 9 other directories.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2010-12-03 14:19:56 -0500 (Fri, 03 Dec 2010)
New Revision: 13408
Added:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/Endpoint.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/EndpointImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/JBPAPP2143TestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbpapp2143/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbpapp2143/META-INF/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbpapp2143/META-INF/jbpapp2143-client-config.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbpapp2143/WEB-INF/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbpapp2143/WEB-INF/jboss-web.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbpapp2143/WEB-INF/web.xml
Removed:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/Endpoint.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/EndpointImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/JBPAPP2143TestCase.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbpapp2143/META-INF/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbpapp2143/META-INF/jbpapp2143-client-config.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbpapp2143/WEB-INF/
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbpapp2143/WEB-INF/jboss-web.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbpapp2143/WEB-INF/web.xml
Modified:
stack/native/branches/jbossws-native-2.0.1.SP2_CP/ant-import-tests/build-jars-jaxws.xml
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/CommonMessageContext.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/client/RemotingConnectionImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/soap/SOAPBodyImpl.java
Log:
[JBPAPP-5506] Setting a new config at runtime the properties are not available to RemotingConnectionImpl
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/ant-import-tests/build-jars-jaxws.xml
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/ant-import-tests/build-jars-jaxws.xml 2010-12-03 17:41:47 UTC (rev 13407)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/ant-import-tests/build-jars-jaxws.xml 2010-12-03 19:19:56 UTC (rev 13408)
@@ -130,6 +130,17 @@
<include name="**/*.wsdl"/>
</webinf>
</war>
+
+ <!-- jaxws-jbpapp2143 -->
+ <war warfile="${tests.output.dir}/libs/jaxws-jbpapp2143.war" webxml="${tests.output.dir}/resources/jaxws/jbpapp2143/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/classes">
+ <include name="org/jboss/test/ws/jaxws/jbpapp2143/*.class"/>
+ <exclude name="org/jboss/test/ws/jaxws/jbpapp2143/*TestCase.class"/>
+ </classes>
+ <webinf dir="${tests.output.dir}/resources/jaxws/jbpapp2143/WEB-INF">
+ <include name="jboss-web.xml"/>
+ </webinf>
+ </war>
<!-- jaxws-jbws771 -->
<jar destfile="${tests.output.dir}/libs/jaxws-jbws771.jar">
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/CommonMessageContext.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/CommonMessageContext.java 2010-12-03 17:41:47 UTC (rev 13407)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/CommonMessageContext.java 2010-12-03 19:19:56 UTC (rev 13408)
@@ -21,8 +21,6 @@
*/
package org.jboss.ws.core;
-// $Id$
-
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
@@ -35,6 +33,7 @@
import org.jboss.logging.Logger;
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.extensions.xop.XOPContext;
+import org.jboss.ws.metadata.config.CommonConfig;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.xb.binding.NamespaceRegistry;
@@ -61,6 +60,8 @@
private EndpointMetaData epMetaData;
// The operation for this message ctx
private OperationMetaData opMetaData;
+ // The configuration to override the default configuration wrapped by EndpointMetaData.
+ private CommonConfig config;
// The Message in this message context
private MessageAbstraction message;
// The map of scoped properties
@@ -118,6 +119,21 @@
this.opMetaData = opMetaData;
}
+ public CommonConfig getConfig()
+ {
+ if (config == null)
+ {
+ config = epMetaData.getConfig();
+ }
+
+ return config;
+ }
+
+ public void setConfig(CommonConfig config)
+ {
+ this.config = config;
+ }
+
public SOAPMessage getSOAPMessage()
{
return (SOAPMessage)message;
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/client/RemotingConnectionImpl.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/client/RemotingConnectionImpl.java 2010-12-03 17:41:47 UTC (rev 13407)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/client/RemotingConnectionImpl.java 2010-12-03 19:19:56 UTC (rev 13408)
@@ -315,7 +315,7 @@
// May be overridden through endpoint config
if (msgContext != null)
{
- CommonConfig config = msgContext.getEndpointMetaData().getConfig();
+ CommonConfig config = msgContext.getConfig();
// chunksize settings
String chunkSizeValue = config.getProperty(EndpointProperty.CHUNKED_ENCODING_SIZE);
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2010-12-03 17:41:47 UTC (rev 13407)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2010-12-03 19:19:56 UTC (rev 13408)
@@ -220,6 +220,7 @@
{
// Associate a message context with the current thread
CommonMessageContext msgContext = new SOAPMessageContextJAXWS();
+ msgContext.setConfig(this.epConfigMetaData.getConfig());
MessageContextAssociation.pushMessageContext(msgContext);
// The contents of the request context are used to initialize the message context (see section 9.4.1)
@@ -396,7 +397,19 @@
initBindingHandlerChain(true);
}
}
+
+ @Override
+ public String getConfigFile()
+ {
+ return epConfigMetaData.getConfigFile();
+ }
+ @Override
+ public String getConfigName()
+ {
+ return epConfigMetaData.getConfigName();
+ }
+
/**
* Retrieve header names that can be processed by this binding
* @return
Modified: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/soap/SOAPBodyImpl.java
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/soap/SOAPBodyImpl.java 2010-12-03 17:41:47 UTC (rev 13407)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/main/java/org/jboss/ws/core/soap/SOAPBodyImpl.java 2010-12-03 19:19:56 UTC (rev 13408)
@@ -292,8 +292,21 @@
return validChild == false;
}
- private static SOAPBodyElementDoc convertToBodyElement(Node node)
+ private static SOAPBodyElementDoc convertToBodyElement(Node node) throws DOMException
{
+ if (!(node instanceof SOAPElementImpl) && (node instanceof Element))
+ {
+ try
+ {
+ SOAPFactoryImpl soapFactory = new SOAPFactoryImpl();
+ node = (SOAPElementImpl)soapFactory.createElement((Element)node);
+ }
+ catch (SOAPException ex)
+ {
+ throw new DOMException(DOMException.INVALID_STATE_ERR, "Could not convert Element to a SOAPElement");
+ }
+ }
+
if (!(node instanceof SOAPElementImpl))
throw new IllegalArgumentException("SOAPElement expected");
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143 (from rev 13407, stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143)
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/Endpoint.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/Endpoint.java 2010-12-03 17:41:47 UTC (rev 13407)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/Endpoint.java 2010-12-03 19:19:56 UTC (rev 13408)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.jbpapp2143;
-
-import javax.jws.WebService;
-
-/**
- * Test Endpoint.
- *
- * @author darran.lofthouse(a)jboss.com
- * @since 3rd December 2010
- */
-@WebService(name = "Endpoint", targetNamespace = "http://ws.jboss.org/jbpapp2143")
-public interface Endpoint
-{
-
- public String verifyNoContentLength(final String message);
-
- public String verifyHasContentLength(final String message);
-
-}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/Endpoint.java (from rev 13407, stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/Endpoint.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/Endpoint.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/Endpoint.java 2010-12-03 19:19:56 UTC (rev 13408)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jbpapp2143;
+
+import javax.jws.WebService;
+
+/**
+ * Test Endpoint.
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 3rd December 2010
+ */
+@WebService(name = "Endpoint", targetNamespace = "http://ws.jboss.org/jbpapp2143")
+public interface Endpoint
+{
+
+ public String verifyNoContentLength(final String message);
+
+ public String verifyHasContentLength(final String message);
+
+}
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/EndpointImpl.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/EndpointImpl.java 2010-12-03 17:41:47 UTC (rev 13407)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/EndpointImpl.java 2010-12-03 19:19:56 UTC (rev 13408)
@@ -1,72 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.jbpapp2143;
-
-import java.util.Map;
-
-import javax.annotation.Resource;
-import javax.jws.WebService;
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.handler.MessageContext;
-
-/**
- * Test Endpoint implementation.
- *
- * @author darran.lofthouse(a)jboss.com
- * @since 3rd December 2010
- */
-@WebService(name = "Endpoint", targetNamespace = "http://ws.jboss.org/jbpapp2143", endpointInterface = "org.jboss.test.ws.jaxws.jbpapp2143.Endpoint")
-public class EndpointImpl implements Endpoint
-{
-
- @Resource
- private WebServiceContext context;
-
- public String verifyNoContentLength(final String message)
- {
- if (getContentLength() != null)
- {
- throw new IllegalArgumentException("Unexpected content length recieved.");
- }
-
- return message;
- }
-
- public String verifyHasContentLength(final String message)
- {
- if (getContentLength() == null)
- {
- throw new IllegalArgumentException("Expected content length not recieved.");
- }
-
- return message;
- }
-
- private Object getContentLength()
- {
- Map headers = (Map)context.getMessageContext().get(MessageContext.HTTP_REQUEST_HEADERS);
- Object contentLength = headers.get("content-length");
-
- return contentLength;
- }
-
-}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/EndpointImpl.java (from rev 13407, stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/EndpointImpl.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/EndpointImpl.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/EndpointImpl.java 2010-12-03 19:19:56 UTC (rev 13408)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jbpapp2143;
+
+import java.util.Map;
+
+import javax.annotation.Resource;
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.handler.MessageContext;
+
+/**
+ * Test Endpoint implementation.
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 3rd December 2010
+ */
+@WebService(name = "Endpoint", targetNamespace = "http://ws.jboss.org/jbpapp2143", endpointInterface = "org.jboss.test.ws.jaxws.jbpapp2143.Endpoint")
+public class EndpointImpl implements Endpoint
+{
+
+ @Resource
+ private WebServiceContext context;
+
+ public String verifyNoContentLength(final String message)
+ {
+ if (getContentLength() != null)
+ {
+ throw new IllegalArgumentException("Unexpected content length recieved.");
+ }
+
+ return message;
+ }
+
+ public String verifyHasContentLength(final String message)
+ {
+ if (getContentLength() == null)
+ {
+ throw new IllegalArgumentException("Expected content length not recieved.");
+ }
+
+ return message;
+ }
+
+ private Object getContentLength()
+ {
+ Map headers = (Map)context.getMessageContext().get(MessageContext.HTTP_REQUEST_HEADERS);
+ Object contentLength = headers.get("content-length");
+
+ return contentLength;
+ }
+
+}
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/JBPAPP2143TestCase.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/JBPAPP2143TestCase.java 2010-12-03 17:41:47 UTC (rev 13407)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/JBPAPP2143TestCase.java 2010-12-03 19:19:56 UTC (rev 13408)
@@ -1,128 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.jbpapp2143;
-
-import java.io.File;
-import java.net.URL;
-
-import javax.xml.namespace.QName;
-import javax.xml.ws.Service;
-
-import junit.framework.Test;
-
-import org.jboss.ws.core.StubExt;
-import org.jboss.wsf.test.JBossWSTest;
-import org.jboss.wsf.test.JBossWSTestSetup;
-
-/**
- * [JBPAPP-2143] Setting a new config at runtime the properties are not
- * available to RemotingConnectionImpl
- *
- * @author darran.lofthouse(a)jboss.com
- * @since 3rd December 2010
- * @see https://jira.jboss.org/browse/JBPAPP-2143
- */
-public class JBPAPP2143TestCase extends JBossWSTest
-{
-
- public static Test suite() throws Exception
- {
- return new JBossWSTestSetup(JBPAPP2143TestCase.class, "jaxws-jbpapp2143.war");
- }
-
- // Default config, chunked so no content length.
- public void testNoConfig_Success() throws Exception
- {
- Service service = getService();
- Endpoint port = service.getPort(Endpoint.class);
-
- String message = "Hello 1";
- String response = port.verifyNoContentLength(message);
- assertEquals("Response Message", message, response);
- }
-
- // Default config, chunked so no content length.
- public void testNoConfig_Failure() throws Exception
- {
- Service service = getService();
- Endpoint port = service.getPort(Endpoint.class);
-
- String message = "Hello 2";
- try
- {
- port.verifyHasContentLength(message);
- fail("Expected exception not thrown.");
- }
- catch (Exception ignored)
- {
- }
-
- }
-
- // Custom config, chunking disables so has content length.
- public void testWithConfig_Success() throws Exception
- {
- Service service = getService();
- Endpoint port = service.getPort(Endpoint.class);
- setConfigName(port);
-
- String message = "Hello 3";
- String response = port.verifyHasContentLength(message);
- assertEquals("Response Message", message, response);
- }
-
- // Custom config, chunking disables so has content length.
- public void testWithConfig_Failure() throws Exception
- {
- Service service = getService();
- Endpoint port = service.getPort(Endpoint.class);
- setConfigName(port);
-
- String message = "Hello 4";
- try
- {
- port.verifyNoContentLength(message);
- fail("Expected exception not thrown.");
- }
- catch (Exception ignored)
- {
- }
-
- }
-
- void setConfigName(Endpoint port)
- {
- File config = getResourceFile("jaxws/jbpapp2143/META-INF/jbpapp2143-client-config.xml");
- ((StubExt)port).setConfigName("Test Config", config.getAbsolutePath());
- }
-
- Service getService() throws Exception
- {
- URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbpapp2143?wsdl");
- QName serviceName = new QName("http://ws.jboss.org/jbpapp2143", "EndpointImplService");
-
- Service service = Service.create(wsdlURL, serviceName);
-
- return service;
- }
-
-}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/JBPAPP2143TestCase.java (from rev 13407, stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/JBPAPP2143TestCase.java)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/JBPAPP2143TestCase.java (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/JBPAPP2143TestCase.java 2010-12-03 19:19:56 UTC (rev 13408)
@@ -0,0 +1,128 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jbpapp2143;
+
+import java.io.File;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.ws.core.StubExt;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * [JBPAPP-2143] Setting a new config at runtime the properties are not
+ * available to RemotingConnectionImpl
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 3rd December 2010
+ * @see https://jira.jboss.org/browse/JBPAPP-2143
+ */
+public class JBPAPP2143TestCase extends JBossWSTest
+{
+
+ public static Test suite() throws Exception
+ {
+ return new JBossWSTestSetup(JBPAPP2143TestCase.class, "jaxws-jbpapp2143.war");
+ }
+
+ // Default config, chunked so no content length.
+ public void testNoConfig_Success() throws Exception
+ {
+ Service service = getService();
+ Endpoint port = service.getPort(Endpoint.class);
+
+ String message = "Hello 1";
+ String response = port.verifyNoContentLength(message);
+ assertEquals("Response Message", message, response);
+ }
+
+ // Default config, chunked so no content length.
+ public void testNoConfig_Failure() throws Exception
+ {
+ Service service = getService();
+ Endpoint port = service.getPort(Endpoint.class);
+
+ String message = "Hello 2";
+ try
+ {
+ port.verifyHasContentLength(message);
+ fail("Expected exception not thrown.");
+ }
+ catch (Exception ignored)
+ {
+ }
+
+ }
+
+ // Custom config, chunking disables so has content length.
+ public void testWithConfig_Success() throws Exception
+ {
+ Service service = getService();
+ Endpoint port = service.getPort(Endpoint.class);
+ setConfigName(port);
+
+ String message = "Hello 3";
+ String response = port.verifyHasContentLength(message);
+ assertEquals("Response Message", message, response);
+ }
+
+ // Custom config, chunking disables so has content length.
+ public void testWithConfig_Failure() throws Exception
+ {
+ Service service = getService();
+ Endpoint port = service.getPort(Endpoint.class);
+ setConfigName(port);
+
+ String message = "Hello 4";
+ try
+ {
+ port.verifyNoContentLength(message);
+ fail("Expected exception not thrown.");
+ }
+ catch (Exception ignored)
+ {
+ }
+
+ }
+
+ void setConfigName(Endpoint port)
+ {
+ File config = new File("resources/jaxws/jbpapp2143/META-INF/jbpapp2143-client-config.xml");
+ ((StubExt)port).setConfigName("Test Config", config.getAbsolutePath());
+ }
+
+ Service getService() throws Exception
+ {
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbpapp2143?wsdl");
+ QName serviceName = new QName("http://ws.jboss.org/jbpapp2143", "EndpointImplService");
+
+ Service service = Service.create(wsdlURL, serviceName);
+
+ return service;
+ }
+
+}
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbpapp2143 (from rev 13407, stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbpapp2143)
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbpapp2143/META-INF (from rev 13407, stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbpapp2143/META-INF)
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbpapp2143/META-INF/jbpapp2143-client-config.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbpapp2143/META-INF/jbpapp2143-client-config.xml 2010-12-03 17:41:47 UTC (rev 13407)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbpapp2143/META-INF/jbpapp2143-client-config.xml 2010-12-03 19:19:56 UTC (rev 13408)
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<jaxws-config
- xmlns="urn:jboss:jaxws-config:2.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:javaee="http://java.sun.com/xml/ns/javaee"
- xsi:schemaLocation="urn:jboss:jaxws-config:2.0 jaxws-config_2_0.xsd">
-
- <client-config>
- <config-name>Test Client</config-name>
- <feature>http://org.jboss.ws/dispatch/validate</feature>
- <property>
- <property-name>http://org.jboss.ws/http#chunksize</property-name>
- <property-value>-1</property-value>
- </property>
- </client-config>
-
-</jaxws-config>
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbpapp2143/META-INF/jbpapp2143-client-config.xml (from rev 13407, stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbpapp2143/META-INF/jbpapp2143-client-config.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbpapp2143/META-INF/jbpapp2143-client-config.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbpapp2143/META-INF/jbpapp2143-client-config.xml 2010-12-03 19:19:56 UTC (rev 13408)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jaxws-config
+ xmlns="urn:jboss:jaxws-config:2.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+ xsi:schemaLocation="urn:jboss:jaxws-config:2.0 jaxws-config_2_0.xsd">
+
+ <client-config>
+ <config-name>Test Client</config-name>
+ <feature>http://org.jboss.ws/dispatch/validate</feature>
+ <property>
+ <property-name>http://org.jboss.ws/http#chunksize</property-name>
+ <property-value>-1</property-value>
+ </property>
+ </client-config>
+
+</jaxws-config>
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbpapp2143/WEB-INF (from rev 13407, stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbpapp2143/WEB-INF)
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbpapp2143/WEB-INF/jboss-web.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbpapp2143/WEB-INF/jboss-web.xml 2010-12-03 17:41:47 UTC (rev 13407)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbpapp2143/WEB-INF/jboss-web.xml 2010-12-03 19:19:56 UTC (rev 13408)
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
-
-<jboss-web>
- <context-root>/jaxws-jbpapp2143</context-root>
-</jboss-web>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbpapp2143/WEB-INF/jboss-web.xml (from rev 13407, stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbpapp2143/WEB-INF/jboss-web.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbpapp2143/WEB-INF/jboss-web.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbpapp2143/WEB-INF/jboss-web.xml 2010-12-03 19:19:56 UTC (rev 13408)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+ <context-root>/jaxws-jbpapp2143</context-root>
+</jboss-web>
\ No newline at end of file
Deleted: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbpapp2143/WEB-INF/web.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbpapp2143/WEB-INF/web.xml 2010-12-03 17:41:47 UTC (rev 13407)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbpapp2143/WEB-INF/web.xml 2010-12-03 19:19:56 UTC (rev 13408)
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
-
- <servlet>
- <servlet-name>TestEndpoint</servlet-name>
- <servlet-class>org.jboss.test.ws.jaxws.jbpapp2143.EndpointImpl</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>TestEndpoint</servlet-name>
- <url-pattern>/*</url-pattern>
- </servlet-mapping>
-
-</web-app>
\ No newline at end of file
Copied: stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbpapp2143/WEB-INF/web.xml (from rev 13407, stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbpapp2143/WEB-INF/web.xml)
===================================================================
--- stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbpapp2143/WEB-INF/web.xml (rev 0)
+++ stack/native/branches/jbossws-native-2.0.1.SP2_CP/src/test/resources/jaxws/jbpapp2143/WEB-INF/web.xml 2010-12-03 19:19:56 UTC (rev 13408)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <servlet>
+ <servlet-name>TestEndpoint</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.jbpapp2143.EndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestEndpoint</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
\ No newline at end of file
13 years, 5 months
JBossWS SVN: r13407 - in stack/native/branches/jbossws-native-3.1.2/modules: core/src/main/java/org/jboss/ws/core/client and 8 other directories.
by jbossws-commits@lists.jboss.org
Author: darran.lofthouse(a)jboss.com
Date: 2010-12-03 12:41:47 -0500 (Fri, 03 Dec 2010)
New Revision: 13407
Added:
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/Endpoint.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/EndpointImpl.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/JBPAPP2143TestCase.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbpapp2143/
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbpapp2143/META-INF/
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbpapp2143/META-INF/jbpapp2143-client-config.xml
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbpapp2143/WEB-INF/
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbpapp2143/WEB-INF/jboss-web.xml
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbpapp2143/WEB-INF/web.xml
Modified:
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonMessageContext.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/client/HTTPRemotingConnection.java
stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
Log:
[JBPAPP-2143] Setting a new config at runtime the properties are not available to RemotingConnectionImpl
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonMessageContext.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonMessageContext.java 2010-12-03 13:31:23 UTC (rev 13406)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/CommonMessageContext.java 2010-12-03 17:41:47 UTC (rev 13407)
@@ -25,6 +25,7 @@
import org.jboss.ws.core.binding.SerializationContext;
import org.jboss.ws.core.soap.attachment.SwapableMemoryDataSource;
import org.jboss.ws.extensions.xop.XOPContext;
+import org.jboss.ws.metadata.config.CommonConfig;
import org.jboss.ws.metadata.umdm.EndpointMetaData;
import org.jboss.ws.metadata.umdm.OperationMetaData;
import org.jboss.xb.binding.NamespaceRegistry;
@@ -62,6 +63,8 @@
private EndpointMetaData epMetaData;
// The operation for this message ctx
private OperationMetaData opMetaData;
+ // The configuration to override the default configuration wrapped by EndpointMetaData.
+ private CommonConfig config;
// The Message in this message context
private MessageAbstraction message;
// The map of scoped properties
@@ -119,6 +122,21 @@
this.opMetaData = opMetaData;
}
+ public CommonConfig getConfig()
+ {
+ if (config == null)
+ {
+ config = epMetaData.getConfig();
+ }
+
+ return config;
+ }
+
+ public void setConfig(CommonConfig config)
+ {
+ this.config = config;
+ }
+
public SOAPMessage getSOAPMessage()
{
if(message!=null && ((message instanceof SOAPMessage) == false))
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/client/HTTPRemotingConnection.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/client/HTTPRemotingConnection.java 2010-12-03 13:31:23 UTC (rev 13406)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/client/HTTPRemotingConnection.java 2010-12-03 17:41:47 UTC (rev 13407)
@@ -307,7 +307,7 @@
if (msgContext != null)
{
EndpointMetaData epMetaData = msgContext.getEndpointMetaData();
- CommonConfig config = epMetaData.getConfig();
+ CommonConfig config = msgContext.getConfig();
String sizeValue = config.getProperty(EndpointProperty.CHUNKED_ENCODING_SIZE);
if (sizeValue != null)
Modified: stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2010-12-03 13:31:23 UTC (rev 13406)
+++ stack/native/branches/jbossws-native-3.1.2/modules/core/src/main/java/org/jboss/ws/core/jaxws/client/ClientImpl.java 2010-12-03 17:41:47 UTC (rev 13407)
@@ -215,6 +215,7 @@
{
// Associate a message context with the current thread
CommonMessageContext msgContext = new SOAPMessageContextJAXWS();
+ msgContext.setConfig(this.epConfigMetaData.getConfig());
MessageContextAssociation.pushMessageContext(msgContext);
try
@@ -399,7 +400,19 @@
initBindingHandlerChain(true);
}
}
+
+ @Override
+ public String getConfigFile()
+ {
+ return epConfigMetaData.getConfigFile();
+ }
+ @Override
+ public String getConfigName()
+ {
+ return epConfigMetaData.getConfigName();
+ }
+
/**
* Retrieve header names that can be processed by this binding
* @return
Modified: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2010-12-03 13:31:23 UTC (rev 13406)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/scripts/build-jars-jaxws.xml 2010-12-03 17:41:47 UTC (rev 13407)
@@ -142,6 +142,18 @@
</webinf>
</war>
+ <!-- jaxws-jbpapp2143 -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-jbpapp2143.war" webxml="${tests.output.dir}/test-resources/jaxws/jbpapp2143/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbpapp2143/*.class" />
+ <exclude name="org/jboss/test/ws/jaxws/jbpapp2143/*TestCase.class" />
+ </classes>
+
+ <webinf dir="${tests.output.dir}/test-resources/jaxws/jbpapp2143/WEB-INF">
+ <include name="*.xml" />
+ </webinf>
+ </war>
+
<!-- jaxws-jbpapp3389 -->
<war warfile="${tests.output.dir}/test-libs/jaxws-jbpapp3389.war" webxml="${tests.output.dir}/test-resources/jaxws/jbpapp3389/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
@@ -358,8 +370,8 @@
<metainf dir="${tests.output.dir}/test-resources/jaxws/jbws2014/">
<include name="wsse.*" />
</metainf>
- </jar>
-
+ </jar>
+
<!-- jaxws-jbws2116-->
<jar destfile="${tests.output.dir}/test-libs/jaxws-jbws2116.jar">
<fileset dir="${tests.output.dir}/test-classes">
@@ -563,8 +575,8 @@
<webinf dir="${tests.output.dir}/test-resources/jaxws/jbws2637/WEB-INF">
<include name="*" />
</webinf>
- </war>
-
+ </war>
+
<!-- jaxws-jbws2682 -->
<war warfile="${tests.output.dir}/test-libs/jaxws-jbws2682.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2682/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
@@ -697,21 +709,21 @@
<include name="**/*.xsd" />
</webinf>
</war>
-
+
<!-- jaxws-jbws3071 -->
<war warfile="${tests.output.dir}/test-libs/jaxws-jbws3071.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws3071/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/jbws3071/TestEndpointImpl.class" />
<include name="org/jboss/test/ws/jaxws/jbws3071/TestException.class" />
</classes>
- </war>
+ </war>
<!-- jaxws-webserviceref -->
<war warfile="${tests.output.dir}/test-libs/jaxws-webserviceref.war" webxml="${tests.output.dir}/test-resources/jaxws/webserviceref/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointImpl.class" />
</classes>
- </war>
+ </war>
<jar destfile="${tests.output.dir}/test-libs/jaxws-webserviceref-client.jar">
<fileset dir="${tests.output.dir}/test-classes">
<include name="org/jboss/test/ws/jaxws/webserviceref/TestEndpointClientOne.class" />
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/Endpoint.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/Endpoint.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/Endpoint.java 2010-12-03 17:41:47 UTC (rev 13407)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jbpapp2143;
+
+import javax.jws.WebService;
+
+/**
+ * Test Endpoint.
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 3rd December 2010
+ */
+@WebService(name = "Endpoint", targetNamespace = "http://ws.jboss.org/jbpapp2143")
+public interface Endpoint
+{
+
+ public String verifyNoContentLength(final String message);
+
+ public String verifyHasContentLength(final String message);
+
+}
Property changes on: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/Endpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/EndpointImpl.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/EndpointImpl.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/EndpointImpl.java 2010-12-03 17:41:47 UTC (rev 13407)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jbpapp2143;
+
+import java.util.Map;
+
+import javax.annotation.Resource;
+import javax.jws.WebService;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.handler.MessageContext;
+
+/**
+ * Test Endpoint implementation.
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 3rd December 2010
+ */
+@WebService(name = "Endpoint", targetNamespace = "http://ws.jboss.org/jbpapp2143", endpointInterface = "org.jboss.test.ws.jaxws.jbpapp2143.Endpoint")
+public class EndpointImpl implements Endpoint
+{
+
+ @Resource
+ private WebServiceContext context;
+
+ public String verifyNoContentLength(final String message)
+ {
+ if (getContentLength() != null)
+ {
+ throw new IllegalArgumentException("Unexpected content length recieved.");
+ }
+
+ return message;
+ }
+
+ public String verifyHasContentLength(final String message)
+ {
+ if (getContentLength() == null)
+ {
+ throw new IllegalArgumentException("Expected content length not recieved.");
+ }
+
+ return message;
+ }
+
+ private Object getContentLength()
+ {
+ Map headers = (Map)context.getMessageContext().get(MessageContext.HTTP_REQUEST_HEADERS);
+ Object contentLength = headers.get("content-length");
+
+ return contentLength;
+ }
+
+}
Property changes on: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/EndpointImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/JBPAPP2143TestCase.java
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/JBPAPP2143TestCase.java (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/JBPAPP2143TestCase.java 2010-12-03 17:41:47 UTC (rev 13407)
@@ -0,0 +1,128 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jbpapp2143;
+
+import java.io.File;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.ws.core.StubExt;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * [JBPAPP-2143] Setting a new config at runtime the properties are not
+ * available to RemotingConnectionImpl
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since 3rd December 2010
+ * @see https://jira.jboss.org/browse/JBPAPP-2143
+ */
+public class JBPAPP2143TestCase extends JBossWSTest
+{
+
+ public static Test suite() throws Exception
+ {
+ return new JBossWSTestSetup(JBPAPP2143TestCase.class, "jaxws-jbpapp2143.war");
+ }
+
+ // Default config, chunked so no content length.
+ public void testNoConfig_Success() throws Exception
+ {
+ Service service = getService();
+ Endpoint port = service.getPort(Endpoint.class);
+
+ String message = "Hello 1";
+ String response = port.verifyNoContentLength(message);
+ assertEquals("Response Message", message, response);
+ }
+
+ // Default config, chunked so no content length.
+ public void testNoConfig_Failure() throws Exception
+ {
+ Service service = getService();
+ Endpoint port = service.getPort(Endpoint.class);
+
+ String message = "Hello 2";
+ try
+ {
+ port.verifyHasContentLength(message);
+ fail("Expected exception not thrown.");
+ }
+ catch (Exception ignored)
+ {
+ }
+
+ }
+
+ // Custom config, chunking disables so has content length.
+ public void testWithConfig_Success() throws Exception
+ {
+ Service service = getService();
+ Endpoint port = service.getPort(Endpoint.class);
+ setConfigName(port);
+
+ String message = "Hello 3";
+ String response = port.verifyHasContentLength(message);
+ assertEquals("Response Message", message, response);
+ }
+
+ // Custom config, chunking disables so has content length.
+ public void testWithConfig_Failure() throws Exception
+ {
+ Service service = getService();
+ Endpoint port = service.getPort(Endpoint.class);
+ setConfigName(port);
+
+ String message = "Hello 4";
+ try
+ {
+ port.verifyNoContentLength(message);
+ fail("Expected exception not thrown.");
+ }
+ catch (Exception ignored)
+ {
+ }
+
+ }
+
+ void setConfigName(Endpoint port)
+ {
+ File config = getResourceFile("jaxws/jbpapp2143/META-INF/jbpapp2143-client-config.xml");
+ ((StubExt)port).setConfigName("Test Config", config.getAbsolutePath());
+ }
+
+ Service getService() throws Exception
+ {
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/jaxws-jbpapp2143?wsdl");
+ QName serviceName = new QName("http://ws.jboss.org/jbpapp2143", "EndpointImplService");
+
+ Service service = Service.create(wsdlURL, serviceName);
+
+ return service;
+ }
+
+}
Property changes on: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/jbpapp2143/JBPAPP2143TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbpapp2143/META-INF/jbpapp2143-client-config.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbpapp2143/META-INF/jbpapp2143-client-config.xml (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbpapp2143/META-INF/jbpapp2143-client-config.xml 2010-12-03 17:41:47 UTC (rev 13407)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jaxws-config
+ xmlns="urn:jboss:jaxws-config:2.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+ xsi:schemaLocation="urn:jboss:jaxws-config:2.0 jaxws-config_2_0.xsd">
+
+ <client-config>
+ <config-name>Test Client</config-name>
+ <feature>http://org.jboss.ws/dispatch/validate</feature>
+ <property>
+ <property-name>http://org.jboss.ws/http#chunksize</property-name>
+ <property-value>-1</property-value>
+ </property>
+ </client-config>
+
+</jaxws-config>
Property changes on: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbpapp2143/META-INF/jbpapp2143-client-config.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbpapp2143/WEB-INF/jboss-web.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbpapp2143/WEB-INF/jboss-web.xml (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbpapp2143/WEB-INF/jboss-web.xml 2010-12-03 17:41:47 UTC (rev 13407)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+ <context-root>/jaxws-jbpapp2143</context-root>
+</jboss-web>
\ No newline at end of file
Property changes on: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbpapp2143/WEB-INF/jboss-web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbpapp2143/WEB-INF/web.xml
===================================================================
--- stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbpapp2143/WEB-INF/web.xml (rev 0)
+++ stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbpapp2143/WEB-INF/web.xml 2010-12-03 17:41:47 UTC (rev 13407)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <servlet>
+ <servlet-name>TestEndpoint</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.jbpapp2143.EndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestEndpoint</servlet-name>
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+</web-app>
\ No newline at end of file
Property changes on: stack/native/branches/jbossws-native-3.1.2/modules/testsuite/native-tests/src/test/resources/jaxws/jbpapp2143/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
13 years, 5 months