JBossWS SVN: r18077 - stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-11-08 09:07:22 -0500 (Fri, 08 Nov 2013)
New Revision: 18077
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java
Log:
[JBWS-3730] Also allow controlling using system property
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 2013-11-08 11:13:32 UTC (rev 18076)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/configuration/BusHolder.java 2013-11-08 14:07:22 UTC (rev 18077)
@@ -161,7 +161,7 @@
bus.getInInterceptors().add(new NsCtxSelectorStoreInterceptor());
final String p = (props != null) ? props.get(Constants.JBWS_CXF_DISABLE_HANDLER_AUTH_CHECKS) : null;
- if (p == null || (!"true".equalsIgnoreCase(p) && !"1".equalsIgnoreCase(p))) {
+ if ((p == null || (!"true".equalsIgnoreCase(p) && !"1".equalsIgnoreCase(p))) && !Boolean.getBoolean(Constants.JBWS_CXF_DISABLE_HANDLER_AUTH_CHECKS)) {
bus.getInInterceptors().add(new HandlerAuthInterceptor());
}
}
11 years, 1 month
JBossWS SVN: r18076 - stack/cxf/branches/jbossws-cxf-4.2.3.Final/modules/dist/src/main/distro.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-11-08 06:13:32 -0500 (Fri, 08 Nov 2013)
New Revision: 18076
Modified:
stack/cxf/branches/jbossws-cxf-4.2.3.Final/modules/dist/src/main/distro/ReleaseNotes.txt
Log:
Updating release notes
Modified: stack/cxf/branches/jbossws-cxf-4.2.3.Final/modules/dist/src/main/distro/ReleaseNotes.txt
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.2.3.Final/modules/dist/src/main/distro/ReleaseNotes.txt 2013-11-08 11:13:20 UTC (rev 18075)
+++ stack/cxf/branches/jbossws-cxf-4.2.3.Final/modules/dist/src/main/distro/ReleaseNotes.txt 2013-11-08 11:13:32 UTC (rev 18076)
@@ -28,27 +28,24 @@
Bug
- [JBWS-???] - ...
+ * [JBWS-3727] - NPE in org.jboss.wsf.stack.cxf.interceptor.HandlerAuthInterceptor
-Enhancement
-
- [JBWS-???] - ...
-
Feature Request
- [JBWS-???] - ...
+ * [JBWS-3730] - Allow disabling JAXWS handler authorization for EJB3 endpoints
Task
- [JBWS-???] - ...
+ * [JBWS-3663] - Remove eclipse warnings
+ * [JBWS-3723] - Remove io.netty:netty exclusion from jbossws-native dependency in jbossws-cxf main pom
+ * [JBWS-3725] - Set verify-client flag on htts listener in WSSecurityPolicyExamples23xTestCase
+ * [JBWS-3726] - Fix InContainerClientBusStrategyTestCase failures on IBM JDK
+ * [JBWS-3729] - Fix org.jboss.test.ws.jaxws.cxf.noIntegration.CXFEndpointServlet
+ * [JBWS-3731] - Control and document behavior regarding thread default bus changes depending on client bus selection strategy
-Sub-task
-
- [JBWS-???] - ...
-
Errata
- See: https://issues.jboss.org/browse/JBWS-???
+ See: https://issues.jboss.org/browse/JBWS-3706
This version of "${project.name}" is based on Apache CXF ${cxf.version}
11 years, 1 month
JBossWS SVN: r18075 - stack/cxf/branches/jbossws-cxf-4.2.3.Final/modules/dist/src/main/doc.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-11-08 06:13:20 -0500 (Fri, 08 Nov 2013)
New Revision: 18075
Modified:
stack/cxf/branches/jbossws-cxf-4.2.3.Final/modules/dist/src/main/doc/Author_Group.xml
stack/cxf/branches/jbossws-cxf-4.2.3.Final/modules/dist/src/main/doc/Revision_History.xml
stack/cxf/branches/jbossws-cxf-4.2.3.Final/modules/dist/src/main/doc/chapter-5-Advanced_User_Guide.xml
Log:
Updating doc
Modified: stack/cxf/branches/jbossws-cxf-4.2.3.Final/modules/dist/src/main/doc/Author_Group.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.2.3.Final/modules/dist/src/main/doc/Author_Group.xml 2013-11-08 10:06:08 UTC (rev 18074)
+++ stack/cxf/branches/jbossws-cxf-4.2.3.Final/modules/dist/src/main/doc/Author_Group.xml 2013-11-08 11:13:20 UTC (rev 18075)
@@ -15,4 +15,8 @@
<firstname>Jim</firstname>
<surname>Ma</surname>
</author>
+ <author>
+ <firstname>Rebecca</firstname>
+ <surname>Searls</surname>
+ </author>
</authorgroup>
Modified: stack/cxf/branches/jbossws-cxf-4.2.3.Final/modules/dist/src/main/doc/Revision_History.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.2.3.Final/modules/dist/src/main/doc/Revision_History.xml 2013-11-08 10:06:08 UTC (rev 18074)
+++ stack/cxf/branches/jbossws-cxf-4.2.3.Final/modules/dist/src/main/doc/Revision_History.xml 2013-11-08 11:13:20 UTC (rev 18075)
@@ -102,6 +102,20 @@
</simplelist>
</revdescription>
</revision>
+ <revision>
+ <revnumber>4.2.3</revnumber>
+ <date>Fri Nov 8 2013</date>
+ <author>
+ <firstname>Alessio</firstname>
+ <surname>Soldano</surname>
+ <email>alessio.soldano(a)jboss.com</email>
+ </author>
+ <revdescription>
+ <simplelist>
+ <member>JBossWS-CXF 4.2.3 documentation</member>
+ </simplelist>
+ </revdescription>
+ </revision>
</revhistory>
</simpara>
</appendix>
Modified: stack/cxf/branches/jbossws-cxf-4.2.3.Final/modules/dist/src/main/doc/chapter-5-Advanced_User_Guide.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.2.3.Final/modules/dist/src/main/doc/chapter-5-Advanced_User_Guide.xml 2013-11-08 10:06:08 UTC (rev 18074)
+++ stack/cxf/branches/jbossws-cxf-4.2.3.Final/modules/dist/src/main/doc/chapter-5-Advanced_User_Guide.xml 2013-11-08 11:13:20 UTC (rev 18075)
@@ -365,15 +365,16 @@
<section id="sid-41713670_Predefinedclientandendpointconfigurations-Overview">
<title>Overview</title>
+ <para>JBossWS enables extra setup configuration data to be predefined and associated with an endpoint. Endpoint configurations can include JAX-WS handlers and key/value properties declarations that control JBossWS and Apache CXF internals. Predefined endpoint configurations can be used for JAX-WS client and JAX-WS endpoint setup.</para>
<para>
- JBossWS comes with a concept of
- <emphasis role="italics">predefined configurations</emphasis>
- , which are kind of basic templates that can be used for both JAX-WS client and JAX-WS endpoint setup. Configurations can include JAX-WS handlers as well as basic key/value properties declarations.
+ Endpoint configurations can be defined in the webservice subsystem and in a deployment descriptor file within the application. There can be many endpoint configuration definitions in the webservice subsystem and in an application. Each endpoint configuration must have a name that is unique within the server. Configurations defined in an application are local to the application. Endpoint implementations declare the use of a specific configuration through the use of the
+ <code>org.jboss.ws.api.annotation.EndpointConfig</code>
+ annotation. An endpoint configuration defined in the webservices subsystem is available to all deployed applications on the server container and can be referenced by name in the annotation. An endpoint configuration defined in an application must be referenced by deployment descriptor file name and the configuration name in the annotation.
</para>
<section id="sid-41713670_Predefinedclientandendpointconfigurations-Handlers">
<title>Handlers</title>
- <para>For each endpoint configuration, both PRE and POST handler chains can be specified. Each handler chain may include JAXWS handlers. For outbound messages, PRE handler chain handlers are meant to be executed before any handler attached to the endpoints using standard JAXWS means (e.g. using @HandlerChain), while POST handler chain handlers are executed after usual endpoint handlers. For inbound messages, the opposite applies.</para>
+ <para>Each endpoint configuration may be associated with zero or more PRE and POST handler chains. Each handler chain may include JAXWS handlers. For outbound messages the PRE handler chains are executed before any handler that is attached to the endpoint using the standard means, such as with annotation @HandlerChain, and POST handler chains are executed after those objects have executed. For inbound messages the POST handler chains are executed before any handler that is attached to the endpoint using the standard means and the PRE handler chains are executed after those objects have executed.</para>
<informalexample>
<programlisting>* Server inbound messages
Client --> ... --> POST HANDLER --> ENDPOINT HANDLERS --> PRE HANDLERS --> Endpoint
@@ -396,9 +397,9 @@
<title>Endpoint configuration assignment</title>
<para>
- JAX-WS endpoints can be assigned to a given configuration by annotating them with the
+ Annotation
<code>org.jboss.ws.api.annotation.EndpointConfig</code>
- annotation:
+ is used to assign an endpoint configuration to a JAX-WS endpoint implementation. When assigning a configuration that is defined in the webservices subsystem only the configuration name is specified. When assigning a configuration that is defined in the application, the relative path to the deployment descriptor and the configuration name must be specified.
</para>
<informalexample>
<programlisting>@EndpointConfig(configFile = "WEB-INF/jaxws-endpoint-config.xml", configName = "Custom WS-Security Endpoint")
@@ -410,30 +411,16 @@
}
}</programlisting>
</informalexample>
+ </section>
+ <section id="sid-41713670_Predefinedclientandendpointconfigurations-EndpointConfigurationDeploymentDescriptor">
+
+ <title>Endpoint Configuration Deployment Descriptor</title>
<para>
- The
- <code>configFile</code>
- attribute is used to specify which config file, if any, is to be used to load the configuration; if
- <code>configFile</code>
- is not set, the application server configurations are used.
+ Java EE archives that can contain JAX-WS endpoint implementations can also contain predefined endpoint configurations. All endpoint configuration definitions for a given archive must be provided in a single deployment descriptor file. The file must reside in directory WEB-INF for a web application and directory META-INF for a client and EJB application. The file name must end with extension .xml and be an implementation of schema
+ <ulink url="http://anonsvn.jboss.org/repos/jbossws/spi/tags/jbossws-spi-2.1.0.Beta1/s...">jbossws-jaxws-config</ulink>
+ . Common practice is to use the file name jaxws-endpoint-config.xml but this is not required.
</para>
- <para>
- The
- <code>configName</code>
- attributed is used to specify the name of the configuration to be used.
- </para>
- <para>
- Alternatively, configurations can be assigned to endpoints through the
- <link linkend="sid-3866738">jboss-webservices.xml deployment descriptor</link>
- .
- </para>
- <para>
- The configuration file, if any, needs to be included in the endpoint deployment; the
- <ulink url="http://anonsvn.jboss.org/repos/jbossws/spi/tags/jbossws-spi-2.1.0.Beta1/s...">jbossws-jaxws-config schema</ulink>
- defines its contents and is included in the
- <emphasis role="italics">jbossws-spi</emphasis>
- artifact.
- </para>
+ <para>Many endpoint configurations can be defined within the deployment descriptor file. Each configuration must have a name that is unique within the server on which the application is deployed. The configuration name is not referencable by endpoint implementations outside the application.</para>
</section>
<section id="sid-41713670_Predefinedclientandendpointconfigurations-Clientconfigurationassignment">
@@ -469,7 +456,7 @@
</programlisting>
</informalexample>
<para>
- JBossWS internally parses the specified configuration file, if any, after having resolved it as a resources using the current thread context classloader. The
+ JBossWS parses the specified configuration file. The configuration file must be found as a resource by the classloader of the current thread. The
<ulink url="http://anonsvn.jboss.org/repos/jbossws/spi/tags/jbossws-spi-2.1.0.Beta1/s...">jbossws-jaxws-config schema</ulink>
defines the descriptor contents and is included in the
<emphasis role="italics">jbossws-spi</emphasis>
@@ -479,7 +466,7 @@
<section id="sid-41713670_Predefinedclientandendpointconfigurations-Explicitsetup">
<title>Explicit setup</title>
- <para>Alternatively, JBossWS API facility classes can be used for assigning configurations when building up a client; JAXWS handlers can be read from client configurations as follows:</para>
+ <para>Alternatively, JBossWS API comes with facility classes that can be used for assigning configurations when building a client. JAXWS handlers read from client configurations as follows:</para>
<informalexample>
<programlisting>import org.jboss.ws.api.configuration.ClientConfigUtil;
import org.jboss.ws.api.configuration.ClientConfigurer;
@@ -1041,7 +1028,7 @@
<code>BusFactory</code>
to be used leverages the Service API, basically looking for optional configurations in
<emphasis role="italics">META-INF/services/...</emphasis>
- location using the current thread context classloader. JBossWS-CXF integration comes with his own implementation of
+ location using the current thread context classloader. JBossWS-CXF integration comes with its own implementation of
<code>BusFactory</code>
,
<code>org.jboss.wsf.stack.cxf.client.configuration.JBossWSBusFactory</code>
@@ -1109,9 +1096,9 @@
<emphasis role="italics">getThreadDefaultBus()</emphasis>
and
<emphasis role="italics">getThreadDefaultBus(true)</emphasis>
- first fallback to retrieving the configured global default bus before actually trying creating a new instance (and the created new instance is set as global default bus if that was not there set yet).
+ first fallback to retrieving the configured global default bus before actually trying creating a new instance (and the created new instance is set as global default bus if that was not set there yet).
</para>
- <para>The drawback of this mechanism (which is basically fine in JSE environment) is that when running in a JBoss AS container you need to be careful in order not to (mis)use a bus over multiple applications (assuming the Apache CXF classes are loaded by the same classloader, which is currently the case with AS6 and 7).</para>
+ <para>The drawback of this mechanism (which is basically fine in JSE environment) is that when running in a JBoss AS container you need to be careful in order not to (mis)use a bus over multiple applications (assuming the Apache CXF classes are loaded by the same classloader, which is currently the case with JBoss AS6, JBoss AS7 and WildFly).</para>
<para>Here is a list of general suggestions to avoid problems when running in-container:</para>
<itemizedlist>
<listitem>
@@ -1138,8 +1125,9 @@
<para>keep in mind thread pooling whenever you customize a thread default bus instance (for instance adding bus scope interceptors, ...), as that thread and bus might be later reused; so either shutdown the bus when you're done or explicitly remove it from the BusFactory thread association.</para>
</listitem>
</itemizedlist>
+ <para>Finally, remember that each time you explictly create a new Bus instance (factory.createBus()) that is set as thread default bus and global default bus if those are not set yet.</para>
<para>
- Finally, remember that each time you explictly create a new Bus instance (factory.createBus()) that is set as thread default bus and global default bus if those are not set yet. The JAXWS
+ The JAXWS
<code>Provider</code>
implementation also creates
<code>Bus</code>
@@ -1147,9 +1135,156 @@
<code>Provider</code>
makes sure the default bus is never internally used and instead a new
<code>Bus</code>
- is created if required.
+ is created if required (more details on this in the next paragraph).
</para>
</section>
+ <section id="sid-3866786_ApacheCXFintegration-BusselectionstrategiesforJAXWSclients">
+
+ <title>Bus selection strategies for JAXWS clients</title>
+ <para>
+ JAXWS clients require an Apache CXF Bus to be available; the client is registered within the Bus and the Bus affects the client behavior (e.g. through the configured CXF interceptors). The way a bus is internally selected for serving a given JAXWS client is very important, especially for in-container clients; for this reason, JBossWS users can choose the preferred Bus selection strategy. The strategy is enforced in the
+ <code>javax.xml.ws.spi.Provider</code>
+ implementation from the JBossWS integration, being that called whenever a JAXWS
+ <code>Service</code>
+ (client) is requested.
+ </para>
+ <section id="sid-3866786_ApacheCXFintegration-Threadbusstrategy%28THREADBUS%29">
+
+ <title>Thread bus strategy (THREAD_BUS)</title>
+ <para>Each time the vanilla JAXWS api is used to create a Bus, the JBossWS-CXF integration will automatically make sure a Bus is currently associated to the current thread in the BusFactory. If that's not the case, a new Bus is created and linked to the current thread (to prevent the user from relying on the default Bus). The Apache CXF engine will then create the client using the current thread Bus.</para>
+ <para>This is the default strategy, and the most straightforward one in Java SE environments; it lets users automatically reuse a previously created Bus instance and allows using customized Bus that can possibly be created and associated to the thread before building up a JAXWS client.</para>
+ <para>The drawback of the strategy is that the link between the Bus instance and the thread needs to be eventually cleaned up (when not needed anymore). This is really evident in a Java EE environment (hence when running in-container), as threads from pools (e.g. serving web requests) are re-used.</para>
+ <para>
+ When relying on this strategy, the safest approach to be sure of cleaning up the link is to surround the JAXWS client with a
+ <code>try/finally</code>
+ block as below:
+ </para>
+ <informalexample>
+ <programlisting>try {
+ Service service = Service.create(wsdlURL, serviceQName);
+ MyEndpoint port = service.getPort(MyEndpoint.class);
+ //...
+} finally {
+ BusFactory.setThreadDefaultBus(null);
+ // OR (if you don't need the bus and the client anymore)
+ Bus bus = BusFactory.getThreadDefaultBus(false);
+ bus.shutdown(true);
+}</programlisting>
+ </informalexample>
+ </section>
+ <section id="sid-3866786_ApacheCXFintegration-Newbusstrategy%28NEWBUS%29">
+
+ <title>New bus strategy (NEW_BUS)</title>
+ <para>Another strategy is to have the JAXWS Provider from the JBossWS integration create a new Bus each time a JAXWS client is built. The main benefit of this approach is that a fresh bus won't rely on any formerly cached information (e.g. cached WSDL / schemas) which might have changed after the previous client creation. The main drawback is of course worse performance as the Bus creation takes time.</para>
+ <para>If there's a bus already associated to the current thread before the JAXWS client creation, that is automatically restored when returning control to the user; in other words, the newly created bus will be used only for the created JAXWS client but won't stay associated to the current thread at the end of the process. Similarly, if the thread was not associated to any bus before the client creation, no bus will be associated to the thread at the end of the client creation.</para>
+ </section>
+ <section id="sid-3866786_ApacheCXFintegration-Threadcontextclassloaderbusstrategy%28TCCLBUS%29">
+
+ <title>Thread context classloader bus strategy (TCCL_BUS)</title>
+ <para>The last strategy is to have the bus created for serving the client be associated to the current thread context classloader (TCCL). That basically means the same Bus instance is shared by JAXWS clients running when the same TCCL is set. This is particularly interesting as each web application deployment usually has its own context classloader, so this strategy is possibly a way to keep the number of created Bus instances bound to the application number in a JBoss AS container.</para>
+ <para>If there's a bus already associated to the current thread before the JAXWS client creation, that is automatically restored when returning control to the user; in other words, the bus corresponding to the current thread context classloader will be used only for the created JAXWS client but won't stay associated to the current thread at the end of the process. If the thread was not associated to any bus before the client creation, a new bus will be created (and later user for any other client built with this strategy and the same TCCL in place); no bus will be associated to the thread at the end of the client creation.</para>
+ </section>
+ <section id="sid-3866786_ApacheCXFintegration-Strategyconfiguration">
+
+ <title>Strategy configuration</title>
+ <para>
+ Users can request a given Bus selection strategy to be used for the client being built by specifying one of the following JBossWS features (which extend
+ <code>javax</code>
+ <code>.</code>
+ <code>xml</code>
+ <code>.</code>
+ <code>ws</code>
+ <code>.</code>
+ <code>WebServiceFeature</code>
+ ):
+ </para>
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>Feature</para>
+ </entry>
+ <entry>
+ <para>Strategy</para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <code>org.jboss.wsf.stack.cxf.client.UseThreadBusFeature</code>
+ </para>
+ </entry>
+ <entry>
+ <para>THREAD_BUS</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <code>org</code>
+ <code>.</code>
+ <code>jboss</code>
+ <code>.</code>
+ <code>wsf</code>
+ <code>.</code>
+ <code>stack</code>
+ <code>.</code>
+ <code>cxf</code>
+ <code>.</code>
+ <code>client.</code>
+ <code>UseNewBusFeature</code>
+ </para>
+ </entry>
+ <entry>
+ <para>NEW_BUS</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <code>org</code>
+ <code>.</code>
+ <code>jboss</code>
+ <code>.</code>
+ <code>wsf</code>
+ <code>.</code>
+ <code>stack</code>
+ <code>.</code>
+ <code>cxf</code>
+ <code>.</code>
+ <code>client.</code>
+ <code>UseTCCLBusFeature</code>
+ </para>
+ </entry>
+ <entry>
+ <para>TCCL_BUS</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>The feature is specified as follows:</para>
+ <informalexample>
+ <programlisting>Service service = Service.create(wsdlURL, serviceQName, new UseThreadBusFeature());</programlisting>
+ </informalexample>
+ <para>
+ If no feature is explicitly specified, the system default strategy is used, which can be modified through the
+ <code>org.jboss.ws.cxf.jaxws-client.bus.strategy</code>
+ system property when starting the JVM. The valid values for the property are
+ <code>THREAD_BUS</code>
+ ,
+ <code>NEW_BUS</code>
+ and
+ <code>TCCL_BUS</code>
+ . The default is
+ <code>THREAD_BUS</code>
+ .
+ </para>
+ </section>
+ </section>
</section>
<section id="sid-3866786_ApacheCXFintegration-ServerSideIntegrationCustomization">
11 years, 1 month
JBossWS SVN: r18074 - stack/cxf/branches/jbossws-cxf-4.2.3.Final/modules/server/src/main/java/org/jboss/wsf/stack/cxf.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-11-08 05:06:08 -0500 (Fri, 08 Nov 2013)
New Revision: 18074
Modified:
stack/cxf/branches/jbossws-cxf-4.2.3.Final/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java
Log:
Hold on explictly setting the serial version uid to next minor, to be sure we don't have serialization issues
Modified: stack/cxf/branches/jbossws-cxf-4.2.3.Final/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.2.3.Final/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java 2013-11-07 23:53:00 UTC (rev 18073)
+++ stack/cxf/branches/jbossws-cxf-4.2.3.Final/modules/server/src/main/java/org/jboss/wsf/stack/cxf/CXFServletExt.java 2013-11-08 10:06:08 UTC (rev 18074)
@@ -52,7 +52,6 @@
*/
public class CXFServletExt extends AbstractHTTPServlet implements ServletDelegate
{
- private static final long serialVersionUID = -1820187716558491952L;
protected Endpoint endpoint;
protected Bus bus;
11 years, 1 month
JBossWS SVN: r18073 - stack/cxf/branches.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-11-07 18:53:00 -0500 (Thu, 07 Nov 2013)
New Revision: 18073
Added:
stack/cxf/branches/jbossws-cxf-4.2.3.Final/
Log:
Branching for jbossws-cxf-4.2.3.Final release
11 years, 1 month
JBossWS SVN: r18072 - stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/httpproxy.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-11-07 18:34:20 -0500 (Thu, 07 Nov 2013)
New Revision: 18072
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/httpproxy/HTTPProxyTestCaseForked.java
Log:
Typo
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/httpproxy/HTTPProxyTestCaseForked.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/httpproxy/HTTPProxyTestCaseForked.java 2013-11-07 23:25:05 UTC (rev 18071)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/httpproxy/HTTPProxyTestCaseForked.java 2013-11-07 23:34:20 UTC (rev 18072)
@@ -293,7 +293,7 @@
result = false;
}
if (!result) {
- System.out.println("Native libraries not available or not loadble, skipping test. " +
+ System.out.println("Native libraries not available or not loadable, skipping test. " +
"Check logs for more details and see https://github.com/adamfisk/LittleProxy/issues/110");
}
return result;
11 years, 1 month
JBossWS SVN: r18071 - stack/cxf/trunk.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-11-07 18:25:05 -0500 (Thu, 07 Nov 2013)
New Revision: 18071
Modified:
stack/cxf/trunk/pom.xml
Log:
Preparing for tagging jbossws-cxf 4.2.3.Final with latest released spi and common
Modified: stack/cxf/trunk/pom.xml
===================================================================
--- stack/cxf/trunk/pom.xml 2013-11-07 23:10:39 UTC (rev 18070)
+++ stack/cxf/trunk/pom.xml 2013-11-07 23:25:05 UTC (rev 18071)
@@ -60,8 +60,8 @@
<!-- Properties -->
<properties>
<jbossws.api.version>1.0.2.Final</jbossws.api.version>
- <jbossws.spi.version>2.2.3-SNAPSHOT</jbossws.spi.version>
- <jbossws.common.version>2.2.4-SNAPSHOT</jbossws.common.version>
+ <jbossws.spi.version>2.2.2.Final</jbossws.spi.version>
+ <jbossws.common.version>2.2.3.Final</jbossws.common.version>
<jbossws.common.tools.version>1.2.0.Final</jbossws.common.tools.version>
<jbossws.jboss712.version>4.2.1.Final</jbossws.jboss712.version>
<jbossws.jboss713.version>4.2.1.Final</jbossws.jboss713.version>
11 years, 1 month
JBossWS SVN: r18070 - stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-11-07 18:10:39 -0500 (Thu, 07 Nov 2013)
New Revision: 18070
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java
Log:
[JBWS-3731] Control and document behavior regarding thread default bus changes depending on client bus selection strategy
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java 2013-11-07 22:29:26 UTC (rev 18069)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java 2013-11-07 23:10:39 UTC (rev 18070)
@@ -72,8 +72,37 @@
/**
* A custom javax.xml.ws.spi.Provider implementation
* extending the CXF one while adding few customizations.
+ *
+ * The most important customization is on the CXF Bus used
+ * the Endpoint.publish() or client.
+ * In particular, when a client is created, the thread
+ * default bus changes depending on the selected strategy:
+ *
+ * * Thread default busses with THREAD_BUS strategy
+ * ------------------------------------------------------------------
+ * |BEFORE client creation | USED for client | AFTER client creation|
+ * ------------------------------------------------------------------
+ * | NULL | NEW | NEW |
+ * | X | X | X |
+ * ------------------------------------------------------------------
+ *
+ * * Thread default busses with NEW_BUS strategy:
+ * ------------------------------------------------------------------
+ * |BEFORE client creation | USED for client | AFTER client creation|
+ * ------------------------------------------------------------------
+ * | NULL | NEW | NULL |
+ * | X | NEW | X |
+ * ------------------------------------------------------------------
+ *
+ * * Thread default busses with TCCL_BUS strategy:
+ * ------------------------------------------------------------------
+ * |BEFORE client creation | USED for client | AFTER client creation|
+ * ------------------------------------------------------------------
+ * | NULL | TCCL | NULL |
+ * | X | TCCL | X |
+ * ------------------------------------------------------------------
*
- * This also ensures a proper context classloader is set
+ * This class also ensures a proper context classloader is set
* (required on JBoss AS 7, as the TCCL does not include
* implementation classes by default)
*
@@ -239,7 +268,7 @@
}
private static void restoreThreadDefaultBus(final String busStrategy, final Bus origBus) {
- if (origBus != null && !busStrategy.equals(Constants.THREAD_BUS_STRATEGY))
+ if (origBus != null || !busStrategy.equals(Constants.THREAD_BUS_STRATEGY))
{
BusFactory.setThreadDefaultBus(origBus);
}
11 years, 1 month
JBossWS SVN: r18069 - stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/noIntegration.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-11-07 17:29:26 -0500 (Thu, 07 Nov 2013)
New Revision: 18069
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/noIntegration/CXFEndpointServlet.java
Log:
[JBWS-3729] ... but still use the bus that was created in cxf servlet' loadBus()
Modified: stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/noIntegration/CXFEndpointServlet.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/noIntegration/CXFEndpointServlet.java 2013-11-07 17:01:20 UTC (rev 18068)
+++ stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/noIntegration/CXFEndpointServlet.java 2013-11-07 22:29:26 UTC (rev 18069)
@@ -24,6 +24,7 @@
import javax.servlet.ServletConfig;
import javax.xml.ws.Endpoint;
+import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
import org.apache.cxf.transport.servlet.CXFNonSpringServlet;
@@ -39,6 +40,9 @@
// You could add the endpoint publish codes here
try {
+ //be sure to use the bus that's been created in loadBus..
+ Bus bus = getBus();
+ BusFactory.setThreadDefaultBus(bus);
Endpoint.publish("/Echo1", new EchoImpl());
} finally {
//free the thread default bus association in the current thread which
11 years, 1 month
JBossWS SVN: r18068 - in stack/cxf/trunk/modules/testsuite/shared-tests/src/test: java/org/jboss/test/ws/jaxws/handlerauth and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: asoldano
Date: 2013-11-07 12:01:20 -0500 (Thu, 07 Nov 2013)
New Revision: 18068
Added:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl3.java
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/handlerauth/META-INF/
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/handlerauth/META-INF/jboss-webservices.xml
Modified:
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/ant-import/build-jars-jaxws.xml
stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/HandlerAuthTestCase.java
Log:
[JBWS-3730] Testcase
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/ant-import/build-jars-jaxws.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/ant-import/build-jars-jaxws.xml 2013-11-07 17:00:56 UTC (rev 18067)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/ant-import/build-jars-jaxws.xml 2013-11-07 17:01:20 UTC (rev 18068)
@@ -193,6 +193,19 @@
</fileset>
</jar>
+ <!-- jaxws-handlerauth3 -->
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-handlerauth3.jar">
+ <fileset dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/handlerauth/SecureEndpoint.class" />
+ <include name="org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl3.class" />
+ <include name="org/jboss/test/ws/jaxws/handlerauth/SimpleHandler.class" />
+ <include name="org/jboss/test/ws/jaxws/handlerauth/handlers.xml" />
+ </fileset>
+ <metainf dir="${tests.output.dir}/test-resources/jaxws/handlerauth/META-INF">
+ <include name="jboss-webservices.xml" />
+ </metainf>
+ </jar>
+
<!-- jaxws-handlerscope -->
<war warfile="${tests.output.dir}/test-libs/jaxws-handlerscope.war" webxml="${tests.output.dir}/test-resources/jaxws/handlerscope/WEB-INF/web.xml">
<classes dir="${tests.output.dir}/test-classes">
Modified: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/HandlerAuthTestCase.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/HandlerAuthTestCase.java 2013-11-07 17:00:56 UTC (rev 18067)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/HandlerAuthTestCase.java 2013-11-07 17:01:20 UTC (rev 18068)
@@ -44,7 +44,7 @@
{
public static Test suite()
{
- JBossWSTestSetup testSetup = new JBossWSTestSetup(HandlerAuthTestCase.class, "jaxws-handlerauth.jar,jaxws-handlerauth2.jar");
+ JBossWSTestSetup testSetup = new JBossWSTestSetup(HandlerAuthTestCase.class, "jaxws-handlerauth.jar,jaxws-handlerauth2.jar,jaxws-handlerauth3.jar");
Map<String, String> authenticationOptions = new HashMap<String, String>();
authenticationOptions.put("usersProperties",
getResourceFile("jaxws/handlerauth/jbossws-users.properties").getAbsolutePath());
@@ -68,6 +68,67 @@
testAuth(port);
}
+ public void testNoHandlerAuth() throws Exception {
+ URL wsdlURL = new URL("http://" + getServerHost() + ":8080/handlerauth3?wsdl");
+ Service service = Service.create(wsdlURL, new QName("http://ws/", "SecureEndpointImpl3Service"));
+ SecureEndpoint port = service.getPort(new QName("http://ws/", "SecureEndpoint3Port"), SecureEndpoint.class);
+ setUser((BindingProvider)port, "John", "foo");
+ int count = port.getHandlerCounter();
+ int newCount;
+
+ assertEquals("Hello, Mr. John", port.sayHello("John"));
+ newCount = port.getHandlerCounter();
+ assertEquals(++count, newCount);
+
+ assertEquals("Bye, Mr. John", port.sayBye("John"));
+ newCount = port.getHandlerCounter();
+ assertEquals(++count, newCount);
+
+ try {
+ port.deniedMethod();
+ fail("Exception expected!");
+ } catch (Exception e) {
+ newCount = port.getHandlerCounter();
+ assertEquals(++count, newCount); //verify count is increased
+ }
+
+ port.ping();
+ newCount = port.getHandlerCounter();
+ assertEquals(++count, newCount);
+
+ assertEquals("foo", port.echo("foo"));
+ newCount = port.getHandlerCounter();
+ assertEquals(++count, newCount);
+
+
+ //Change user...
+ setUser((BindingProvider)port, "Bob", "bar");
+
+ assertEquals("Hello, Mr. Bob", port.sayHello("Bob"));
+ newCount = port.getHandlerCounter();
+ assertEquals(++count, newCount);
+
+ try {
+ port.sayBye("Bob");
+ fail("Exception expected!");
+ } catch (Exception e) {
+ newCount = port.getHandlerCounter();
+ assertEquals(++count, newCount); //verify count is increased
+ }
+
+ try {
+ port.deniedMethod();
+ fail("Exception expected!");
+ } catch (Exception e) {
+ newCount = port.getHandlerCounter();
+ assertEquals(++count, newCount); //verify count is increased
+ }
+
+ assertEquals("foo2", port.echo("foo2"));
+ newCount = port.getHandlerCounter();
+ assertEquals(++count, newCount);
+ }
+
private void testAuth(final SecureEndpoint port) throws Exception
{
setUser((BindingProvider)port, "John", "foo");
@@ -84,6 +145,7 @@
try {
port.deniedMethod();
+ fail("Exception expected!");
} catch (Exception e) {
assertTrue(e.getMessage().contains("JBWS024094"));
newCount = port.getHandlerCounter();
@@ -108,6 +170,7 @@
try {
port.sayBye("Bob");
+ fail("Exception expected!");
} catch (Exception e) {
assertTrue(e.getMessage().contains("JBWS024094"));
newCount = port.getHandlerCounter();
@@ -116,6 +179,7 @@
try {
port.deniedMethod();
+ fail("Exception expected!");
} catch (Exception e) {
assertTrue(e.getMessage().contains("JBWS024094"));
newCount = port.getHandlerCounter();
Added: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl3.java
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl3.java (rev 0)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl3.java 2013-11-07 17:01:20 UTC (rev 18068)
@@ -0,0 +1,112 @@
+/*
+ * 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.handlerauth;
+
+import javax.jws.Oneway;
+import javax.jws.WebService;
+import javax.ejb.Stateless;
+import javax.annotation.security.DeclareRoles;
+import javax.annotation.security.DenyAll;
+import javax.annotation.security.PermitAll;
+import javax.annotation.security.RolesAllowed;
+
+import javax.jws.WebMethod;
+
+import java.util.Enumeration;
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.handler.MessageContext;
+import javax.xml.ws.handler.soap.SOAPMessageContext;
+import javax.xml.ws.handler.soap.SOAPHandler;
+import javax.jws.HandlerChain;
+import javax.xml.soap.SOAPMessage;
+import javax.annotation.PostConstruct;
+
+import java.io.PrintStream;
+import java.util.Map;
+import java.util.Set;
+
+import org.jboss.ws.api.annotation.WebContext;
+import org.jboss.ejb3.annotation.SecurityDomain;
+import org.jboss.logging.Logger;
+
+@WebService(name = "SecureEndpoint3", targetNamespace = "http://ws/")
+@HandlerChain(file = "handlers.xml")
+@WebContext(contextRoot = "/handlerauth3", urlPattern = "/*", authMethod = "BASIC", transportGuarantee = "NONE", secureWSDLAccess = false)
+@Stateless
+@SecurityDomain("handlerauth-security-domain")
+@RolesAllowed({"user", "friend"})
+@DeclareRoles({"user", "friend"})
+public class SecureEndpointImpl3 implements SecureEndpoint
+{
+ private Logger log = Logger.getLogger(this.getClass());
+
+ @Resource
+ WebServiceContext context;
+
+ @RolesAllowed("user")
+ public String sayHello(String name)
+ {
+ String principalName = context.getUserPrincipal().getName();
+ if (principalName.equals(name)) {
+ log.info("sayHello() invoked : Hello, Mr. " + name);
+ return "Hello, Mr. " + name;
+ } else {
+ return "Mr. " + name + ", you authenticated as \'" + principalName + "\'";
+ }
+ }
+
+ @RolesAllowed("friend")
+ public String sayBye(String name)
+ {
+ String principalName = context.getUserPrincipal().getName();
+ if (principalName.equals(name)) {
+ log.info("sayBye() invoked : Bye, Mr. " + name);
+ return "Bye, Mr. " + name;
+ } else {
+ return "Mr. " + name + ", you authenticated as \'" + principalName + "\'";
+ }
+ }
+
+ public int getHandlerCounter() {
+ return SimpleHandler.counter.get();
+ }
+
+
+ @Oneway
+ @RolesAllowed("friend")
+ public void ping() {
+ //NOOP
+ }
+
+ @DenyAll
+ public void deniedMethod() {
+ //NOOP
+ }
+
+ @PermitAll
+ public String echo(String s) {
+ return s;
+ }
+}
Property changes on: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/java/org/jboss/test/ws/jaxws/handlerauth/SecureEndpointImpl3.java
___________________________________________________________________
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
Added: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/handlerauth/META-INF/jboss-webservices.xml
===================================================================
--- stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/handlerauth/META-INF/jboss-webservices.xml (rev 0)
+++ stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/handlerauth/META-INF/jboss-webservices.xml 2013-11-07 17:01:20 UTC (rev 18068)
@@ -0,0 +1,13 @@
+<?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>org.jboss.ws.cxf.disableHandlerAuthChecks</name>
+ <value>true</value>
+ </property>
+
+</webservices>
\ No newline at end of file
Property changes on: stack/cxf/trunk/modules/testsuite/shared-tests/src/test/resources/jaxws/handlerauth/META-INF/jboss-webservices.xml
___________________________________________________________________
Added: svn:mime-type
+ text/xml
Added: svn:keywords
+ Rev Date
Added: svn:eol-style
+ native
11 years, 1 month