JBossWS SVN: r18804 - stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-07-21 12:15:08 -0400 (Mon, 21 Jul 2014)
New Revision: 18804
Added:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/SysPropExpandingStreamReader.java
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
Log:
[JBWS-3628] Add property expansion capability to .wsdl files
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2014-07-21 10:47:43 UTC (rev 18803)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2014-07-21 16:15:08 UTC (rev 18804)
@@ -26,6 +26,8 @@
import java.util.Map;
import java.util.Map.Entry;
+import javax.xml.stream.XMLStreamReader;
+
import org.apache.cxf.Bus;
import org.apache.cxf.buslifecycle.BusLifeCycleListener;
import org.apache.cxf.buslifecycle.BusLifeCycleManager;
@@ -40,6 +42,7 @@
import org.apache.cxf.resource.ResourceResolver;
import org.apache.cxf.service.factory.FactoryBeanListener;
import org.apache.cxf.service.factory.FactoryBeanListenerManager;
+import org.apache.cxf.staxutils.XMLStreamReaderWrapper;
import org.apache.cxf.workqueue.AutomaticWorkQueue;
import org.apache.cxf.workqueue.AutomaticWorkQueueImpl;
import org.apache.cxf.workqueue.WorkQueueManager;
@@ -47,6 +50,8 @@
import org.apache.cxf.ws.policy.AlternativeSelector;
import org.apache.cxf.ws.policy.PolicyEngine;
import org.apache.cxf.ws.policy.selector.MaximalAlternativeSelector;
+import org.apache.cxf.wsdl.WSDLManager;
+import org.apache.cxf.wsdl11.WSDLManagerImpl;
import org.jboss.ws.api.annotation.PolicySets;
import org.jboss.ws.api.binding.BindingCustomization;
import org.jboss.wsf.spi.SPIProvider;
@@ -109,6 +114,7 @@
bus.setProperty(org.jboss.wsf.stack.cxf.client.Constants.DEPLOYMENT_BUS, true);
busHolderListener = new BusHolderLifeCycleListener();
bus.getExtension(BusLifeCycleManager.class).registerLifeCycleListener(busHolderListener);
+ setWSDLManagerStreamWrapper(bus);
if (configurer != null)
{
@@ -282,6 +288,18 @@
}
}
+ private static void setWSDLManagerStreamWrapper(Bus bus)
+ {
+ ((WSDLManagerImpl) bus.getExtension(WSDLManager.class)).setXMLStreamReaderWrapper(new XMLStreamReaderWrapper()
+ {
+ @Override
+ public XMLStreamReader wrap(XMLStreamReader reader)
+ {
+ return new SysPropExpandingStreamReader(reader);
+ }
+ });
+ }
+
private static AlternativeSelector getAlternativeSelector(Map<String, String> props) {
//default to MaximalAlternativeSelector on server side [JBWS-3149]
AlternativeSelector selector = new MaximalAlternativeSelector();
Added: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/SysPropExpandingStreamReader.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/SysPropExpandingStreamReader.java (rev 0)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/SysPropExpandingStreamReader.java 2014-07-21 16:15:08 UTC (rev 18804)
@@ -0,0 +1,111 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2014, 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.configuration;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.util.StreamReaderDelegate;
+
+/**
+ * A StreamReaderDelegate that expands system property references in element and attribute values.
+ *
+ */
+public class SysPropExpandingStreamReader extends StreamReaderDelegate
+{
+ public static final String DELIMITER = "@";
+
+ public SysPropExpandingStreamReader(XMLStreamReader reader)
+ {
+ super(reader);
+ }
+
+ protected String expandSystemProperty(String value)
+ {
+ if (isEmpty(value))
+ {
+ return value;
+ }
+ final int startIndx = value.indexOf(DELIMITER);
+ if (startIndx > -1)
+ {
+ final int endIndx = value.lastIndexOf(DELIMITER);
+ if (endIndx > -1 && startIndx + 1 < endIndx)
+ {
+ final String propName = value.substring(startIndx + 1, endIndx);
+ if (!isEmpty(propName))
+ {
+ final String envValue = System.getProperty(propName);
+ if (!isEmpty(envValue))
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.append(value.substring(0, startIndx));
+ sb.append(envValue);
+ sb.append(value.substring(endIndx + 1));
+ value = sb.toString();
+ }
+ }
+ }
+ }
+
+ return value;
+ }
+
+ private static boolean isEmpty(String str)
+ {
+ if (str != null)
+ {
+ int len = str.length();
+ for (int x = 0; x < len; ++x)
+ {
+ if (str.charAt(x) > ' ')
+ {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ @Override
+ public String getElementText() throws XMLStreamException
+ {
+ return expandSystemProperty(super.getElementText());
+ }
+
+ @Override
+ public String getAttributeValue(String namespaceURI, String localName)
+ {
+ return expandSystemProperty(super.getAttributeValue(namespaceURI, localName));
+ }
+
+ @Override
+ public String getAttributeValue(int index)
+ {
+ return expandSystemProperty(super.getAttributeValue(index));
+ }
+
+ @Override
+ public String getText()
+ {
+ return expandSystemProperty(super.getText());
+ }
+}
Property changes on: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/SysPropExpandingStreamReader.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
10 years, 5 months
JBossWS SVN: r18803 - stack/cxf/trunk.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-07-21 06:47:43 -0400 (Mon, 21 Jul 2014)
New Revision: 18803
Modified:
stack/cxf/trunk/pom.xml
Log:
[JBWS-3811] Moving to CXF 3.0.1 release
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2014-07-15 15:10:10 UTC (rev 18802)
+++ stack/cxf/trunk/pom.xml 2014-07-21 10:47:43 UTC (rev 18803)
@@ -71,7 +71,7 @@
<wildfly810.version>8.1.0.Final</wildfly810.version>
<wildfly900.version>9.0.0.Alpha1-SNAPSHOT</wildfly900.version>
<ejb.api.version>1.0.2.Final</ejb.api.version>
- <cxf.version>3.0.1-SNAPSHOT</cxf.version>
+ <cxf.version>3.0.1</cxf.version>
<cxf.asm.version>3.3.1</cxf.asm.version>
<cxf.xjcplugins.version>2.7.0</cxf.xjcplugins.version>
<jboss.common.core.version>2.2.17.GA</jboss.common.core.version>
10 years, 5 months
JBossWS SVN: r18802 - in stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/META-INF: wsdl and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: rsearls
Date: 2014-07-15 11:10:10 -0400 (Tue, 15 Jul 2014)
New Revision: 18802
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/META-INF/jax-ws-catalog.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/META-INF/wsdl/HelloService.wsdl
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/META-INF/wsdl/Hello_schema1.xsd
Log:
moved to text mime type
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/META-INF/jax-ws-catalog.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/META-INF/wsdl/HelloService.wsdl
___________________________________________________________________
Modified: svn:mime-type
- application/xml
+ text/plain
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/META-INF/wsdl/Hello_schema1.xsd
___________________________________________________________________
Modified: svn:mime-type
- application/xml
+ text/plain
10 years, 5 months
JBossWS SVN: r18801 - in stack/cxf/trunk/modules/testsuite/cxf-tests/src/test: resources/jaxws/cxf/catalog/META-INF and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: rsearls
Date: 2014-07-15 10:04:56 -0400 (Tue, 15 Jul 2014)
New Revision: 18801
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/META-INF/wsdl/HelloService.wsdl
Removed:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/META-INF/wsdl/Hello.wsdl
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/HelloWsImpl.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/OasisCatalogHelloWSTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/META-INF/jax-ws-catalog.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/META-INF/wsdl/Hello_schema1.xsd
Log:
[JBWS-3788] added test for server side (cxf) catalog processing
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/HelloWsImpl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/HelloWsImpl.java 2014-07-14 12:30:24 UTC (rev 18800)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/HelloWsImpl.java 2014-07-15 14:04:56 UTC (rev 18801)
@@ -27,7 +27,7 @@
import javax.jws.WebService;
-@WebService(wsdlLocation = "META-INF/wsdl/Hello.wsdl",
+@WebService(wsdlLocation = "META-INF/wsdl/HelloService.wsdl",
name = org.jboss.test.ws.jaxws.cxf.catalog.HelloWs.NAME,
serviceName = org.jboss.test.ws.jaxws.cxf.catalog.HelloWs.NAME,
targetNamespace = org.jboss.test.ws.jaxws.cxf.catalog.HelloWs.TARGET_NAMESPACE,
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/OasisCatalogHelloWSTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/OasisCatalogHelloWSTestCase.java 2014-07-14 12:30:24 UTC (rev 18800)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/OasisCatalogHelloWSTestCase.java 2014-07-15 14:04:56 UTC (rev 18801)
@@ -38,12 +38,22 @@
.addClass(org.jboss.test.ws.jaxws.cxf.catalog.HelloResponse.class)
.addClass(org.jboss.test.ws.jaxws.cxf.catalog.HelloWsImpl.class)
.addClass(org.jboss.test.ws.jaxws.cxf.catalog.HelloWs.class)
+ .add(new FileAsset(new File(JBossWSTestHelper.getTestResourcesDir() +
+ "/jaxws/cxf/catalog/META-INF/jax-ws-catalog.xml")),
+ "META-INF/jax-ws-catalog.xml")
+
+ // stnd file locations required for successful deployment
.addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir()
- + "/jaxws/cxf/catalog/META-INF/wsdl/Hello.wsdl"), "wsdl/Hello.wsdl")
+ + "/jaxws/cxf/catalog/META-INF/wsdl/HelloService.wsdl"), "wsdl/HelloService.wsdl")
.addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir()
+ "/jaxws/cxf/catalog/META-INF/wsdl/Hello_schema1.xsd"), "wsdl/Hello_schema1.xsd")
- .add(new FileAsset(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/cxf/catalog/META-INF/jax-ws-catalog.xml")),
- "META-INF/jax-ws-catalog.xml")
+
+ // sever side catalog maps to these files.
+ .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir()
+ + "/jaxws/cxf/catalog/META-INF/wsdl/HelloService.wsdl"), "wsdl/foo/HelloService.wsdl")
+ .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir()
+ + "/jaxws/cxf/catalog/META-INF/wsdl/Hello_schema1.xsd"), "wsdl/foo/Hello_schema1.xsd")
+
;
}
});
@@ -114,4 +124,25 @@
}
}
+
+ public void testCatalogOnServerSide() throws Exception
+ {
+ Bus bus = BusFactory.newInstance().createBus();
+ try {
+ BusFactory.setThreadDefaultBus(bus);
+
+ QName serviceName = new QName(
+ org.jboss.test.ws.jaxws.cxf.catalog.HelloWs.TARGET_NAMESPACE,
+ org.jboss.test.ws.jaxws.cxf.catalog.HelloWs.NAME);
+ URL wsdlURL = new URL(endpointAddress + "?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ HelloWs proxy = service.getPort(HelloWs.class);
+ HelloRequest helloReq = new HelloRequest();
+ helloReq.setInput("Anyone home?");
+ proxy.doHello(helloReq);
+
+ } finally {
+ bus.shutdown(true);
+ }
+ }
}
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/META-INF/jax-ws-catalog.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/META-INF/jax-ws-catalog.xml 2014-07-14 12:30:24 UTC (rev 18800)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/META-INF/jax-ws-catalog.xml 2014-07-15 14:04:56 UTC (rev 18801)
@@ -1,6 +1,11 @@
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
+ <!-- client side test -->
<rewriteSystem systemIdStartString="http://org.jboss.ws/cxf/catalogclient"
rewritePrefix="http://org.foo.bar/client"/>
+ <!-- server side deployed app test -->
+ <systemSuffix systemIdSuffix="Hello_schema1.xsd" uri="wsdl/foo/Hello_schema1.xsd"/>
+ <rewriteSystem systemIdStartString="META-INF/wsdl" rewritePrefix="wsdl/foo"/>
+
</catalog>
\ No newline at end of file
Deleted: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/META-INF/wsdl/Hello.wsdl
===================================================================
(Binary files differ)
Copied: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/META-INF/wsdl/HelloService.wsdl (from rev 18799, stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/META-INF/wsdl/Hello.wsdl)
===================================================================
(Binary files differ)
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/META-INF/wsdl/Hello_schema1.xsd
===================================================================
(Binary files differ)
10 years, 5 months
JBossWS SVN: r18800 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-07-14 08:30:24 -0400 (Mon, 14 Jul 2014)
New Revision: 18800
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3811] Move to BC 1.49
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2014-07-11 19:51:42 UTC (rev 18799)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2014-07-14 12:30:24 UTC (rev 18800)
@@ -29,7 +29,7 @@
<org.littleshoot.littleproxy.version>1.0.0-beta2</org.littleshoot.littleproxy.version>
<org.slf4j.version>1.6.1</org.slf4j.version>
<gnu.getopt.version>1.0.13</gnu.getopt.version>
- <bc.version>1.50</bc.version>
+ <bc.version>1.49</bc.version>
<log4j.version>1.2.14</log4j.version>
<remote.port>4447</remote.port>
<remote.protocol>remote</remote.protocol>
10 years, 5 months
JBossWS SVN: r18799 - in stack/cxf/trunk/modules/testsuite/cxf-tests/src/test: java/org/jboss/test/ws/jaxws/cxf/catalog and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: rsearls
Date: 2014-07-11 15:51:42 -0400 (Fri, 11 Jul 2014)
New Revision: 18799
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/HelloRequest.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/HelloResponse.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/HelloWs.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/HelloWsImpl.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/OasisCatalogHelloWSTestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/META-INF/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/META-INF/jax-ws-catalog.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/META-INF/wsdl/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/META-INF/wsdl/Hello.wsdl
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/META-INF/wsdl/Hello_schema1.xsd
Log:
[JBWS-3788] test clientSide app catalog and clientSide jbossws-cxf-client.jar catalog
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/HelloRequest.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/HelloRequest.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/HelloRequest.java 2014-07-11 19:51:42 UTC (rev 18799)
@@ -0,0 +1,38 @@
+/*
+ * 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.catalog;
+
+public class HelloRequest
+{
+ private String input;
+
+ public String getInput()
+ {
+ return input;
+ }
+
+ public void setInput(String input)
+ {
+ this.input = input;
+ }
+
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/HelloResponse.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/HelloResponse.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/HelloResponse.java 2014-07-11 19:51:42 UTC (rev 18799)
@@ -0,0 +1,41 @@
+/*
+ * 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.catalog;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class HelloResponse
+{
+ private List<String> multiHello = new ArrayList<String>();
+
+ public List<String> getMultiHello()
+ {
+ return multiHello;
+ }
+
+ public void setMultiHello(List<String> multiHello)
+ {
+ this.multiHello = multiHello;
+ }
+
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/HelloWs.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/HelloWs.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/HelloWs.java 2014-07-11 19:51:42 UTC (rev 18799)
@@ -0,0 +1,37 @@
+/*
+ * 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.catalog;
+
+import org.jboss.test.ws.jaxws.cxf.catalog.HelloRequest;
+import org.jboss.test.ws.jaxws.cxf.catalog.HelloResponse;
+
+import javax.jws.WebService;
+
+@WebService(name = HelloWs.NAME, targetNamespace = HelloWs.TARGET_NAMESPACE)
+public interface HelloWs
+{
+ public final static String NAME = "HelloService";
+
+ public final static String TARGET_NAMESPACE = "http://hello/test";
+
+ public HelloResponse doHello(HelloRequest request);
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/HelloWsImpl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/HelloWsImpl.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/HelloWsImpl.java 2014-07-11 19:51:42 UTC (rev 18799)
@@ -0,0 +1,42 @@
+/*
+ * 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 theb 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.catalog;
+
+import org.jboss.test.ws.jaxws.cxf.catalog.HelloRequest;
+import org.jboss.test.ws.jaxws.cxf.catalog.HelloResponse;
+import org.jboss.test.ws.jaxws.cxf.catalog.HelloWs;
+
+import javax.jws.WebService;
+
+@WebService(wsdlLocation = "META-INF/wsdl/Hello.wsdl",
+ name = org.jboss.test.ws.jaxws.cxf.catalog.HelloWs.NAME,
+ serviceName = org.jboss.test.ws.jaxws.cxf.catalog.HelloWs.NAME,
+ targetNamespace = org.jboss.test.ws.jaxws.cxf.catalog.HelloWs.TARGET_NAMESPACE,
+ endpointInterface = "org.jboss.test.ws.jaxws.cxf.catalog.HelloWs")
+public class HelloWsImpl implements HelloWs {
+ public HelloResponse doHello(HelloRequest request) {
+ HelloResponse response = new HelloResponse();
+ response.getMultiHello().add(request.getInput());
+ response.getMultiHello().add("world");
+ return response;
+ }
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/OasisCatalogHelloWSTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/OasisCatalogHelloWSTestCase.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/catalog/OasisCatalogHelloWSTestCase.java 2014-07-11 19:51:42 UTC (rev 18799)
@@ -0,0 +1,117 @@
+package org.jboss.test.ws.jaxws.cxf.catalog;
+
+import junit.framework.Test;
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.catalog.OASISCatalogManager;
+import org.jboss.shrinkwrap.api.asset.FileAsset;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
+import org.jboss.wsf.test.JBossWSCXFTestSetup;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper;
+import org.jboss.wsf.test.JBossWSTestHelper.BaseDeployment;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import java.io.File;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * User: rsearls
+ * Date: 7/9/14
+ */
+public class OasisCatalogHelloWSTestCase extends JBossWSTest
+{
+ private final String endpointAddress = "http://" + getServerHost() + ":8080/jaxws-cxf-catalog/HelloService";
+
+ public static BaseDeployment<?>[] createDeployments() {
+
+ List<BaseDeployment<?>> list = new LinkedList<BaseDeployment<?>>();
+ list.add(new JBossWSTestHelper.WarDeployment("jaxws-cxf-catalog.war") { {
+ archive
+ .setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ + "Dependencies: org.apache.cxf\n"))
+ .addClass(org.jboss.test.ws.jaxws.cxf.catalog.HelloRequest.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.catalog.HelloResponse.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.catalog.HelloWsImpl.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.catalog.HelloWs.class)
+ .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir()
+ + "/jaxws/cxf/catalog/META-INF/wsdl/Hello.wsdl"), "wsdl/Hello.wsdl")
+ .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir()
+ + "/jaxws/cxf/catalog/META-INF/wsdl/Hello_schema1.xsd"), "wsdl/Hello_schema1.xsd")
+ .add(new FileAsset(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/cxf/catalog/META-INF/jax-ws-catalog.xml")),
+ "META-INF/jax-ws-catalog.xml")
+ ;
+ }
+ });
+ return list.toArray(new BaseDeployment<?>[list.size()]);
+ }
+
+ public static Test suite()
+ {
+ return new JBossWSCXFTestSetup(OasisCatalogHelloWSTestCase.class,
+ JBossWSTestHelper.writeToFile(createDeployments()));
+ }
+
+ public void testCatalogOnClientSide() throws Exception
+ {
+ Bus bus = BusFactory.newInstance().createBus();
+ try {
+ BusFactory.setThreadDefaultBus(bus);
+
+ URL archiveURL = JBossWSTestHelper.getArchiveURL("jaxws-cxf-catalog.war");
+
+ // add archive to classpath
+ ClassLoader currentThreadClassLoader = Thread.currentThread().getContextClassLoader();
+ URLClassLoader urlClassLoader
+ = new URLClassLoader(new URL[]{archiveURL}, currentThreadClassLoader);
+ Thread.currentThread().setContextClassLoader(urlClassLoader);
+
+ QName serviceName = new QName(
+ org.jboss.test.ws.jaxws.cxf.catalog.HelloWs.TARGET_NAMESPACE,
+ org.jboss.test.ws.jaxws.cxf.catalog.HelloWs.NAME);
+ URL wsdlURL = new URL(endpointAddress + "?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+
+ OASISCatalogManager catalogManager = bus.getExtension(OASISCatalogManager.class);
+ assertNotNull("OASISCatalogManager not provided ", catalogManager);
+
+ String xsd = "http://org.jboss.ws/cxf/catalogclient/ws-addr.xsd";
+ String resolvedSchemaLocation = catalogManager.resolveSystem(xsd);
+ assertEquals("http://org.foo.bar/client/ws-addr.xsd", resolvedSchemaLocation);
+
+ } finally {
+ bus.shutdown(true);
+ }
+ }
+
+ public void testCatalogInJbosswsCxfClientJar() throws Exception
+ {
+ Bus bus = BusFactory.newInstance().createBus();
+ try {
+ BusFactory.setThreadDefaultBus(bus);
+
+ QName serviceName = new QName(
+ org.jboss.test.ws.jaxws.cxf.catalog.HelloWs.TARGET_NAMESPACE,
+ org.jboss.test.ws.jaxws.cxf.catalog.HelloWs.NAME);
+ URL wsdlURL = new URL(endpointAddress + "?wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+
+ // jbossws-cxf-client.Jar is on the classpath by default.
+ // cxf processed it during service creation.
+ OASISCatalogManager catalogManager = bus.getExtension(OASISCatalogManager.class);
+ assertNotNull("OASISCatalogManager not provided ", catalogManager);
+
+ String xsd = "http://ws-i.org/profiles/basic/1.1/ws-addr.xsd";
+ String resolvedSchemaLocation = catalogManager.resolveSystem(xsd);
+ assertEquals("classpath:/schemas/wsdl/ws-addr.xsd", resolvedSchemaLocation);
+
+ } finally {
+ bus.shutdown(true);
+ }
+ }
+
+}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/META-INF/jax-ws-catalog.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/META-INF/jax-ws-catalog.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/META-INF/jax-ws-catalog.xml 2014-07-11 19:51:42 UTC (rev 18799)
@@ -0,0 +1,6 @@
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
+
+ <rewriteSystem systemIdStartString="http://org.jboss.ws/cxf/catalogclient"
+ rewritePrefix="http://org.foo.bar/client"/>
+
+</catalog>
\ No newline at end of file
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/META-INF/wsdl/Hello.wsdl
===================================================================
(Binary files differ)
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/META-INF/wsdl/Hello.wsdl
___________________________________________________________________
Added: svn:mime-type
+ application/xml
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/META-INF/wsdl/Hello_schema1.xsd
===================================================================
(Binary files differ)
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/catalog/META-INF/wsdl/Hello_schema1.xsd
___________________________________________________________________
Added: svn:mime-type
+ application/xml
10 years, 5 months
JBossWS SVN: r18798 - stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/wsf/test.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-07-11 11:19:43 -0400 (Fri, 11 Jul 2014)
New Revision: 18798
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/wsf/test/CryptoHelper.java
Log:
Avoid runtime dependency on CXF internal API, as that can mask errors with NCDFE
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/wsf/test/CryptoHelper.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/wsf/test/CryptoHelper.java 2014-07-11 15:18:35 UTC (rev 18797)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/wsf/test/CryptoHelper.java 2014-07-11 15:19:43 UTC (rev 18798)
@@ -23,8 +23,6 @@
import java.security.NoSuchAlgorithmException;
-import org.apache.cxf.binding.soap.SoapFault;
-
public final class CryptoHelper
{
public static Exception checkAndWrapException(Exception e) throws Exception {
@@ -34,7 +32,7 @@
} else if(!isUnlimitedStrengthCryptographyAvailable()) {
return new Exception("JCE unlimited strength cryptography extension does not seem to be properly installed; either install it " +
"or run the testuite with '-Dexclude-integration-tests-unlimited-strength-related=true' to exclude this test.", e);
- } else if (e.getCause() != null && e.getCause() instanceof SoapFault && e.getMessage() != null && e.getMessage().contains("algorithm")) {
+ } else if (e.getCause() != null && e.getCause().getClass().getName().contains("SoapFault") && e.getMessage() != null && e.getMessage().contains("algorithm")) {
return new Exception("Please check for Bouncy Castle JCE provider and JCE unlimited strenght cryptography extension availability on server side.", e);
} else {
return e;
10 years, 5 months
JBossWS SVN: r18797 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-07-11 11:18:35 -0400 (Fri, 11 Jul 2014)
New Revision: 18797
Modified:
stack/cxf/trunk/modules/testsuite/pom.xml
Log:
[JBWS-3811] Move to using required BouncyCastle 1.50 for tests
Modified: stack/cxf/trunk/modules/testsuite/pom.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/pom.xml 2014-07-11 13:54:46 UTC (rev 18796)
+++ stack/cxf/trunk/modules/testsuite/pom.xml 2014-07-11 15:18:35 UTC (rev 18797)
@@ -29,7 +29,7 @@
<org.littleshoot.littleproxy.version>1.0.0-beta2</org.littleshoot.littleproxy.version>
<org.slf4j.version>1.6.1</org.slf4j.version>
<gnu.getopt.version>1.0.13</gnu.getopt.version>
- <bc.version>1.46</bc.version>
+ <bc.version>1.50</bc.version>
<log4j.version>1.2.14</log4j.version>
<remote.port>4447</remote.port>
<remote.protocol>remote</remote.protocol>
@@ -112,7 +112,7 @@
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
- <artifactId>bcprov-jdk16</artifactId>
+ <artifactId>bcprov-jdk15on</artifactId>
<version>${bc.version}</version>
<scope>test</scope>
</dependency>
10 years, 5 months
JBossWS SVN: r18796 - stack/native/branches/jbossws-native-4.2.x/modules/core/src/main/java/org/jboss/ws/core/soap/attachment.
by jbossws-commits@lists.jboss.org
Author: rsearls
Date: 2014-07-11 09:54:46 -0400 (Fri, 11 Jul 2014)
New Revision: 18796
Modified:
stack/native/branches/jbossws-native-4.2.x/modules/core/src/main/java/org/jboss/ws/core/soap/attachment/AttachmentPartImpl.java
stack/native/branches/jbossws-native-4.2.x/modules/core/src/main/java/org/jboss/ws/core/soap/attachment/ContentHandlerRegistry.java
Log:
[bz-1104273] revision, address issue of multilple calls to AttachmentPartImpl
Modified: stack/native/branches/jbossws-native-4.2.x/modules/core/src/main/java/org/jboss/ws/core/soap/attachment/AttachmentPartImpl.java
===================================================================
--- stack/native/branches/jbossws-native-4.2.x/modules/core/src/main/java/org/jboss/ws/core/soap/attachment/AttachmentPartImpl.java 2014-07-11 11:03:48 UTC (rev 18795)
+++ stack/native/branches/jbossws-native-4.2.x/modules/core/src/main/java/org/jboss/ws/core/soap/attachment/AttachmentPartImpl.java 2014-07-11 13:54:46 UTC (rev 18796)
@@ -65,7 +65,9 @@
public AttachmentPartImpl()
{
// Load JAF content handlers
- ContentHandlerRegistry.register();
+ if (!ContentHandlerRegistry.isRegistered()) {
+ ContentHandlerRegistry.register();
+ }
}
public AttachmentPartImpl(DataHandler handler)
Modified: stack/native/branches/jbossws-native-4.2.x/modules/core/src/main/java/org/jboss/ws/core/soap/attachment/ContentHandlerRegistry.java
===================================================================
--- stack/native/branches/jbossws-native-4.2.x/modules/core/src/main/java/org/jboss/ws/core/soap/attachment/ContentHandlerRegistry.java 2014-07-11 11:03:48 UTC (rev 18795)
+++ stack/native/branches/jbossws-native-4.2.x/modules/core/src/main/java/org/jboss/ws/core/soap/attachment/ContentHandlerRegistry.java 2014-07-11 13:54:46 UTC (rev 18796)
@@ -58,7 +58,9 @@
addRegistryEntry(text_html.class);
addRegistryEntry(multipart_mixed.class);
}
-
+
+ private static boolean isRegistered = false; // bz-1104273 workaround
+
private static void addRegistryEntry(Class contentHandler)
{
handlerRegistry.add(contentHandler);
@@ -99,5 +101,11 @@
Iterator i = handlerRegistry.iterator();
while (i.hasNext())
registerContentHandler((Class) i.next());
- }
+ isRegistered = true;
+ }
+
+ public static boolean isRegistered()
+ {
+ return isRegistered;
+ }
}
10 years, 5 months
JBossWS SVN: r18795 - stack/cxf/trunk.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2014-07-11 07:03:48 -0400 (Fri, 11 Jul 2014)
New Revision: 18795
Modified:
stack/cxf/trunk/pom.xml
Log:
[JBWS-3811] Move to Apache CXF 3.0.1-SNAPSHOT
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2014-07-10 19:26:21 UTC (rev 18794)
+++ stack/cxf/trunk/pom.xml 2014-07-11 11:03:48 UTC (rev 18795)
@@ -71,7 +71,7 @@
<wildfly810.version>8.1.0.Final</wildfly810.version>
<wildfly900.version>9.0.0.Alpha1-SNAPSHOT</wildfly900.version>
<ejb.api.version>1.0.2.Final</ejb.api.version>
- <cxf.version>3.0.0</cxf.version>
+ <cxf.version>3.0.1-SNAPSHOT</cxf.version>
<cxf.asm.version>3.3.1</cxf.asm.version>
<cxf.xjcplugins.version>2.7.0</cxf.xjcplugins.version>
<jboss.common.core.version>2.2.17.GA</jboss.common.core.version>
@@ -94,15 +94,15 @@
<activation.version>1.1</activation.version>
<fastinfoset.version>1.2.12</fastinfoset.version>
<neethi.version>3.0.3</neethi.version>
- <opensaml.version>2.6.0</opensaml.version>
+ <opensaml.version>2.6.1</opensaml.version>
<saaj.api.version>1.0.3.Final</saaj.api.version>
<servlet.api.version>1.0.2.Final</servlet.api.version>
<stax.api.version>1.0-2</stax.api.version>
<jms.api.version>1.0.1.Final</jms.api.version>
<velocity.version>1.7</velocity.version>
<xerces.version>2.9.1</xerces.version>
- <xmlsec.version>2.0.0</xmlsec.version>
- <wss4j.version>2.0.0</wss4j.version>
+ <xmlsec.version>2.0.1</xmlsec.version>
+ <wss4j.version>2.0.1</wss4j.version>
<wstx.version>4.2.0</wstx.version>
<spring.version>3.2.8.RELEASE</spring.version>
<shrinkwrap.version>1.1.3</shrinkwrap.version>
10 years, 5 months