JBossWS SVN: r17900 - in container/jboss72/branches/jbossws-jboss720/server-integration/src/main: java/org/jboss/as/webservices/webserviceref and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2013-08-30 06:11:09 -0400 (Fri, 30 Aug 2013)
New Revision: 17900
Added:
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/deployers/UnifiedServiceRefDeploymentAspect.java
Modified:
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSReferences.java
container/jboss72/branches/jbossws-jboss720/server-integration/src/main/resources/META-INF/stack-agnostic-deployment-aspects.xml
Log:
[JBWS-3679]:Back port fix to AS720
Added: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/deployers/UnifiedServiceRefDeploymentAspect.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/deployers/UnifiedServiceRefDeploymentAspect.java (rev 0)
+++ container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/deployers/UnifiedServiceRefDeploymentAspect.java 2013-08-30 10:11:09 UTC (rev 17900)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.as.webservices.deployers;
+
+import static org.jboss.ws.common.integration.WSHelper.getRequiredAttachment;
+
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.as.server.deployment.DeploymentUnit;
+import org.jboss.as.webservices.util.ASHelper;
+import org.jboss.as.webservices.webserviceref.WSReferences;
+import org.jboss.ws.common.integration.AbstractDeploymentAspect;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+
+/**
+ * DeploymentAspect to set deployed ServiceName and address map in unifiedServiceRefMetaData
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
+ */
+public class UnifiedServiceRefDeploymentAspect extends AbstractDeploymentAspect {
+ @Override
+ public void start(final Deployment dep) {
+ final DeploymentUnit unit = getRequiredAttachment(dep, DeploymentUnit.class);
+ WSReferences wsRefRegistry = ASHelper.getWSRefRegistry(unit);
+ Object obj = dep.getProperty("ServiceAddressMap");
+ if(obj != null) {
+ @SuppressWarnings("unchecked")
+ Map<QName, String> deployedPortsAddress = (Map<QName, String>)obj;
+ for (UnifiedServiceRefMetaData metaData : wsRefRegistry.getUnifiedServiceRefMetaDatas()) {
+ metaData.addDeployedServiceAddresses(deployedPortsAddress);
+ }
+ }
+ }
+}
Property changes on: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/deployers/UnifiedServiceRefDeploymentAspect.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Modified: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSReferences.java
===================================================================
--- container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSReferences.java 2013-08-30 10:10:53 UTC (rev 17899)
+++ container/jboss72/branches/jbossws-jboss720/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSReferences.java 2013-08-30 10:11:09 UTC (rev 17900)
@@ -22,6 +22,8 @@
package org.jboss.as.webservices.webserviceref;
+import java.util.Collection;
+import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
@@ -52,6 +54,10 @@
public UnifiedServiceRefMetaData get(final String refName) {
return references.get(refName);
}
+
+ public Collection<UnifiedServiceRefMetaData> getUnifiedServiceRefMetaDatas() {
+ return Collections.unmodifiableCollection(references.values());
+ }
public void clear() {
references.clear();
Modified: container/jboss72/branches/jbossws-jboss720/server-integration/src/main/resources/META-INF/stack-agnostic-deployment-aspects.xml
===================================================================
--- container/jboss72/branches/jbossws-jboss720/server-integration/src/main/resources/META-INF/stack-agnostic-deployment-aspects.xml 2013-08-30 10:10:53 UTC (rev 17899)
+++ container/jboss72/branches/jbossws-jboss720/server-integration/src/main/resources/META-INF/stack-agnostic-deployment-aspects.xml 2013-08-30 10:11:09 UTC (rev 17900)
@@ -37,6 +37,11 @@
<property name="requires" class="java.lang.String">URLPattern</property>
<property name="provides" class="java.lang.String">EndpointAddress</property>
</deploymentAspect>
+
+ <deploymentAspect class="org.jboss.as.webservices.deployers.UnifiedServiceRefDeploymentAspect">
+ <property name="requires" class="java.lang.String">StackDescriptor</property>
+ <property name="provides" class="java.lang.String">UnifiedServiceRefMetaData</property>
+ </deploymentAspect>
<deploymentAspect class="org.jboss.as.webservices.deployers.EndpointServiceDeploymentAspect">
<property name="provides" class="java.lang.String">LifecycleHandler</property>
11 years, 3 months
JBossWS SVN: r17899 - in container/jboss71/branches/jbossws-jboss713/server-integration/src/main: java/org/jboss/as/webservices/webserviceref and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2013-08-30 06:10:53 -0400 (Fri, 30 Aug 2013)
New Revision: 17899
Added:
container/jboss71/branches/jbossws-jboss713/server-integration/src/main/java/org/jboss/as/webservices/deployers/UnifiedServiceRefDeploymentAspect.java
Modified:
container/jboss71/branches/jbossws-jboss713/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSReferences.java
container/jboss71/branches/jbossws-jboss713/server-integration/src/main/resources/META-INF/stack-agnostic-deployment-aspects.xml
Log:
[JBWS-3679]:Back port fix to AS713
Added: container/jboss71/branches/jbossws-jboss713/server-integration/src/main/java/org/jboss/as/webservices/deployers/UnifiedServiceRefDeploymentAspect.java
===================================================================
--- container/jboss71/branches/jbossws-jboss713/server-integration/src/main/java/org/jboss/as/webservices/deployers/UnifiedServiceRefDeploymentAspect.java (rev 0)
+++ container/jboss71/branches/jbossws-jboss713/server-integration/src/main/java/org/jboss/as/webservices/deployers/UnifiedServiceRefDeploymentAspect.java 2013-08-30 10:10:53 UTC (rev 17899)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.as.webservices.deployers;
+
+import static org.jboss.ws.common.integration.WSHelper.getRequiredAttachment;
+
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.as.server.deployment.DeploymentUnit;
+import org.jboss.as.webservices.util.ASHelper;
+import org.jboss.as.webservices.webserviceref.WSReferences;
+import org.jboss.ws.common.integration.AbstractDeploymentAspect;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+
+/**
+ * DeploymentAspect to set deployed ServiceName and address map in unifiedServiceRefMetaData
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
+ */
+public class UnifiedServiceRefDeploymentAspect extends AbstractDeploymentAspect {
+ @Override
+ public void start(final Deployment dep) {
+ final DeploymentUnit unit = getRequiredAttachment(dep, DeploymentUnit.class);
+ WSReferences wsRefRegistry = ASHelper.getWSRefRegistry(unit);
+ Object obj = dep.getProperty("ServiceAddressMap");
+ if(obj != null) {
+ @SuppressWarnings("unchecked")
+ Map<QName, String> deployedPortsAddress = (Map<QName, String>)obj;
+ for (UnifiedServiceRefMetaData metaData : wsRefRegistry.getUnifiedServiceRefMetaDatas()) {
+ metaData.addDeployedServiceAddresses(deployedPortsAddress);
+ }
+ }
+ }
+}
Property changes on: container/jboss71/branches/jbossws-jboss713/server-integration/src/main/java/org/jboss/as/webservices/deployers/UnifiedServiceRefDeploymentAspect.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Modified: container/jboss71/branches/jbossws-jboss713/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSReferences.java
===================================================================
--- container/jboss71/branches/jbossws-jboss713/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSReferences.java 2013-08-30 10:10:38 UTC (rev 17898)
+++ container/jboss71/branches/jbossws-jboss713/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSReferences.java 2013-08-30 10:10:53 UTC (rev 17899)
@@ -22,6 +22,8 @@
package org.jboss.as.webservices.webserviceref;
+import java.util.Collection;
+import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
@@ -52,6 +54,10 @@
public UnifiedServiceRefMetaData get(final String refName) {
return references.get(refName);
}
+
+ public Collection<UnifiedServiceRefMetaData> getUnifiedServiceRefMetaDatas() {
+ return Collections.unmodifiableCollection(references.values());
+ }
public void clear() {
references.clear();
Modified: container/jboss71/branches/jbossws-jboss713/server-integration/src/main/resources/META-INF/stack-agnostic-deployment-aspects.xml
===================================================================
--- container/jboss71/branches/jbossws-jboss713/server-integration/src/main/resources/META-INF/stack-agnostic-deployment-aspects.xml 2013-08-30 10:10:38 UTC (rev 17898)
+++ container/jboss71/branches/jbossws-jboss713/server-integration/src/main/resources/META-INF/stack-agnostic-deployment-aspects.xml 2013-08-30 10:10:53 UTC (rev 17899)
@@ -37,7 +37,12 @@
<property name="requires" class="java.lang.String">URLPattern</property>
<property name="provides" class="java.lang.String">EndpointAddress</property>
</deploymentAspect>
-
+
+ <deploymentAspect class="org.jboss.as.webservices.deployers.UnifiedServiceRefDeploymentAspect">
+ <property name="requires" class="java.lang.String">StackDescriptor</property>
+ <property name="provides" class="java.lang.String">UnifiedServiceRefMetaData</property>
+ </deploymentAspect>
+
<deploymentAspect class="org.jboss.as.webservices.deployers.EndpointServiceDeploymentAspect">
<property name="provides" class="java.lang.String">LifecycleHandler</property>
<property name="last" class="boolean">true</property>
11 years, 3 months
JBossWS SVN: r17898 - in container/jboss71/branches/jbossws-jboss712/server-integration/src/main: java/org/jboss/as/webservices/webserviceref and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2013-08-30 06:10:38 -0400 (Fri, 30 Aug 2013)
New Revision: 17898
Added:
container/jboss71/branches/jbossws-jboss712/server-integration/src/main/java/org/jboss/as/webservices/deployers/UnifiedServiceRefDeploymentAspect.java
Modified:
container/jboss71/branches/jbossws-jboss712/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSReferences.java
container/jboss71/branches/jbossws-jboss712/server-integration/src/main/resources/META-INF/stack-agnostic-deployment-aspects.xml
Log:
[JBWS-3679]:Back port fix to AS712
Added: container/jboss71/branches/jbossws-jboss712/server-integration/src/main/java/org/jboss/as/webservices/deployers/UnifiedServiceRefDeploymentAspect.java
===================================================================
--- container/jboss71/branches/jbossws-jboss712/server-integration/src/main/java/org/jboss/as/webservices/deployers/UnifiedServiceRefDeploymentAspect.java (rev 0)
+++ container/jboss71/branches/jbossws-jboss712/server-integration/src/main/java/org/jboss/as/webservices/deployers/UnifiedServiceRefDeploymentAspect.java 2013-08-30 10:10:38 UTC (rev 17898)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, Red Hat Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.as.webservices.deployers;
+
+import static org.jboss.ws.common.integration.WSHelper.getRequiredAttachment;
+
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.as.server.deployment.DeploymentUnit;
+import org.jboss.as.webservices.util.ASHelper;
+import org.jboss.as.webservices.webserviceref.WSReferences;
+import org.jboss.ws.common.integration.AbstractDeploymentAspect;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+
+/**
+ * DeploymentAspect to set deployed ServiceName and address map in unifiedServiceRefMetaData
+ * @author <a href="mailto:ema@redhat.com">Jim Ma</a>
+ */
+public class UnifiedServiceRefDeploymentAspect extends AbstractDeploymentAspect {
+ @Override
+ public void start(final Deployment dep) {
+ final DeploymentUnit unit = getRequiredAttachment(dep, DeploymentUnit.class);
+ WSReferences wsRefRegistry = ASHelper.getWSRefRegistry(unit);
+ Object obj = dep.getProperty("ServiceAddressMap");
+ if(obj != null) {
+ @SuppressWarnings("unchecked")
+ Map<QName, String> deployedPortsAddress = (Map<QName, String>)obj;
+ for (UnifiedServiceRefMetaData metaData : wsRefRegistry.getUnifiedServiceRefMetaDatas()) {
+ metaData.addDeployedServiceAddresses(deployedPortsAddress);
+ }
+ }
+ }
+}
Property changes on: container/jboss71/branches/jbossws-jboss712/server-integration/src/main/java/org/jboss/as/webservices/deployers/UnifiedServiceRefDeploymentAspect.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Modified: container/jboss71/branches/jbossws-jboss712/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSReferences.java
===================================================================
--- container/jboss71/branches/jbossws-jboss712/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSReferences.java 2013-08-28 14:40:15 UTC (rev 17897)
+++ container/jboss71/branches/jbossws-jboss712/server-integration/src/main/java/org/jboss/as/webservices/webserviceref/WSReferences.java 2013-08-30 10:10:38 UTC (rev 17898)
@@ -22,6 +22,8 @@
package org.jboss.as.webservices.webserviceref;
+import java.util.Collection;
+import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
@@ -52,6 +54,10 @@
public UnifiedServiceRefMetaData get(final String refName) {
return references.get(refName);
}
+
+ public Collection<UnifiedServiceRefMetaData> getUnifiedServiceRefMetaDatas() {
+ return Collections.unmodifiableCollection(references.values());
+ }
public void clear() {
references.clear();
Modified: container/jboss71/branches/jbossws-jboss712/server-integration/src/main/resources/META-INF/stack-agnostic-deployment-aspects.xml
===================================================================
(Binary files differ)
11 years, 3 months
JBossWS SVN: r17897 - stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2150.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-08-28 10:40:15 -0400 (Wed, 28 Aug 2013)
New Revision: 17897
Modified:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCaseForked.java
Log:
[JBWS-3699][JBWS-3692] Removing workaround in JBWS2150TestCaseForked and using new feature instead
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCaseForked.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCaseForked.java 2013-08-28 14:39:10 UTC (rev 17896)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/jbws2150/JBWS2150TestCaseForked.java 2013-08-28 14:40:15 UTC (rev 17897)
@@ -24,6 +24,8 @@
import java.net.URL;
import java.util.Collection;
import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
@@ -37,6 +39,7 @@
import javax.xml.namespace.QName;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceFeature;
import junit.framework.Test;
@@ -533,12 +536,6 @@
ServiceIface endpoint = getEndpoint(wsdlLocation, "CodeFirstService");
if (setTargetAddress) {
((BindingProvider)endpoint).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, addr);
- } else {
- //We can end up building multiple clients in the same bus and those clients might be built against
- //different endpoints that are however published at the same address (at different time of course).
- //So we explicitly set the BindingProvider.ENDPOINT_ADDRESS_PROPERTY in the req ctx to the soap:address
- //from the wsdl to prevent caching related issues.
- ((BindingProvider)endpoint).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, address);
}
assertEquals(endpoint.echo("hello"), "hello");
}
@@ -561,7 +558,17 @@
private ServiceIface getEndpoint(String wsdlLocation, String serviceName) throws Exception
{
- Service service = Service.create(new URL(wsdlLocation), new QName(NAMESPACE, serviceName));
+ List<WebServiceFeature> features = new LinkedList<WebServiceFeature>();
+ if (isIntegrationCXF()) {
+ //Setting UseNewBusFeature as the tests here deploy / undeploy endpoints with different wsdl at the same URL
+ //so we need to avoid caching issues related to the WSDLManager in the CXF Bus.
+
+ //Service service = Service.create(new URL(wsdlLocation), new QName(NAMESPACE, serviceName), new UseNewBusFeature())
+
+ Class<?> clazz = Class.forName("org.jboss.wsf.stack.cxf.client.UseNewBusFeature");
+ features.add((WebServiceFeature)clazz.newInstance());
+ }
+ Service service = Service.create(new URL(wsdlLocation), new QName(NAMESPACE, serviceName), features.toArray(new WebServiceFeature[features.size()]));
QName portName = service.getPorts().next();
return service.getPort(portName, ServiceIface.class);
}
11 years, 3 months
JBossWS SVN: r17896 - stack/cxf/trunk/modules/testsuite/cxf-tests/scripts.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-08-28 10:39:10 -0400 (Wed, 28 Aug 2013)
New Revision: 17896
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
Log:
[JBWS-3699] Also fixing testsuite build...
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2013-08-28 14:38:25 UTC (rev 17895)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/scripts/cxf-jars-jaxws.xml 2013-08-28 14:39:10 UTC (rev 17896)
@@ -84,6 +84,16 @@
prefix="WEB-INF/wsdl"/>
</war>
+ <!-- jaxws-cxf-bus-wsdl -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-cxf-bus-wsdl.war" needxmlfile="false">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/cxf/bus/WSDLServlet.class"/>
+ </classes>
+ <classes dir="${tests.output.dir}/test-resources/jaxws/cxf/bus">
+ <include name="*AddressEndpoint.wsdl"/>
+ </classes>
+ </war>
+
<!-- jaxws-cxf-clientConfig -->
<war warfile="${tests.output.dir}/test-libs/jaxws-cxf-clientConfig.war" needxmlfile="false">
<classes dir="${tests.output.dir}/test-classes">
11 years, 3 months
JBossWS SVN: r17895 - in stack/cxf/trunk/modules: testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-08-28 10:38:25 -0400 (Wed, 28 Aug 2013)
New Revision: 17895
Added:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/UseNewBusFeature.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/BusReuseTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/WSDLServlet.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/bus/InvalidAddressEndpoint.wsdl
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/bus/ValidAddressEndpoint.wsdl
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java
Log:
[JBWS-3699] Adding UseNewBusFeature feature and a testcase for it
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java 2013-08-28 12:17:12 UTC (rev 17894)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java 2013-08-28 14:38:25 UTC (rev 17895)
@@ -37,7 +37,6 @@
import javax.xml.ws.Endpoint;
import javax.xml.ws.EndpointContext;
import javax.xml.ws.EndpointReference;
-import javax.xml.ws.WebServiceException;
import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.Service.Mode;
import javax.xml.ws.spi.Invoker;
@@ -51,7 +50,6 @@
import org.apache.cxf.jaxws.ServiceImpl;
import org.apache.cxf.ws.addressing.EndpointReferenceType;
import org.jboss.ws.api.configuration.AbstractClientFeature;
-import org.jboss.ws.common.configuration.ConfigHelper;
import org.jboss.ws.common.utils.DelegateClassLoader;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
@@ -185,13 +183,31 @@
try
{
restoreTCCL = checkAndFixContextClassLoader(origClassLoader);
- Bus bus = setValidThreadDefaultBus();
+ boolean createNewBus = false;
for (WebServiceFeature f : features) {
- if (!f.getClass().getName().startsWith("javax.xml.ws")) {
+ final String fName = f.getClass().getName();
+ if (!fName.startsWith("javax.xml.ws") && !fName.startsWith("org.jboss.ws")) {
throw Messages.MESSAGES.unknownFeature(f.getClass().getName());
}
+ if (fName.equals(UseNewBusFeature.class.getName())) {
+ createNewBus = f.isEnabled();
+ }
}
- return new JBossWSServiceImpl(bus, wsdlDocumentLocation, serviceName, serviceClass, features);
+ if (!createNewBus) {
+ Bus bus = setValidThreadDefaultBus();
+ return new JBossWSServiceImpl(bus, wsdlDocumentLocation, serviceName, serviceClass, features);
+ } else { //honor the UseNewBusFeature
+ Bus orig = null;
+ try {
+ orig = BusFactory.getThreadDefaultBus(false);
+ Bus bus = BusFactory.newInstance().createBus();
+ return new JBossWSServiceImpl(bus, wsdlDocumentLocation, serviceName, serviceClass, features);
+ } finally {
+ if (orig != null) {
+ BusFactory.setThreadDefaultBus(orig);
+ }
+ }
+ }
}
finally
{
Added: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/UseNewBusFeature.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/UseNewBusFeature.java (rev 0)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/UseNewBusFeature.java 2013-08-28 14:38:25 UTC (rev 17895)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2013, 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.wsf.stack.cxf.client;
+
+import javax.xml.ws.WebServiceFeature;
+
+/**
+ * A JBossWS-CXF custom WebServiceFeature to be used for requesting a new Bus
+ * to be created for building the JAXWS Service.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 28-Aug-2013
+ *
+ */
+public class UseNewBusFeature extends WebServiceFeature
+{
+ public UseNewBusFeature() {
+ this.enabled = true;
+ }
+
+ public UseNewBusFeature(boolean enabled) {
+ this.enabled = enabled;
+ }
+
+ @Override
+ public String getID()
+ {
+ return this.getClass().getName();
+ }
+
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/BusReuseTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/BusReuseTestCase.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/BusReuseTestCase.java 2013-08-28 14:38:25 UTC (rev 17895)
@@ -0,0 +1,144 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2012, 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.cxf.bus;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceException;
+import javax.xml.ws.WebServiceFeature;
+
+import junit.framework.Test;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.jboss.wsf.stack.cxf.client.UseNewBusFeature;
+import org.jboss.wsf.test.JBossWSCXFTestSetup;
+import org.jboss.wsf.test.JBossWSTest;
+
+/**
+ * A testcase for verifying proper behaviour of the UseNewBusFeature on
+ * JAXWS Service creation.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 28-Aug-2013
+ *
+ */
+public class BusReuseTestCase extends JBossWSTest
+{
+ public final String WSDL_ADDRESS = "http://" + getServerHost() + ":8080/jaxws-cxf-bus-wsdl";
+
+ public static Test suite()
+ {
+ return new JBossWSCXFTestSetup(BusReuseTestCase.class, "jaxws-cxf-bus.war, jaxws-cxf-bus-wsdl.war");
+ }
+
+ public void testReuse() throws Exception
+ {
+ //odd wsdl GETs return WSDL doc with invalid soap:address
+ //even wsdl GETs return WSDL doc with valid soap:address
+ final String wsdl1 = readWsdl(WSDL_ADDRESS); //invalid
+ final String wsdl2 = readWsdl(WSDL_ADDRESS); //valid
+ final String wsdl3 = readWsdl(WSDL_ADDRESS); //invalid
+ final String wsdl4 = readWsdl(WSDL_ADDRESS); //valid
+ assertEquals(wsdl1, wsdl3);
+ assertEquals(wsdl2, wsdl4);
+ assertFalse(wsdl1.equals(wsdl2));
+
+ Bus bus = BusFactory.newInstance().createBus();
+ try {
+ BusFactory.setThreadDefaultBus(bus);
+ Endpoint port = getPort(WSDL_ADDRESS, bus); //invalid
+ try {
+ performInvocation(port);
+ fail("Failure expected, as the wsdl soap:address is not valid!");
+ } catch (WebServiceException wse) {
+ assertTrue(wse.getCause().getMessage().contains("InvalidEndpoint"));
+ }
+
+ port = getPort(WSDL_ADDRESS, bus); //valid
+ try {
+ performInvocation(port);
+ fail("Failure expected, as the WSDLManager for the bus will return the invalid wsdl");
+ } catch (WebServiceException wse) {
+ assertTrue(wse.getCause().getMessage().contains("InvalidEndpoint"));
+ }
+
+ port = getPort(WSDL_ADDRESS, bus); //invalid
+
+ port = getPort(WSDL_ADDRESS, bus, new UseNewBusFeature()); //valid
+ //the port should now actually be built against the valid wsdl
+ //as a new bus should have been started (with a new WSDLManager)
+ //so the invocation is expected to succeed
+ performInvocation(port);
+
+ port = getPort(WSDL_ADDRESS, bus); //invalid
+
+ port = getPort(WSDL_ADDRESS, bus, new UseNewBusFeature(false)); //valid
+ try {
+ performInvocation(port);
+ fail("Failure expected, as the WSDLManager for the bus will return the invalid wsdl (disabled feature used)");
+ } catch (WebServiceException wse) {
+ assertTrue(wse.getCause().getMessage().contains("InvalidEndpoint"));
+ }
+ } finally {
+ bus.shutdown(true);
+ }
+ }
+
+ private String readWsdl(String addr) throws Exception {
+ BufferedReader in = null;
+ try {
+ in = new BufferedReader(new InputStreamReader(new URL(addr).openStream()));
+ StringBuffer sb = new StringBuffer();
+ String line;
+ while ((line = in.readLine()) != null) {
+ sb.append(line);
+ }
+ return sb.toString();
+ } finally {
+ if (in != null) {
+ in.close();
+ }
+ }
+ }
+
+ protected static void performInvocation(Endpoint endpoint)
+ {
+ String result = endpoint.echo("Alessio");
+ assert ("Alessio".equals(result));
+ }
+
+ protected static Endpoint getPort(String wsdlAddr, Bus currentThreadBus, WebServiceFeature... features) throws MalformedURLException
+ {
+ QName serviceName = new QName("http://org.jboss.ws/bus", "EndpointService");
+ Service service = Service.create(new URL(wsdlAddr), serviceName, features);
+ //check the current thread bus has not changed (even if we used the UseNewBusFeature)
+ assertEquals(currentThreadBus, BusFactory.getThreadDefaultBus(false));
+ QName portQName = new QName("http://org.jboss.ws/bus", "EndpointPort");
+ return (Endpoint) service.getPort(portQName, Endpoint.class);
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/WSDLServlet.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/WSDLServlet.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/bus/WSDLServlet.java 2013-08-28 14:38:25 UTC (rev 17895)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2013, 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.cxf.bus;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import javax.servlet.ServletException;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * A servlet serving two WSDL documents alternatively
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 28-Aug-2013
+ *
+ */
+@WebServlet(name = "WSDLServlet", urlPatterns = "/*")
+public class WSDLServlet extends HttpServlet
+{
+ private static final long serialVersionUID = 1L;
+
+ private static boolean serveValidWsdl = false;
+
+ @Override
+ protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+ {
+ final OutputStream out = res.getOutputStream();
+ final InputStream in = Thread.currentThread().getContextClassLoader().getResource(getWsdlName()).openStream();
+ byte[] buffer = new byte[1024];
+ int length;
+ while ((length = in.read(buffer)) > 0)
+ {
+ out.write(buffer, 0, length);
+ }
+ in.close();
+ out.flush();
+ }
+
+ private static synchronized String getWsdlName() {
+ String result = "ValidAddressEndpoint.wsdl";
+ if (!serveValidWsdl) {
+ result = "InvalidAddressEndpoint.wsdl";
+ }
+ serveValidWsdl = !serveValidWsdl;
+ return result;
+ }
+
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/bus/InvalidAddressEndpoint.wsdl
===================================================================
(Binary files differ)
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/bus/InvalidAddressEndpoint.wsdl
___________________________________________________________________
Added: svn:mime-type
+ application/xml
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/bus/ValidAddressEndpoint.wsdl
===================================================================
(Binary files differ)
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/bus/ValidAddressEndpoint.wsdl
___________________________________________________________________
Added: svn:mime-type
+ application/xml
11 years, 3 months
JBossWS SVN: r17894 - thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10856/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb.
by jbossws-commits@lists.jboss.org
Author: mmusaji
Date: 2013-08-28 08:17:12 -0400 (Wed, 28 Aug 2013)
New Revision: 17894
Modified:
thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10856/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBContextInitializer.java
Log:
[JBPAPP-10856] Merged CXF-5219
Modified: thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10856/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBContextInitializer.java
===================================================================
--- thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10856/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBContextInitializer.java 2013-08-28 10:15:23 UTC (rev 17893)
+++ thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10856/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBContextInitializer.java 2013-08-28 12:17:12 UTC (rev 17894)
@@ -347,6 +347,14 @@
Field fields[] = cls.getDeclaredFields();
for (Field f : fields) {
if (isFieldAccepted(f, accessType)) {
+ XmlJavaTypeAdapter xjta = Utils.getFieldXJTA(f);
+ if (xjta != null) {
+ Type t = Utils.getTypeFromXmlAdapter(xjta);
+ if (t != null) {
+ addType(t);
+ continue;
+ }
+ }
addType(f.getGenericType());
}
}
@@ -357,6 +365,14 @@
Method methods[] = cls.getDeclaredMethods();
for (Method m : methods) {
if (isMethodAccepted(m, accessType)) {
+ XmlJavaTypeAdapter xjta = Utils.getMethodXJTA(m);
+ if (xjta != null) {
+ Type t = Utils.getTypeFromXmlAdapter(xjta);
+ if (t != null) {
+ addType(t);
+ continue;
+ }
+ }
addType(m.getGenericReturnType());
for (Type t : m.getGenericParameterTypes()) {
addType(t);
11 years, 3 months
JBossWS SVN: r17893 - thirdparty/cxf/branches.
by jbossws-commits@lists.jboss.org
Author: mmusaji
Date: 2013-08-28 06:15:23 -0400 (Wed, 28 Aug 2013)
New Revision: 17893
Added:
thirdparty/cxf/branches/cxf-2.2.12-patch-04_JBPAPP-10856/
Log:
Create One Off Patch JIRA from JBPAPP-10835 so we can fix JBPAPP-10856 on top
11 years, 3 months
JBossWS SVN: r17892 - in stack/cxf/trunk/modules/testsuite/cxf-spring-tests: src/test/java/org/jboss/test/ws/jaxws/cxf/jms and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-08-27 11:26:36 -0400 (Tue, 27 Aug 2013)
New Revision: 17892
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/cxf-jars-jaxws.xml
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointOnlyDeploymentTestCaseForked.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/JMSHTTPEndpointDeploymentTestCaseForked.java
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF-as7/wsdl/HelloWorldService.wsdl
Log:
[JBWS-3698] Fixing failure on AS 7.x...
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/cxf-jars-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/cxf-jars-jaxws.xml 2013-08-27 14:18:53 UTC (rev 17891)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/scripts/cxf-jars-jaxws.xml 2013-08-27 15:26:36 UTC (rev 17892)
@@ -237,6 +237,21 @@
</manifest>
</war>
+ <!-- jaxws-cxf-jms-http-deployment-test-servlet-as7 -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-cxf-jms-http-deployment-test-servlet-as7.war"
+ needxmlfile='false'>
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/cxf/jms_http/DeploymentTestServlet.class"/>
+ <include name="org/jboss/test/ws/jaxws/cxf/jms_http/HelloWorld.class"/>
+ </classes>
+ <zipfileset
+ dir="${tests.output.dir}/test-resources/jaxws/cxf/jms_http/WEB-INF-as7/wsdl"
+ prefix="WEB-INF/classes/META-INF/wsdl"/>
+ <manifest>
+ <attribute name="Dependencies" value="org.jboss.ws.cxf.jbossws-cxf-client services,org.hornetq"/>
+ </manifest>
+ </war>
+
<!-- jaxws-cxf-jms-http-deployment-test-servlet -->
<war warfile="${tests.output.dir}/test-libs/jaxws-cxf-jms-http-deployment-test-servlet.war"
needxmlfile='false'>
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointOnlyDeploymentTestCaseForked.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointOnlyDeploymentTestCaseForked.java 2013-08-27 14:18:53 UTC (rev 17891)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointOnlyDeploymentTestCaseForked.java 2013-08-27 15:26:36 UTC (rev 17892)
@@ -112,7 +112,11 @@
Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
- env.put(Context.PROVIDER_URL, "http-remoting://" + getServerHost() + ":8080");
+ if (isTargetJBoss7()) {
+ env.put(Context.PROVIDER_URL, "remote://" + getServerHost() + ":4447");
+ } else {
+ env.put(Context.PROVIDER_URL, "http-remoting://" + getServerHost() + ":8080");
+ }
env.put(Context.SECURITY_PRINCIPAL, JBossWSTestHelper.getTestUsername());
env.put(Context.SECURITY_CREDENTIALS, JBossWSTestHelper.getTestPassword());
InitialContext context = null;
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/JMSHTTPEndpointDeploymentTestCaseForked.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/JMSHTTPEndpointDeploymentTestCaseForked.java 2013-08-27 14:18:53 UTC (rev 17891)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms_http/JMSHTTPEndpointDeploymentTestCaseForked.java 2013-08-27 15:26:36 UTC (rev 17892)
@@ -50,20 +50,23 @@
{
public static Test suite()
{
- return new JBossWSCXFTestSetup(JMSHTTPEndpointDeploymentTestCaseForked.class, "jaxws-cxf-jms-http-deployment-test-servlet.war," +
- (isTargetJBoss7() ? "jaxws-cxf-jms-http-deployment-as7.war" : "jaxws-cxf-jms-http-deployment.war"));
+ return new JBossWSCXFTestSetup(JMSHTTPEndpointDeploymentTestCaseForked.class, (isTargetJBoss7() ?
+ "jaxws-cxf-jms-http-deployment-test-servlet-as7.war, jaxws-cxf-jms-http-deployment-as7.war" :
+ "jaxws-cxf-jms-http-deployment-test-servlet.war, jaxws-cxf-jms-http-deployment.war"));
}
public void testJMSEndpointServerSide() throws Exception
{
- URL url = new URL("http://" + getServerHost() + ":8080/jaxws-cxf-jms-http-deployment-test-servlet");
+ final String suffix = isTargetJBoss7() ? "-as7" : "";
+ URL url = new URL("http://" + getServerHost() + ":8080/jaxws-cxf-jms-http-deployment-test-servlet" + suffix);
BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
assertEquals("true", br.readLine());
}
public void testJMSEndpointClientSide() throws Exception
{
- URL wsdlUrl = getResourceURL("jaxws/cxf/jms_http/WEB-INF/wsdl/HelloWorldService.wsdl");
+ final String suffix = isTargetJBoss7() ? "-as7" : "";
+ URL wsdlUrl = getResourceURL("jaxws/cxf/jms_http/WEB-INF" + suffix + "/wsdl/HelloWorldService.wsdl");
QName serviceName = new QName("http://org.jboss.ws/jaxws/cxf/jms", "HelloWorldService");
Service service = Service.create(wsdlUrl, serviceName);
@@ -81,7 +84,8 @@
public void testHTTPEndpointClientSide() throws Exception
{
- URL wsdlUrl = new URL("http://" + getServerHost() + ":8080/jaxws-cxf-jms-http-deployment?wsdl");
+ final String suffix = isTargetJBoss7() ? "-as7" : "";
+ URL wsdlUrl = new URL("http://" + getServerHost() + ":8080/jaxws-cxf-jms-http-deployment" + suffix + "?wsdl");
QName serviceName = new QName("http://org.jboss.ws/jaxws/cxf/jms", "HelloWorldService");
Service service = Service.create(wsdlUrl, serviceName);
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/resources/jaxws/cxf/jms_http/WEB-INF-as7/wsdl/HelloWorldService.wsdl
===================================================================
(Binary files differ)
11 years, 3 months
JBossWS SVN: r17891 - stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-08-27 10:18:53 -0400 (Tue, 27 Aug 2013)
New Revision: 17891
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointAPITestCaseForked.java
Log:
[JBWS-3698] Also update JMSEndpointAPI testcase given the additional changes in previous commit to reduce clutter
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointAPITestCaseForked.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointAPITestCaseForked.java 2013-08-27 14:17:08 UTC (rev 17890)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jms/JMSEndpointAPITestCaseForked.java 2013-08-27 14:18:53 UTC (rev 17891)
@@ -40,12 +40,12 @@
{
public static Test suite()
{
- return new JBossWSCXFTestSetup(JMSEndpointAPITestCaseForked.class, "jaxws-cxf-jms-api-as7.war");
+ return new JBossWSCXFTestSetup(JMSEndpointAPITestCaseForked.class, "jaxws-cxf-jms-api.war");
}
public void testServerSide() throws Exception
{
- URL url = new URL("http://" + getServerHost() + ":8080/jaxws-cxf-jms-api-as7");
+ URL url = new URL("http://" + getServerHost() + ":8080/jaxws-cxf-jms-api");
BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
assertEquals("true", br.readLine());
}
11 years, 3 months