JBossWS SVN: r19559 - in spi/branches/management/src/main/java/org/jboss/wsf/spi: metadata/config and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2015-03-13 04:15:43 -0400 (Fri, 13 Mar 2015)
New Revision: 19559
Added:
spi/branches/management/src/main/java/org/jboss/wsf/spi/deployment/ManagementFilter.java
Modified:
spi/branches/management/src/main/java/org/jboss/wsf/spi/metadata/config/EndpointConfig.java
Log:
[JBWS-3881]:Add filter to forward request from url http://localhost:8080/context/endpoint/management?config to http://localhost:8080/context/endpoint?config
Added: spi/branches/management/src/main/java/org/jboss/wsf/spi/deployment/ManagementFilter.java
===================================================================
--- spi/branches/management/src/main/java/org/jboss/wsf/spi/deployment/ManagementFilter.java (rev 0)
+++ spi/branches/management/src/main/java/org/jboss/wsf/spi/deployment/ManagementFilter.java 2015-03-13 08:15:43 UTC (rev 19559)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2015, 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.spi.deployment;
+
+import java.io.IOException;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * Filter to forward endpoint management request to cxf endpoint interceptor
+ * @author @author <a href="mailto:ema@redhat.com>Jim Ma</a>
+ *
+ */
+public class ManagementFilter implements Filter {
+ private String pattern;
+
+ @Override
+ public void init(FilterConfig filterConfig) throws ServletException {
+ pattern = filterConfig.getInitParameter("httpURLPattern");
+ }
+
+ @Override
+ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
+ ServletException {
+ HttpServletRequest req = (HttpServletRequest) request;
+ if ("PUT".equals(req.getMethod()) || "GET".equals(req.getMethod())) {
+ String query = req.getQueryString();
+ if (query != null && !"wsdl".equals(query)) {
+ String forwardPath = pattern.endsWith("/*") ? pattern.substring(0, pattern.length()-2) : pattern;
+ req.getRequestDispatcher(forwardPath + "?" + query).forward(request, response);
+ }
+ } else {
+ chain.doFilter(request, response);
+ }
+
+ }
+ @Override
+ public void destroy() {
+
+ }
+
+}
Property changes on: spi/branches/management/src/main/java/org/jboss/wsf/spi/deployment/ManagementFilter.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Modified: spi/branches/management/src/main/java/org/jboss/wsf/spi/metadata/config/EndpointConfig.java
===================================================================
--- spi/branches/management/src/main/java/org/jboss/wsf/spi/metadata/config/EndpointConfig.java 2015-03-13 08:11:47 UTC (rev 19558)
+++ spi/branches/management/src/main/java/org/jboss/wsf/spi/metadata/config/EndpointConfig.java 2015-03-13 08:15:43 UTC (rev 19559)
@@ -36,7 +36,6 @@
{
public static final String STANDARD_ENDPOINT_CONFIG = "Standard-Endpoint-Config";
public static final String DEFAULT_ENDPOINT_CONFIG_FILE = "jaxws-endpoint-config.xml";
- public static final String STATISTICS_ENABLED = "statistics-enabled";
public EndpointConfig(String configName, List<UnifiedHandlerChainMetaData> preHandlerChains,
List<UnifiedHandlerChainMetaData> postHandlerChains, Map<String, String> properties,
9 years, 10 months
JBossWS SVN: r19558 - common/branches/management/src/main/java/org/jboss/ws/common/deployment.
by jbossws-commits@lists.jboss.org
Author: jim.ma
Date: 2015-03-13 04:11:47 -0400 (Fri, 13 Mar 2015)
New Revision: 19558
Modified:
common/branches/management/src/main/java/org/jboss/ws/common/deployment/AbstractDefaultEndpoint.java
Log:
[JBWS-3880]:Add NPE guard
Modified: common/branches/management/src/main/java/org/jboss/ws/common/deployment/AbstractDefaultEndpoint.java
===================================================================
--- common/branches/management/src/main/java/org/jboss/ws/common/deployment/AbstractDefaultEndpoint.java 2015-03-12 14:06:19 UTC (rev 19557)
+++ common/branches/management/src/main/java/org/jboss/ws/common/deployment/AbstractDefaultEndpoint.java 2015-03-13 08:11:47 UTC (rev 19558)
@@ -320,7 +320,10 @@
public void setSecurityDomainContext(SecurityDomainContext securityDomainContext)
{
this.securityDomainContext = securityDomainContext;
- this.configsMap.put(Endpoint.SECURITY_DOMAIN, securityDomainContext.getSecurityDomain());
+ if (securityDomainContext != null)
+ {
+ this.configsMap.put(Endpoint.SECURITY_DOMAIN, securityDomainContext.getSecurityDomain());
+ }
}
public InstanceProvider getInstanceProvider()
9 years, 10 months
JBossWS SVN: r19557 - in stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss: wsf/test and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2015-03-12 10:06:19 -0400 (Thu, 12 Mar 2015)
New Revision: 19557
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3713/ClientServlet.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3713/ClientServletUsignThreadLocal.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/wsf/test/TestServlet.java
Log:
Fix a bunch of failures with IPv6
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3713/ClientServlet.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3713/ClientServlet.java 2015-03-12 11:37:00 UTC (rev 19556)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3713/ClientServlet.java 2015-03-12 14:06:19 UTC (rev 19557)
@@ -24,6 +24,9 @@
import java.io.IOException;
import java.io.PrintWriter;
import java.net.URL;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
@@ -35,6 +38,19 @@
public class ClientServlet extends HttpServlet
{
private static final long serialVersionUID = 1L;
+ private static final Pattern VALID_IPV6_PATTERN;
+ private static final String ipv6Pattern = "^([\\dA-F]{1,4}:|((?=.*(::))(?!.*\\3.+\\3))\\3?)([\\dA-F]{1,4}(\\3|:\\b)|\\2){5}(([\\dA-F]{1,4}(\\3|:\\b|$)|\\2){2}|(((2[0-4]|1\\d|[1-9])?\\d|25[0-5])\\.?\\b){4})\\z";
+ static
+ {
+ try
+ {
+ VALID_IPV6_PATTERN = Pattern.compile(ipv6Pattern, Pattern.CASE_INSENSITIVE);
+ }
+ catch (PatternSyntaxException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
@@ -53,8 +69,24 @@
throw new ServletException("calls not specified!");
PrintWriter w = res.getWriter();
- final URL wsdlURL = new URL("http://" + req.getLocalAddr() + ":" + req.getLocalPort() + path + "?wsdl");
+ final URL wsdlURL = new URL("http://" + toIPv6URLFormat(req.getLocalAddr()) + ":" + req.getLocalPort() + path + "?wsdl");
Helper helper = new Helper();
w.write(helper.run(wsdlURL, strategy, Integer.parseInt(threads), Integer.parseInt(calls)).toString());
}
+
+ private String toIPv6URLFormat(final String host)
+ {
+ boolean isIPv6URLFormatted = false;
+ //strip out IPv6 URL formatting if already provided...
+ if (host.startsWith("[") && host.endsWith("]")) {
+ isIPv6URLFormatted = true;
+ }
+ //return IPv6 URL formatted address
+ if (isIPv6URLFormatted) {
+ return host;
+ } else {
+ Matcher m = VALID_IPV6_PATTERN.matcher(host);
+ return m.matches() ? "[" + host + "]" : host;
+ }
+ }
}
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3713/ClientServletUsignThreadLocal.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3713/ClientServletUsignThreadLocal.java 2015-03-12 11:37:00 UTC (rev 19556)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3713/ClientServletUsignThreadLocal.java 2015-03-12 14:06:19 UTC (rev 19557)
@@ -24,6 +24,9 @@
import java.io.IOException;
import java.io.PrintWriter;
import java.net.URL;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
@@ -35,6 +38,19 @@
public class ClientServletUsignThreadLocal extends HttpServlet
{
private static final long serialVersionUID = 1L;
+ private static final Pattern VALID_IPV6_PATTERN;
+ private static final String ipv6Pattern = "^([\\dA-F]{1,4}:|((?=.*(::))(?!.*\\3.+\\3))\\3?)([\\dA-F]{1,4}(\\3|:\\b)|\\2){5}(([\\dA-F]{1,4}(\\3|:\\b|$)|\\2){2}|(((2[0-4]|1\\d|[1-9])?\\d|25[0-5])\\.?\\b){4})\\z";
+ static
+ {
+ try
+ {
+ VALID_IPV6_PATTERN = Pattern.compile(ipv6Pattern, Pattern.CASE_INSENSITIVE);
+ }
+ catch (PatternSyntaxException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
@@ -53,8 +69,24 @@
throw new ServletException("calls not specified!");
PrintWriter w = res.getWriter();
- final URL wsdlURL = new URL("http://" + req.getLocalAddr() + ":" + req.getLocalPort() + path + "?wsdl");
+ final URL wsdlURL = new URL("http://" + toIPv6URLFormat(req.getLocalAddr()) + ":" + req.getLocalPort() + path + "?wsdl");
HelperUsignThreadLocal helper = new HelperUsignThreadLocal();
w.write(helper.run(wsdlURL, strategy, Integer.parseInt(threads), Integer.parseInt(calls)).toString());
}
+
+ private String toIPv6URLFormat(final String host)
+ {
+ boolean isIPv6URLFormatted = false;
+ //strip out IPv6 URL formatting if already provided...
+ if (host.startsWith("[") && host.endsWith("]")) {
+ isIPv6URLFormatted = true;
+ }
+ //return IPv6 URL formatted address
+ if (isIPv6URLFormatted) {
+ return host;
+ } else {
+ Matcher m = VALID_IPV6_PATTERN.matcher(host);
+ return m.matches() ? "[" + host + "]" : host;
+ }
+ }
}
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/wsf/test/TestServlet.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/wsf/test/TestServlet.java 2015-03-12 11:37:00 UTC (rev 19556)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/wsf/test/TestServlet.java 2015-03-12 14:06:19 UTC (rev 19557)
@@ -74,7 +74,7 @@
try
{
ClientHelper helper = (ClientHelper) Class.forName(helperClassName).newInstance();
- helper.setTargetEndpoint("http://" + req.getLocalAddr() + ":" + req.getLocalPort() + path);
+ helper.setTargetEndpoint("http://" + toIPv6URLFormat(req.getLocalAddr()) + ":" + req.getLocalPort() + path);
List<String> failedTests = new LinkedList<String>();
List<String> errorTests = new LinkedList<String>();
Method[] methods = helper.getClass().getMethods();
9 years, 10 months
JBossWS SVN: r19556 - in stack/cxf/trunk/modules/testsuite/cxf-tests/src/test: java/org/jboss/test/ws/jaxws/cxf/jbws3879 and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2015-03-12 07:37:00 -0400 (Thu, 12 Mar 2015)
New Revision: 19556
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3879/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3879/GZIPEnforcingInInterceptor.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3879/HelloWorld.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3879/HelloWorldImpl.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3879/Helper.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3879/JBWS3879TestCase.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3879/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3879/WEB-INF/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3879/WEB-INF/jaxws-client-config.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3879/WEB-INF/jaxws-endpoint-config.xml
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3879/WEB-INF/web.xml
Log:
[JBWS-3879] Adding testcase
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3879/GZIPEnforcingInInterceptor.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3879/GZIPEnforcingInInterceptor.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3879/GZIPEnforcingInInterceptor.java 2015-03-12 11:37:00 UTC (rev 19556)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.jbws3879;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.cxf.helpers.CastUtils;
+import org.apache.cxf.helpers.HttpHeaderHelper;
+import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.transport.common.gzip.GZIPInInterceptor;
+
+public class GZIPEnforcingInInterceptor extends GZIPInInterceptor
+{
+ private String par = null;
+
+ public String getPar()
+ {
+ return par;
+ }
+
+ public void setPar(String par)
+ {
+ this.par = par;
+ }
+
+ @Override
+ public void handleMessage(Message message) throws Fault
+ {
+ if (par == null) {
+ throw new IllegalStateException();
+ }
+
+ Map<String, List<String>> protocolHeaders = CastUtils.cast((Map<?, ?>) message.get(Message.PROTOCOL_HEADERS));
+ if (protocolHeaders != null)
+ {
+ List<String> contentEncoding = HttpHeaderHelper.getHeader(protocolHeaders,
+ HttpHeaderHelper.CONTENT_ENCODING);
+ if (contentEncoding != null && (contentEncoding.contains("gzip") || contentEncoding.contains("x-gzip")))
+ {
+ super.handleMessage(message);
+ return;
+ }
+ }
+ throw new RuntimeException("Content-Encoding gzip not found!");
+ }
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3879/GZIPEnforcingInInterceptor.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3879/HelloWorld.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3879/HelloWorld.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3879/HelloWorld.java 2015-03-12 11:37:00 UTC (rev 19556)
@@ -0,0 +1,30 @@
+/*
+ * 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.cxf.jbws3879;
+
+import javax.jws.WebService;
+
+@WebService(targetNamespace = "http://org.jboss.ws/jaxws/cxf/jbws3879")
+public interface HelloWorld
+{
+ String echo(String input);
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3879/HelloWorld.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3879/HelloWorldImpl.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3879/HelloWorldImpl.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3879/HelloWorldImpl.java 2015-03-12 11:37:00 UTC (rev 19556)
@@ -0,0 +1,38 @@
+/*
+ * 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.cxf.jbws3879;
+
+import javax.jws.WebService;
+
+@WebService
+(
+ serviceName = "HelloWorldService",
+ endpointInterface = "org.jboss.test.ws.jaxws.cxf.jbws3879.HelloWorld",
+ targetNamespace = "http://org.jboss.ws/jaxws/cxf/jbws3879"
+)
+public class HelloWorldImpl implements HelloWorld
+{
+ public String echo(String input)
+ {
+ return input;
+ }
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3879/HelloWorldImpl.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3879/Helper.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3879/Helper.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3879/Helper.java 2015-03-12 11:37:00 UTC (rev 19556)
@@ -0,0 +1,137 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, 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.jbws3879;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceFeature;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.endpoint.Client;
+import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.transport.common.gzip.GZIPFeature;
+import org.apache.cxf.transport.http.HTTPConduit;
+import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
+import org.jboss.ws.api.configuration.ClientConfigUtil;
+import org.jboss.ws.api.configuration.ClientConfigurer;
+import org.jboss.wsf.stack.cxf.client.UseThreadBusFeature;
+import org.jboss.wsf.test.ClientHelper;
+
+public class Helper implements ClientHelper
+{
+ private String gzipFeatureEndpointURL;
+
+ public Helper()
+ {
+
+ }
+
+ public Helper(String endpointURL)
+ {
+ setTargetEndpoint(endpointURL);
+ }
+
+ public boolean testGZIPUsingFeatureOnClient() throws Exception
+ {
+ Bus bus = BusFactory.newInstance().createBus();
+ try
+ {
+ BusFactory.setThreadDefaultBus(bus);
+
+ HelloWorld port = getPort();
+
+ ClientConfigurer configurer = ClientConfigUtil.resolveClientConfigurer();
+ configurer.setConfigProperties(port, "jaxws-client-config.xml", "Feature Client Config");
+
+ return "foo".equals(port.echo("foo"));
+ }
+ finally
+ {
+ bus.shutdown(true);
+ }
+ }
+
+ public boolean testGZIPServerSideOnlyInterceptorOnClient() throws Exception
+ {
+ Bus bus = BusFactory.newInstance().createBus();
+ try
+ {
+ BusFactory.setThreadDefaultBus(bus);
+
+ HelloWorld port = getPort();
+ Client client = ClientProxy.getClient(port);
+ HTTPConduit conduit = (HTTPConduit)client.getConduit();
+ HTTPClientPolicy policy = conduit.getClient();
+ //enable Accept gzip, otherwise the server will not try to reply using gzip
+ policy.setAcceptEncoding("gzip;q=1.0, identity; q=0.5, *;q=0");
+ //add interceptor for decoding gzip message
+
+ ClientConfigurer configurer = ClientConfigUtil.resolveClientConfigurer();
+ configurer.setConfigProperties(port, "jaxws-client-config.xml", "Interceptor Client Config");
+
+ return ("foo".equals(port.echo("foo")));
+ }
+ finally
+ {
+ bus.shutdown(true);
+ }
+ }
+
+ public boolean testFailureGZIPServerSideOnlyInterceptorOnClient() throws Exception
+ {
+ HelloWorld port = getPort();
+ Client client = ClientProxy.getClient(port);
+ HTTPConduit conduit = (HTTPConduit)client.getConduit();
+ HTTPClientPolicy policy = conduit.getClient();
+ //enable Accept gzip, otherwise the server will not try to reply using gzip
+ policy.setAcceptEncoding("gzip;q=1.0, identity; q=0.5, *;q=0");
+ try
+ {
+ port.echo("foo");
+ return false;
+ }
+ catch (Exception e)
+ {
+ //expected exception, as the client is not able to decode gzip message
+ return true;
+ }
+ }
+
+ private HelloWorld getPort(WebServiceFeature... features) throws MalformedURLException
+ {
+ URL wsdlURL = new URL(gzipFeatureEndpointURL + "?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/jaxws/cxf/jbws3879", "HelloWorldService");
+ Service service = Service.create(wsdlURL, serviceName, new UseThreadBusFeature());
+ QName portQName = new QName("http://org.jboss.ws/jaxws/cxf/jbws3879", "HelloWorldImplPort");
+ return (HelloWorld) service.getPort(portQName, HelloWorld.class, features);
+ }
+
+ @Override
+ public void setTargetEndpoint(String address)
+ {
+ this.gzipFeatureEndpointURL = address;
+ }
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3879/Helper.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3879/JBWS3879TestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3879/JBWS3879TestCase.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3879/JBWS3879TestCase.java 2015-03-12 11:37:00 UTC (rev 19556)
@@ -0,0 +1,113 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2015, 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.jbws3879;
+
+import java.io.File;
+import java.net.URL;
+
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.OperateOnDeployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.asset.FileAsset;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.jboss.ws.common.IOUtils;
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestHelper;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 12-Mar-2015
+ *
+ */
+(a)RunWith(Arquillian.class)
+public class JBWS3879TestCase extends JBossWSTest
+{
+ private static final String DEP = "jaxws-cxf-jbws3879";
+ private static final String CLIENT_DEP = "jaxws-cxf-jbws3879-client";
+
+ @ArquillianResource
+ private URL baseURL;
+
+ @Deployment(name = DEP, testable = false)
+ public static WebArchive createDeployment() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class, DEP + ".war");
+ archive.setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ + "Dependencies: org.apache.cxf\n"))
+ .addClass(org.jboss.test.ws.jaxws.cxf.jbws3879.HelloWorld.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.jbws3879.HelloWorldImpl.class)
+ .add(new FileAsset(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/cxf/jbws3879/WEB-INF/jaxws-endpoint-config.xml")), "jaxws-endpoint-config.xml")
+ .setWebXML(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/cxf/jbws3879/WEB-INF/web.xml"));
+ return archive;
+ }
+
+ @Deployment(name = CLIENT_DEP, testable = false)
+ public static WebArchive createClientDeployment() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class, CLIENT_DEP + ".war");
+ archive.setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ + "Dependencies: org.jboss.ws.cxf.jbossws-cxf-client services,org.apache.cxf.impl\n"))
+ .addClass(org.jboss.test.ws.jaxws.cxf.jbws3879.GZIPEnforcingInInterceptor.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.jbws3879.HelloWorld.class)
+ .addClass(org.jboss.test.ws.jaxws.cxf.jbws3879.Helper.class)
+ .addAsResource(new FileAsset(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/cxf/jbws3879/WEB-INF/jaxws-client-config.xml")), "jaxws-client-config.xml")
+ .addClass(org.jboss.wsf.test.ClientHelper.class)
+ .addClass(org.jboss.wsf.test.TestServlet.class);
+ return archive;
+ }
+
+ @Test
+ @RunAsClient
+ @OperateOnDeployment(CLIENT_DEP)
+ public void testInContainerGZIPUsingFeatureOnClient() throws Exception
+ {
+ assertEquals("1", runTestInContainer("testGZIPUsingFeatureOnClient"));
+ }
+
+ @Test
+ @RunAsClient
+ @OperateOnDeployment(CLIENT_DEP)
+ public void testInContainerGZIPServerSideOnlyInterceptorOnClient() throws Exception
+ {
+ assertEquals("1", runTestInContainer("testGZIPServerSideOnlyInterceptorOnClient"));
+ }
+
+ @Test
+ @RunAsClient
+ @OperateOnDeployment(CLIENT_DEP)
+ public void testInContainerFailureGZIPServerSideOnlyInterceptorOnClient() throws Exception
+ {
+ assertEquals("1", runTestInContainer("testFailureGZIPServerSideOnlyInterceptorOnClient"));
+ }
+
+ private String runTestInContainer(String test) throws Exception
+ {
+ URL url = new URL(baseURL + "?path=/jaxws-cxf-jbws3879/HelloWorldService/HelloWorldImpl&method=" + test
+ + "&helper=" + Helper.class.getName());
+ return IOUtils.readAndCloseStream(url.openStream());
+ }
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/jbws3879/JBWS3879TestCase.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3879/WEB-INF/jaxws-client-config.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3879/WEB-INF/jaxws-client-config.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3879/WEB-INF/jaxws-client-config.xml 2015-03-12 11:37:00 UTC (rev 19556)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jaxws-config xmlns="urn:jboss:jbossws-jaxws-config:4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+ xsi:schemaLocation="urn:jboss:jbossws-jaxws-config:4.0 schema/jbossws-jaxws-config_4_0.xsd">
+
+ <client-config>
+ <config-name>Feature Client Config</config-name>
+ <property>
+ <property-name>cxf.features</property-name>
+ <property-value>##gzipFeature</property-value>
+ </property>
+ <property>
+ <property-name>##gzipFeature</property-name>
+ <property-value>org.apache.cxf.transport.common.gzip.GZIPFeature</property-value>
+ </property>
+ <property>
+ <property-name>##gzipFeature.threshold</property-name>
+ <property-value>0</property-value>
+ </property>
+ </client-config>
+
+ <client-config>
+ <config-name>Interceptor Client Config</config-name>
+ <property>
+ <property-name>cxf.interceptors.in</property-name>
+ <property-value>##gzipEnfInt</property-value>
+ </property>
+ <property>
+ <property-name>##gzipEnfInt</property-name>
+ <property-value>org.jboss.test.ws.jaxws.cxf.jbws3879.GZIPEnforcingInInterceptor</property-value>
+ </property>
+ <property>
+ <property-name>##gzipEnfInt.par</property-name>
+ <property-value>foo</property-value>
+ </property>
+ </client-config>
+
+</jaxws-config>
\ No newline at end of file
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3879/WEB-INF/jaxws-client-config.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3879/WEB-INF/jaxws-endpoint-config.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3879/WEB-INF/jaxws-endpoint-config.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3879/WEB-INF/jaxws-endpoint-config.xml 2015-03-12 11:37:00 UTC (rev 19556)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jaxws-config xmlns="urn:jboss:jbossws-jaxws-config:4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+ xsi:schemaLocation="urn:jboss:jbossws-jaxws-config:4.0 schema/jbossws-jaxws-config_4_0.xsd">
+
+ <endpoint-config>
+ <config-name>org.jboss.test.ws.jaxws.cxf.jbws3879.HelloWorldImpl</config-name>
+ <property>
+ <property-name>cxf.features</property-name>
+ <property-value>##gzipFeature</property-value>
+ </property>
+ <property>
+ <property-name>##gzipFeature</property-name>
+ <property-value>org.apache.cxf.transport.common.gzip.GZIPFeature</property-value>
+ </property>
+ <property>
+ <property-name>##gzipFeature.threshold</property-name>
+ <property-value>0</property-value>
+ </property>
+ </endpoint-config>
+
+</jaxws-config>
\ No newline at end of file
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3879/WEB-INF/jaxws-endpoint-config.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3879/WEB-INF/web.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3879/WEB-INF/web.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3879/WEB-INF/web.xml 2015-03-12 11:37:00 UTC (rev 19556)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd">
+
+ <servlet>
+ <servlet-name>TestServlet</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.cxf.jbws3879.HelloWorldImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>TestServlet</servlet-name>
+ <url-pattern>/HelloWorldService/HelloWorldImpl</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/jbws3879/WEB-INF/web.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
9 years, 10 months
JBossWS SVN: r19555 - in stack/cxf/trunk/modules: resources/src/main/resources/modules/wildfly800/org/jboss/ws/jaxws-client/main and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2015-03-12 07:36:20 -0400 (Thu, 12 Mar 2015)
New Revision: 19555
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/FeatureUtils.java
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/InterceptorUtils.java
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/jaxws-client/main/module.xml
stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly900/org/jboss/ws/jaxws-client/main/module.xml
Log:
[JBWS-3879] Use MapToBeanConverter for both features and interceptors
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/FeatureUtils.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/FeatureUtils.java 2015-03-12 08:17:52 UTC (rev 19554)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/FeatureUtils.java 2015-03-12 11:36:20 UTC (rev 19555)
@@ -29,8 +29,6 @@
import org.apache.cxf.Bus;
import org.apache.cxf.feature.Feature;
import org.apache.cxf.interceptor.InterceptorProvider;
-import org.jboss.ws.common.utils.DelegateClassLoader;
-import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
import org.jboss.wsf.stack.cxf.client.Constants;
/**
@@ -45,18 +43,19 @@
public static void addFeatures(InterceptorProvider interceptorProvider, Bus bus, Map<String, String> properties) {
final String features = properties.get(Constants.CXF_FEATURES_PROP);
if (features != null) {
- for (Feature f : createFeatures(features)) {
+ MapToBeanConverter converter = new MapToBeanConverter(properties);
+ for (Feature f : createFeatures(features, converter)) {
f.initialize(interceptorProvider, bus);
}
}
}
- private static List<Feature> createFeatures(String propValue) {
+ private static List<Feature> createFeatures(String propValue, MapToBeanConverter converter) {
List<Feature> list = new ArrayList<Feature>();
- StringTokenizer st = new StringTokenizer(propValue, ", ", false );
+ StringTokenizer st = new StringTokenizer(propValue, ", ", false);
+
while (st.hasMoreTokens()) {
- String itc = st.nextToken();
- Feature feature = (Feature)newInstance(itc);
+ Feature feature = (Feature)newInstance(st.nextToken(), converter);
if (feature != null) {
list.add(feature);
}
@@ -64,14 +63,11 @@
return list;
}
- private static Object newInstance(String className)
+ private static Object newInstance(String className, MapToBeanConverter converter)
{
try
{
- ClassLoader loader = new DelegateClassLoader(ClassLoaderProvider.getDefaultProvider()
- .getServerIntegrationClassLoader(), SecurityActions.getContextClassLoader());
- Class<?> clazz = SecurityActions.loadClass(loader, className);
- return clazz.newInstance();
+ return className.startsWith(MapToBeanConverter.BEAN_ID_PREFIX) ? converter.get(className) : converter.newInstance(className);
}
catch (Exception e)
{
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/InterceptorUtils.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/InterceptorUtils.java 2015-03-12 08:17:52 UTC (rev 19554)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/InterceptorUtils.java 2015-03-12 11:36:20 UTC (rev 19555)
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source.
- * Copyright 2014, Red Hat Middleware LLC, and individual contributors
+ * Copyright 2015, 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.
*
@@ -30,8 +30,6 @@
import org.apache.cxf.interceptor.Interceptor;
import org.apache.cxf.interceptor.InterceptorProvider;
-import org.jboss.ws.common.utils.DelegateClassLoader;
-import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
import org.jboss.wsf.stack.cxf.client.Constants;
/**
@@ -44,13 +42,20 @@
public class InterceptorUtils
{
public static void addInterceptors(InterceptorProvider interceptorProvider, Map<String, String> properties) {
+ MapToBeanConverter converter = null;
final String inInterceptors = properties.get(Constants.CXF_IN_INTERCEPTORS_PROP);
if (inInterceptors != null) {
- interceptorProvider.getInInterceptors().addAll(createInterceptors(inInterceptors));
+ if (converter == null) {
+ converter = new MapToBeanConverter(properties);
+ }
+ interceptorProvider.getInInterceptors().addAll(createInterceptors(inInterceptors, converter));
}
final String outInterceptors = properties.get(Constants.CXF_OUT_INTERCEPTORS_PROP);
if (outInterceptors != null) {
- interceptorProvider.getOutInterceptors().addAll(createInterceptors(outInterceptors));
+ if (converter == null) {
+ converter = new MapToBeanConverter(properties);
+ }
+ interceptorProvider.getOutInterceptors().addAll(createInterceptors(outInterceptors, converter));
}
}
@@ -69,12 +74,11 @@
interceptorsList.removeAll(toBeRemoved);
}
- private static List<Interceptor<?>> createInterceptors(String propValue) {
+ private static List<Interceptor<?>> createInterceptors(String propValue, MapToBeanConverter converter) {
List<Interceptor<?>> list = new ArrayList<Interceptor<?>>();
StringTokenizer st = new StringTokenizer(propValue, ", ", false );
while (st.hasMoreTokens()) {
- String itc = st.nextToken();
- Interceptor<?> interceptor = (Interceptor<?>)newInstance(itc);
+ Interceptor<?> interceptor = (Interceptor<?>)newInstance(st.nextToken(), converter);
if (interceptor != null) {
list.add(interceptor);
}
@@ -82,14 +86,11 @@
return list;
}
- private static Object newInstance(String className)
+ private static Object newInstance(String className, MapToBeanConverter converter)
{
try
{
- ClassLoader loader = new DelegateClassLoader(ClassLoaderProvider.getDefaultProvider()
- .getServerIntegrationClassLoader(), SecurityActions.getContextClassLoader());
- Class<?> clazz = SecurityActions.loadClass(loader, className);
- return clazz.newInstance();
+ return className.startsWith(MapToBeanConverter.BEAN_ID_PREFIX) ? converter.get(className) : converter.newInstance(className);
}
catch (Exception e)
{
Modified: stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/jaxws-client/main/module.xml
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/jaxws-client/main/module.xml 2015-03-12 08:17:52 UTC (rev 19554)
+++ stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly800/org/jboss/ws/jaxws-client/main/module.xml 2015-03-12 11:36:20 UTC (rev 19555)
@@ -67,6 +67,7 @@
<module name="org.apache.ws.security" />
<module name="org.jboss.logging" />
<module name="org.picketbox"/>
+ <module name="org.apache.commons.beanutils"/>
<module name="org.springframework.spring" optional="true">
<imports>
<include path="META-INF"/>
Modified: stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly900/org/jboss/ws/jaxws-client/main/module.xml
===================================================================
--- stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly900/org/jboss/ws/jaxws-client/main/module.xml 2015-03-12 08:17:52 UTC (rev 19554)
+++ stack/cxf/trunk/modules/resources/src/main/resources/modules/wildfly900/org/jboss/ws/jaxws-client/main/module.xml 2015-03-12 11:36:20 UTC (rev 19555)
@@ -67,6 +67,7 @@
<module name="org.apache.ws.security" />
<module name="org.jboss.logging" />
<module name="org.picketbox"/>
+ <module name="org.apache.commons.beanutils"/>
<module name="org.springframework.spring" optional="true">
<imports>
<include path="META-INF"/>
9 years, 10 months
JBossWS SVN: r19554 - stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/gzip.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2015-03-12 04:17:52 -0400 (Thu, 12 Mar 2015)
New Revision: 19554
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/gzip/Helper.java
Log:
Test using feature both the CXF and JAX-WS way...
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/gzip/Helper.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/gzip/Helper.java 2015-03-11 22:21:55 UTC (rev 19553)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/gzip/Helper.java 2015-03-12 08:17:52 UTC (rev 19554)
@@ -26,6 +26,7 @@
import javax.xml.namespace.QName;
import javax.xml.ws.Service;
+import javax.xml.ws.WebServiceFeature;
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
@@ -77,6 +78,7 @@
Bus bus = BusFactory.newInstance().createBus();
try
{
+ //CXF way
BusFactory.setThreadDefaultBus(bus);
HelloWorld port = getPort();
@@ -84,12 +86,32 @@
GZIPFeature gzipFeature = new GZIPFeature();
gzipFeature.setThreshold(0);
gzipFeature.initialize(client, null); //bus parameter not actually used
- return ("foo".equals(port.echo("foo")));
+ if(!"foo".equals(port.echo("foo"))) {
+ return false;
+ }
}
finally
{
bus.shutdown(true);
}
+ bus = BusFactory.newInstance().createBus();
+ try
+ {
+ //JAX-WS way
+ BusFactory.setThreadDefaultBus(bus);
+
+ GZIPFeature gzipFeature = new GZIPFeature();
+ gzipFeature.setThreshold(0);
+ HelloWorld port = getPort(gzipFeature);
+ if(!"foo".equals(port.echo("foo"))) {
+ return false;
+ }
+ }
+ finally
+ {
+ bus.shutdown(true);
+ }
+ return true;
}
public boolean testGZIPServerSideOnlyInterceptorOnClient() throws Exception
@@ -184,13 +206,13 @@
}
}
- private HelloWorld getPort() throws MalformedURLException
+ private HelloWorld getPort(WebServiceFeature... features) throws MalformedURLException
{
URL wsdlURL = new URL(gzipFeatureEndpointURL + "?wsdl");
QName serviceName = new QName("http://org.jboss.ws/jaxws/cxf/gzip", "HelloWorldService");
Service service = Service.create(wsdlURL, serviceName, new UseThreadBusFeature());
QName portQName = new QName("http://org.jboss.ws/jaxws/cxf/gzip", "HelloWorldImplPort");
- return (HelloWorld) service.getPort(portQName, HelloWorld.class);
+ return (HelloWorld) service.getPort(portQName, HelloWorld.class, features);
}
@Override
9 years, 10 months
JBossWS SVN: r19553 - in stack/cxf/trunk/modules/testsuite/cxf-tests/src/test: resources/jaxws/samples/wsrm and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2015-03-11 18:21:55 -0400 (Wed, 11 Mar 2015)
New Revision: 19553
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/client/CustomRMFeature.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsrm/META-INF/
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsrm/META-INF/jaxws-client-config.xml
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/client/WSReliableMessagingWithAPITestCase.java
Log:
[JBWS-3875] Adding example on using a custom properties to set a custom feature extending and configuring a CXF one
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/client/CustomRMFeature.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/client/CustomRMFeature.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/client/CustomRMFeature.java 2015-03-11 22:21:55 UTC (rev 19553)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2015, 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.samples.wsrm.client;
+
+import org.apache.cxf.ws.rm.feature.RMFeature;
+import org.apache.cxf.ws.rm.manager.AcksPolicyType;
+import org.apache.cxf.ws.rm.manager.DestinationPolicyType;
+import org.apache.cxf.ws.rmp.v200502.RMAssertion;
+import org.apache.cxf.ws.rmp.v200502.RMAssertion.AcknowledgementInterval;
+
+/**
+ * A custom version of RMFeature that
+ * sets a bunch of RM options
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 11-Mar-2015
+ */
+public class CustomRMFeature extends RMFeature
+{
+ public CustomRMFeature() {
+ super();
+ RMAssertion rma = new RMAssertion();
+ RMAssertion.BaseRetransmissionInterval bri = new RMAssertion.BaseRetransmissionInterval();
+ bri.setMilliseconds(4000L);
+ rma.setBaseRetransmissionInterval(bri);
+ AcknowledgementInterval ai = new AcknowledgementInterval();
+ ai.setMilliseconds(2000L);
+ rma.setAcknowledgementInterval(ai);
+ super.setRMAssertion(rma);
+ DestinationPolicyType dp = new DestinationPolicyType();
+ AcksPolicyType ap = new AcksPolicyType();
+ ap.setIntraMessageThreshold(0);
+ dp.setAcksPolicy(ap);
+ super.setDestinationPolicy(dp);
+ }
+}
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/client/CustomRMFeature.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/client/WSReliableMessagingWithAPITestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/client/WSReliableMessagingWithAPITestCase.java 2015-03-11 21:43:27 UTC (rev 19552)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/client/WSReliableMessagingWithAPITestCase.java 2015-03-11 22:21:55 UTC (rev 19553)
@@ -30,6 +30,11 @@
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
+import org.apache.cxf.ws.rm.feature.RMFeature;
+import org.apache.cxf.ws.rm.manager.AcksPolicyType;
+import org.apache.cxf.ws.rm.manager.DestinationPolicyType;
+import org.apache.cxf.ws.rmp.v200502.RMAssertion;
+import org.apache.cxf.ws.rmp.v200502.RMAssertion.AcknowledgementInterval;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.container.test.api.RunAsClient;
import org.jboss.arquillian.junit.Arquillian;
@@ -38,8 +43,11 @@
import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.jboss.test.ws.jaxws.samples.wsrm.generated.SimpleService;
+import org.jboss.ws.api.configuration.ClientConfigUtil;
+import org.jboss.ws.api.configuration.ClientConfigurer;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestHelper;
+import org.jboss.wsf.test.WrapThreadContextClassLoader;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -72,6 +80,17 @@
return archive;
}
+ @Override
+ protected String getClientJarPaths() {
+ return JBossWSTestHelper.writeToFile(new JBossWSTestHelper.JarDeployment("jjaxws-samples-wsrm-api-client.jar") { {
+ archive
+ .addManifest()
+ .addClass(org.jboss.test.ws.jaxws.samples.wsrm.client.CustomRMFeature.class)
+ .addAsManifestResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/samples/wsrm/META-INF/jaxws-client-config.xml"), "jaxws-client-config.xml");
+ }
+ });
+ }
+
@Test
@RunAsClient
public void test() throws Exception
@@ -92,4 +111,65 @@
}
}
+ @Test
+ @RunAsClient
+ public void testWithFeature() throws Exception
+ {
+ final Bus bus = BusFactory.newInstance().createBus();
+ BusFactory.setThreadDefaultBus(bus);
+ try {
+ QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wsrm", "SimpleService");
+ URL wsdlURL = getResourceURL("jaxws/samples/wsrm/WEB-INF/wsdl/SimpleService.wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+
+ RMFeature feature = new RMFeature();
+ RMAssertion rma = new RMAssertion();
+ RMAssertion.BaseRetransmissionInterval bri = new RMAssertion.BaseRetransmissionInterval();
+ bri.setMilliseconds(4000L);
+ rma.setBaseRetransmissionInterval(bri);
+ AcknowledgementInterval ai = new AcknowledgementInterval();
+ ai.setMilliseconds(2000L);
+ rma.setAcknowledgementInterval(ai);
+ feature.setRMAssertion(rma);
+ DestinationPolicyType dp = new DestinationPolicyType();
+ AcksPolicyType ap = new AcksPolicyType();
+ ap.setIntraMessageThreshold(0);
+ dp.setAcksPolicy(ap);
+ feature.setDestinationPolicy(dp);
+
+ SimpleService proxy = (SimpleService)service.getPort(SimpleService.class, feature);
+ ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, baseURL + "/jaxws-samples-wsrm-api/SimpleService");
+
+ assertEquals("Hello World!", proxy.echo("Hello World!")); // request response call
+ proxy.ping(); // one way call
+ } finally {
+ bus.shutdown(true);
+ }
+ }
+
+ @Test
+ @RunAsClient
+ @WrapThreadContextClassLoader
+ public void testWithFeatureProperty() throws Exception
+ {
+ final Bus bus = BusFactory.newInstance().createBus();
+ BusFactory.setThreadDefaultBus(bus);
+ try {
+ QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wsrm", "SimpleService");
+ URL wsdlURL = getResourceURL("jaxws/samples/wsrm/WEB-INF/wsdl/SimpleService.wsdl");
+ Service service = Service.create(wsdlURL, serviceName);
+ SimpleService proxy = (SimpleService)service.getPort(SimpleService.class);
+
+ ClientConfigurer configurer = ClientConfigUtil.resolveClientConfigurer();
+ configurer.setConfigProperties(proxy, "META-INF/jaxws-client-config.xml", "Custom Client Config");
+
+ ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, baseURL + "/jaxws-samples-wsrm-api/SimpleService");
+
+ assertEquals("Hello World!", proxy.echo("Hello World!")); // request response call
+ proxy.ping(); // one way call
+ } finally {
+ bus.shutdown(true);
+ }
+ }
+
}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsrm/META-INF/jaxws-client-config.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsrm/META-INF/jaxws-client-config.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsrm/META-INF/jaxws-client-config.xml 2015-03-11 22:21:55 UTC (rev 19553)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jaxws-config xmlns="urn:jboss:jbossws-jaxws-config:4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+ xsi:schemaLocation="urn:jboss:jbossws-jaxws-config:4.0 schema/jbossws-jaxws-config_4_0.xsd">
+
+ <client-config>
+ <config-name>Custom Client Config</config-name>
+ <property>
+ <property-name>cxf.features</property-name>
+ <property-value>org.jboss.test.ws.jaxws.samples.wsrm.client.CustomRMFeature</property-value>
+ </property>
+ </client-config>
+
+</jaxws-config>
\ No newline at end of file
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/samples/wsrm/META-INF/jaxws-client-config.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
9 years, 10 months
JBossWS SVN: r19552 - stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/client.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2015-03-11 17:43:27 -0400 (Wed, 11 Mar 2015)
New Revision: 19552
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/client/SimpleServiceTestCase.java
Log:
Fix WS-RM SimpleServiceTestCase and enrich it with feature based example
Modified: stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/client/SimpleServiceTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/client/SimpleServiceTestCase.java 2015-03-11 20:28:46 UTC (rev 19551)
+++ stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/samples/wsrm/client/SimpleServiceTestCase.java 2015-03-11 21:43:27 UTC (rev 19552)
@@ -28,6 +28,11 @@
import javax.xml.ws.Service;
import org.apache.cxf.endpoint.Client;
+import org.apache.cxf.ws.rm.feature.RMFeature;
+import org.apache.cxf.ws.rm.manager.AcksPolicyType;
+import org.apache.cxf.ws.rm.manager.DestinationPolicyType;
+import org.apache.cxf.ws.rmp.v200502.RMAssertion;
+import org.apache.cxf.ws.rmp.v200502.RMAssertion.AcknowledgementInterval;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.container.test.api.RunAsClient;
import org.jboss.arquillian.junit.Arquillian;
@@ -37,6 +42,7 @@
import org.jboss.test.ws.jaxws.samples.wsrm.generated.SimpleService;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestHelper;
+import org.jboss.wsf.test.WrapThreadContextClassLoader;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -74,6 +80,7 @@
@Test
@RunAsClient
+ @WrapThreadContextClassLoader
public void test() throws Exception
{
SimpleService proxy = null;
@@ -91,4 +98,37 @@
}
}
+ @Test
+ @RunAsClient
+ public void testWithFeature() throws Exception
+ {
+ SimpleService proxy = null;
+ try {
+ QName serviceName = new QName("http://www.jboss.org/jbossws/ws-extensions/wsrm", "SimpleService");
+ URL wsdlURL = new URL("http://" + getServerHost() + ":" + getServerPort() + "/jaxws-samples-wsrm/SimpleService?wsdl");
+ RMFeature feature = new RMFeature();
+ RMAssertion rma = new RMAssertion();
+ RMAssertion.BaseRetransmissionInterval bri = new RMAssertion.BaseRetransmissionInterval();
+ bri.setMilliseconds(4000L);
+ rma.setBaseRetransmissionInterval(bri);
+ AcknowledgementInterval ai = new AcknowledgementInterval();
+ ai.setMilliseconds(2000L);
+ rma.setAcknowledgementInterval(ai);
+ feature.setRMAssertion(rma);
+ DestinationPolicyType dp = new DestinationPolicyType();
+ AcksPolicyType ap = new AcksPolicyType();
+ ap.setIntraMessageThreshold(0);
+ dp.setAcksPolicy(ap);
+ feature.setDestinationPolicy(dp);
+ Service service = Service.create(wsdlURL, serviceName);
+ proxy = (SimpleService)service.getPort(SimpleService.class, feature);
+ assertEquals("Hello World2!", proxy.echo("Hello World2!")); // request responce call
+ proxy.ping(); // one way call
+ } finally {
+ if (proxy != null) {
+ ((Client)proxy).destroy();
+ }
+ }
+ }
+
}
9 years, 10 months
JBossWS SVN: r19551 - in stack/cxf/trunk: modules/client and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2015-03-11 16:28:46 -0400 (Wed, 11 Mar 2015)
New Revision: 19551
Added:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/MapToBeanConverter.java
stack/cxf/trunk/modules/client/src/test/java/org/jboss/wsf/stack/cxf/client/configuration/BeanA.java
stack/cxf/trunk/modules/client/src/test/java/org/jboss/wsf/stack/cxf/client/configuration/BeanB.java
stack/cxf/trunk/modules/client/src/test/java/org/jboss/wsf/stack/cxf/client/configuration/MapToBeanConverterTest.java
Modified:
stack/cxf/trunk/modules/client/pom.xml
stack/cxf/trunk/pom.xml
Log:
[JBWS-3879] Initial implementation of a property map to beans converter, internally based on Apache Commons Beanutils
Modified: stack/cxf/trunk/modules/client/pom.xml
===================================================================
--- stack/cxf/trunk/modules/client/pom.xml 2015-03-10 16:58:48 UTC (rev 19550)
+++ stack/cxf/trunk/modules/client/pom.xml 2015-03-11 20:28:46 UTC (rev 19551)
@@ -251,6 +251,11 @@
<artifactId>log4j</artifactId>
</dependency>
<dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
</dependency>
Added: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/MapToBeanConverter.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/MapToBeanConverter.java (rev 0)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/MapToBeanConverter.java 2015-03-11 20:28:46 UTC (rev 19551)
@@ -0,0 +1,130 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2015, 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.configuration;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.apache.commons.beanutils.BeanUtils;
+import org.jboss.ws.common.utils.DelegateClassLoader;
+import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
+
+
+/**
+ * Converts a properties map (String to String) into bean(s).
+ *
+ * key0 | Fdfdsfs
+ * key1 | ##foo
+ * ##foo | com.company.Foo
+ * ##foo.par1 | AbcDe
+ * ##foo.par2 | ##par
+ * ##par | com.company.Bar
+ * ##par.name | John
+ * ##par.surname | Black
+ * ##foo.par3 | ##par
+ *
+ * A call to get("key1") returns the same you would get with:
+ *
+ * com.company.Foo foo = new com.company.Foo();
+ * foo.setPar1("AbcDe");
+ * com.company.Bar par = new com.company.Bar();
+ * par.setName("John");
+ * par.setSurname("Black");
+ * foo.setPar2(par);
+ * foo.setPar3(par);
+ * return foo;
+ *
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 11-Mar-2015
+ *
+ */
+public class MapToBeanConverter
+{
+ public static final String BEAN_ID_PREFIX = "##";
+ public static final String DOT = ".";
+ private final Map<String, String> map;
+ private final Map<String, Object> builtObjectsMap;
+
+ public MapToBeanConverter(Map<String, String> map) {
+ this.map = map;
+ this.builtObjectsMap = new HashMap<String, Object>();
+ }
+
+ public Object get(String key) throws Exception {
+ if (key == null || !key.startsWith(BEAN_ID_PREFIX)) {
+ throw new IllegalArgumentException("Provided key does not start with " + BEAN_ID_PREFIX + ": " + key);
+ }
+ Object result = builtObjectsMap.get(key);
+ if (result == null) {
+ result = build(key);
+ builtObjectsMap.put(key, result);
+ }
+ return result;
+ }
+
+ protected Object build(String key) throws Exception {
+ Object bean = newInstance(map.get(key));
+ Map<String, String> attributes = attributesByBeanRef(key);
+ if (!attributes.isEmpty()) {
+ for (Entry<String, String> e : attributes.entrySet()) {
+ final String v = e.getValue();
+ BeanUtils.setProperty(bean, e.getKey(), v.startsWith(BEAN_ID_PREFIX) ? get(v) : v);
+ }
+ }
+ return bean;
+ }
+
+ protected Object newInstance(String className) throws Exception {
+ ClassLoader loader = new DelegateClassLoader(ClassLoaderProvider.getDefaultProvider()
+ .getServerIntegrationClassLoader(), SecurityActions.getContextClassLoader());
+ Class<?> clazz = SecurityActions.loadClass(loader, className);
+ return clazz.newInstance();
+ }
+
+ /**
+ * Return an attribute name to attribute value map
+ *
+ * @param beanRef
+ * @return
+ */
+ protected Map<String, String> attributesByBeanRef(String beanRef) {
+ Map<String, String> result = null;
+ for (Entry<String, String> e : map.entrySet()) {
+ final String k = e.getKey();
+ if (k.startsWith(beanRef) && k.startsWith(DOT, beanRef.length())) {
+ if (result == null) {
+ result = new HashMap<String,String>();
+ }
+ result.put(k.substring(beanRef.length() + DOT.length()), e.getValue());
+ }
+ }
+ if (result == null) {
+ return Collections.emptyMap();
+ } else {
+ return result;
+ }
+ }
+
+}
\ No newline at end of file
Property changes on: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/configuration/MapToBeanConverter.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/client/src/test/java/org/jboss/wsf/stack/cxf/client/configuration/BeanA.java
===================================================================
--- stack/cxf/trunk/modules/client/src/test/java/org/jboss/wsf/stack/cxf/client/configuration/BeanA.java (rev 0)
+++ stack/cxf/trunk/modules/client/src/test/java/org/jboss/wsf/stack/cxf/client/configuration/BeanA.java 2015-03-11 20:28:46 UTC (rev 19551)
@@ -0,0 +1,86 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2015, 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.configuration;
+
+public class BeanA
+{
+
+ private String name;
+
+ private int num;
+
+ private Long bigNumber;
+
+ private BeanB beanB;
+
+ private boolean pretty;
+
+ public boolean isPretty()
+ {
+ return pretty;
+ }
+
+ public void setPretty(boolean pretty)
+ {
+ this.pretty = pretty;
+ }
+
+ public BeanB getBeanB()
+ {
+ return beanB;
+ }
+
+ public void setBeanB(BeanB beanB)
+ {
+ this.beanB = beanB;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public int getNum()
+ {
+ return num;
+ }
+
+ public void setNum(int num)
+ {
+ this.num = num;
+ }
+
+ public Long getBigNumber()
+ {
+ return bigNumber;
+ }
+
+ public void setBigNumber(Long bigNumber)
+ {
+ this.bigNumber = bigNumber;
+ }
+}
Property changes on: stack/cxf/trunk/modules/client/src/test/java/org/jboss/wsf/stack/cxf/client/configuration/BeanA.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/client/src/test/java/org/jboss/wsf/stack/cxf/client/configuration/BeanB.java
===================================================================
--- stack/cxf/trunk/modules/client/src/test/java/org/jboss/wsf/stack/cxf/client/configuration/BeanB.java (rev 0)
+++ stack/cxf/trunk/modules/client/src/test/java/org/jboss/wsf/stack/cxf/client/configuration/BeanB.java 2015-03-11 20:28:46 UTC (rev 19551)
@@ -0,0 +1,86 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2015, 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.configuration;
+
+public class BeanB
+{
+
+ private BeanA firstBeanA;
+
+ private BeanA secondBeanA;
+
+ private String name;
+
+ private int num;
+
+ private Long bigNumber;
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public int getNum()
+ {
+ return num;
+ }
+
+ public void setNum(int num)
+ {
+ this.num = num;
+ }
+
+ public Long getBigNumber()
+ {
+ return bigNumber;
+ }
+
+ public void setBigNumber(Long bigNumber)
+ {
+ this.bigNumber = bigNumber;
+ }
+
+ public BeanA getFirstBeanA()
+ {
+ return firstBeanA;
+ }
+
+ public void setFirstBeanA(BeanA firstBeanA)
+ {
+ this.firstBeanA = firstBeanA;
+ }
+
+ public BeanA getSecondBeanA()
+ {
+ return secondBeanA;
+ }
+
+ public void setSecondBeanA(BeanA secondBeanA)
+ {
+ this.secondBeanA = secondBeanA;
+ }
+}
Property changes on: stack/cxf/trunk/modules/client/src/test/java/org/jboss/wsf/stack/cxf/client/configuration/BeanB.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/client/src/test/java/org/jboss/wsf/stack/cxf/client/configuration/MapToBeanConverterTest.java
===================================================================
--- stack/cxf/trunk/modules/client/src/test/java/org/jboss/wsf/stack/cxf/client/configuration/MapToBeanConverterTest.java (rev 0)
+++ stack/cxf/trunk/modules/client/src/test/java/org/jboss/wsf/stack/cxf/client/configuration/MapToBeanConverterTest.java 2015-03-11 20:28:46 UTC (rev 19551)
@@ -0,0 +1,109 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2015, 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.configuration;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import junit.framework.TestCase;
+
+/**
+ * A test case for the MapToBeanConverter
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 11-Mar-2015
+ *
+ */
+public class MapToBeanConverterTest extends TestCase
+{
+ private Map<String, String> getTestMap() {
+ Map<String, String> map = new HashMap<String, String>();
+ map.put("bean1", "invalid");
+ map.put("##bean1", "org.jboss.wsf.stack.cxf.client.configuration.BeanA");
+ map.put("##bean1.name", "Bean1");
+ map.put("##bean1.num", "1");
+ map.put("##bean1.bigNumber", "1000000000");
+ map.put("##bean1.beanB", "##bean2");
+ map.put("##bean2", "org.jboss.wsf.stack.cxf.client.configuration.BeanB");
+ map.put("##bean2.name", "Bean2");
+ map.put("##bean2.num", "2");
+ map.put("##bean2.bigNumber", "2000000000");
+ map.put("##bean2.firstBeanA", "##bean3");
+ map.put("##bean2.secondBeanA", "##bean3");
+ map.put("##bean3", "org.jboss.wsf.stack.cxf.client.configuration.BeanA");
+ map.put("##bean3.name", "Bean3");
+ map.put("##bean3.num", "3");
+ map.put("##bean3.pretty", "true");
+ map.put("bean2", "invalid");
+ map.put("bean3", "invalid");
+ map.put("##bean4", "bean4Class");
+ return map;
+ }
+
+ public void testBasicConversion() throws Exception
+ {
+ Map<String, String> map = getTestMap();
+ MapToBeanConverter converter = new MapToBeanConverter(map);
+ BeanA bean1 = (BeanA)converter.get("##bean1");
+ assertNotNull(bean1);
+ assertEquals("Bean1", bean1.getName());
+ assertEquals(1, bean1.getNum());
+ assertEquals(new Long(1000000000), bean1.getBigNumber());
+ assertFalse(bean1.isPretty());
+ BeanB bean2 = bean1.getBeanB();
+ assertNotNull(bean2);
+ assertEquals("Bean2", bean2.getName());
+ assertEquals(2, bean2.getNum());
+ assertEquals(new Long(2000000000), bean2.getBigNumber());
+ BeanA bean3 = bean2.getFirstBeanA();
+ assertNotNull(bean3);
+ assertEquals("Bean3", bean3.getName());
+ assertEquals(3, bean3.getNum());
+ assertTrue(bean3.isPretty());
+ assertNull(bean3.getBigNumber());
+ assertEquals(bean3, bean2.getSecondBeanA());
+ assertEquals(bean1, converter.get("##bean1"));
+ assertEquals(bean2, converter.get("##bean2"));
+ assertEquals(bean3, converter.get("##bean3"));
+ }
+
+ public void testInvalidGet() throws Exception
+ {
+ try {
+ new MapToBeanConverter(getTestMap()).get("foo");
+ fail("IllegalArgumentException expected!");
+ } catch (IllegalArgumentException e) {
+ assertTrue(e.getMessage().contains("foo"));
+ }
+ }
+
+ public void testMissingClass() throws Exception
+ {
+ try {
+ new MapToBeanConverter(getTestMap()).get("##bean4");
+ fail("ClassNotFoundException expected!");
+ } catch (ClassNotFoundException e) {
+ assertTrue(e.getMessage().contains("bean4Class"));
+ }
+ }
+
+}
Property changes on: stack/cxf/trunk/modules/client/src/test/java/org/jboss/wsf/stack/cxf/client/configuration/MapToBeanConverterTest.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2015-03-10 16:58:48 UTC (rev 19550)
+++ stack/cxf/trunk/pom.xml 2015-03-11 20:28:46 UTC (rev 19551)
@@ -92,6 +92,7 @@
<commons-lang.version>2.6</commons-lang.version>
<commons.logging.version>1.1.1</commons.logging.version>
<log4j.version>1.2.16</log4j.version>
+ <org.slf4j.version>1.6.1</org.slf4j.version>
<activation.version>1.1</activation.version>
<fastinfoset.version>1.2.12</fastinfoset.version>
<neethi.version>3.0.3</neethi.version>
@@ -1159,6 +1160,11 @@
<version>${log4j.version}</version>
</dependency>
<dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>${org.slf4j.version}</version>
+ </dependency>
+ <dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>${activation.version}</version>
9 years, 10 months
JBossWS SVN: r19550 - in stack/cxf/trunk/modules/testsuite/cxf-tests/src/test: resources/jaxws/cxf/fastinfoset/WEB-INF and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2015-03-10 12:58:48 -0400 (Tue, 10 Mar 2015)
New Revision: 19550
Added:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/WEB-INF/jboss-webservices.xml
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/FastInfosetTestCase.java
Log:
[JBWS-3875] Yet another FastInfoset test addition using jboss-webservices.xml
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/FastInfosetTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/FastInfosetTestCase.java 2015-03-10 16:15:03 UTC (rev 19549)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/fastinfoset/FastInfosetTestCase.java 2015-03-10 16:58:48 UTC (rev 19550)
@@ -34,6 +34,7 @@
import org.apache.cxf.interceptor.LoggingInInterceptor;
import org.apache.cxf.interceptor.LoggingOutInterceptor;
import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.OperateOnDeployment;
import org.jboss.arquillian.container.test.api.RunAsClient;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.arquillian.test.api.ArquillianResource;
@@ -53,11 +54,14 @@
@RunWith(Arquillian.class)
public class FastInfosetTestCase extends JBossWSTest
{
+ public static final String DEP1 = "dep1";
+ public static final String DEP2 = "dep2";
+
@ArquillianResource
private URL baseURL;
- @Deployment(testable = false)
- public static WebArchive createDeployment() {
+ @Deployment(testable = false, name = DEP1)
+ public static WebArchive createDeployment1() {
WebArchive archive = ShrinkWrap.create(WebArchive.class, "jaxws-cxf-fastinfoset.war");
archive.setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ "Dependencies: org.apache.cxf\n"))
@@ -69,6 +73,16 @@
return archive;
}
+ @Deployment(testable = false, name = DEP2)
+ public static WebArchive createDeployment2() {
+ WebArchive archive = ShrinkWrap.create(WebArchive.class, "jaxws-cxf-fastinfoset2.war");
+ archive.setManifest(new StringAsset("Manifest-Version: 1.0\n"
+ + "Dependencies: org.apache.cxf\n"))
+ .addAsWebInfResource(new File(JBossWSTestHelper.getTestResourcesDir() + "/jaxws/cxf/fastinfoset/WEB-INF/jboss-webservices.xml"), "jboss-webservices.xml")
+ .addClass(org.jboss.test.ws.jaxws.cxf.fastinfoset.HelloWorldImpl.class);
+ return archive;
+ }
+
@Override
protected String getClientJarPaths() {
return JBossWSTestHelper.writeToFile(new JBossWSTestHelper.JarDeployment("jaxws-cxf-fastinfoset-client.jar") { {
@@ -81,7 +95,8 @@
@Test
@RunAsClient
- public void testInfoset() throws Exception
+ @OperateOnDeployment(DEP1)
+ public void testInfosetUsingFastInfosetAnnotation() throws Exception
{
ByteArrayOutputStream out = new ByteArrayOutputStream();
ByteArrayOutputStream in = new ByteArrayOutputStream();
@@ -106,11 +121,11 @@
pwOut.close();
pwIn.close();
}
-
}
@Test
@RunAsClient
+ @OperateOnDeployment(DEP1)
public void testInfosetUsingFeature() throws Exception
{
ByteArrayOutputStream out = new ByteArrayOutputStream();
@@ -136,14 +151,33 @@
pwOut.close();
pwIn.close();
}
-
}
@Test
@RunAsClient
@WrapThreadContextClassLoader
+ @OperateOnDeployment(DEP1)
public void testInfosetUsingFeatureProperties() throws Exception
{
+ URL wsdlURL = new URL(baseURL + "HelloWorldService/HelloWorldImpl?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/jaxws/cxf/fastinfoset", "HelloWorldService");
+ QName portQName = new QName("http://org.jboss.ws/jaxws/cxf/fastinfoset", "HelloWorldImplPort");
+ internalTestInfosetUsingFeatureProperties(wsdlURL, serviceName, portQName);
+ }
+
+ @Test
+ @RunAsClient
+ @WrapThreadContextClassLoader
+ @OperateOnDeployment(DEP2)
+ public void testInfosetUsingFeatureProperties2() throws Exception
+ {
+ URL wsdlURL = new URL(baseURL + "HelloWorldService?wsdl");
+ QName serviceName = new QName("http://org.jboss.ws/jaxws/cxf/fastinfoset", "HelloWorldService");
+ QName portQName = new QName("http://org.jboss.ws/jaxws/cxf/fastinfoset", "HelloWorldImplPort");
+ internalTestInfosetUsingFeatureProperties(wsdlURL, serviceName, portQName);
+ }
+
+ private void internalTestInfosetUsingFeatureProperties(URL wsdlURL, QName serviceName, QName portQName) throws Exception {
ByteArrayOutputStream out = new ByteArrayOutputStream();
ByteArrayOutputStream in = new ByteArrayOutputStream();
PrintWriter pwIn = new PrintWriter(in);
@@ -154,10 +188,7 @@
bus.getInInterceptors().add(new LoggingInInterceptor(pwIn));
bus.getOutInterceptors().add(new LoggingOutInterceptor(pwOut));
- URL wsdlURL = new URL(baseURL + "HelloWorldService/HelloWorldImpl?wsdl");
- QName serviceName = new QName("http://org.jboss.ws/jaxws/cxf/fastinfoset", "HelloWorldService");
Service service = Service.create(wsdlURL, serviceName, new UseThreadBusFeature());
- QName portQName = new QName("http://org.jboss.ws/jaxws/cxf/fastinfoset", "HelloWorldImplPort");
HelloWorld port = (HelloWorld) service.getPort(portQName, HelloWorld.class);
ClientConfigurer configurer = ClientConfigUtil.resolveClientConfigurer();
@@ -171,7 +202,6 @@
pwOut.close();
pwIn.close();
}
-
}
}
Added: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/WEB-INF/jboss-webservices.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/WEB-INF/jboss-webservices.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/WEB-INF/jboss-webservices.xml 2015-03-10 16:58:48 UTC (rev 19550)
@@ -0,0 +1,12 @@
+<?xml version="1.1" encoding="UTF-8"?>
+<webservices
+ xmlns="http://www.jboss.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ version="1.2"
+ xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee">
+ <property>
+ <name>cxf.features</name>
+ <value>org.apache.cxf.feature.FastInfosetFeature</value>
+ </property>
+
+</webservices>
Property changes on: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/resources/jaxws/cxf/fastinfoset/WEB-INF/jboss-webservices.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
9 years, 10 months