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